MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

converting data from one form to another

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Wed Sep 10, 2008 1:51 pm    Post subject: converting data from one form to another Reply with quote

Hi,
I am having a file with the input shown below.
Code:

00000001923      C
00000357075      D
00000872666      D
00000880050      C

This is getting converted thru an Ezt as below.
Code:

0000000192L   C
00000357075   D
00000872666   D
0000088005}   C


Is there any built in function in SORT to convert the data like this ?

Note : If I use the hex on,the values of the above output are displaying like this.
Code:

0000000192L   C
FFFFFFFFFFD444C
000000019230003
00000357075   D
FFFFFFFFFFF444C
000003570750004
00000872666   D
FFFFFFFFFFF444C
000008726660004
0000088005}   C
FFFFFFFFFFD444C
000008800500003



Thanks
_________________
----------------
Thanks&Regards
Bprasanna
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Sep 10, 2008 2:31 pm    Post subject: Reply with quote

bprasanna,

Does C denote negative numbers? Looks like they are zoned decimal numbers with sign overpunch. Do you want to inverse the sign if the value is C?

Code:

{ABCDEFGHI}JKLMNOPQR
CCCCCCCCCCDDDDDDDDDD
01234567890123456789


Hex C0 thru C9 are positive numbers and D0 thru D9 are negative numbers. If your intention is to change the sign for negative numbers then it is very easy.

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=ICEMAN                           
//SYSOUT   DD SYSOUT=*                               
//SORTIN   DD *                                       
00000001923      C                                   
00000357075      D                                   
00000872666      D                                   
00000880050      C                                   
//SORTOUT  DD SYSOUT=*                               
//SYSIN    DD *                                       
  SORT FIELDS=COPY                                   
  INREC IFTHEN=(WHEN=(18,1,CH,EQ,C'C'),               
        BUILD=(+0,SUB,1,11,ZD,ZDC,LENGTH=11,3X,18,1)),
        IFTHEN=(WHEN=NONE,                           
        BUILD=(1,11,3X,18,1))                         
/*


Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Thu Sep 11, 2008 1:43 am    Post subject: Reply with quote

Thanks a Lot Kolusu!

Thanks
Bprasanna
_________________
----------------
Thanks&Regards
Bprasanna
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group