Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

to sort out various datatypes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Wed Sep 30, 2009 6:28 pm    Post subject: to sort out various datatypes
Reply with quote

I have a job which copies contents from input file & writes into output file, but the contents in input file are of different datatypes(CHARACTER,BINARY)........


input file :
col 1 to col 4 character
col 5 to col 9 binary

output file should be like

col 1 to col 4 character( as it is in input file)
col 5 to col 9 as zoned decimal or charater


I tried this:
Code:

//SORT  EXEC PGM=SORT
//SYSOUT DD SYSOUT=*                               
//SORTIN DD DSN=XXX.INPUT,DISP=SHR                   
//SORTOUT DD DSN=XXX.OUTPUT,       
//           DISP=SHR                               
//SYSIN DD *                                       
  OPTION COPY             
  OUTREC FIELDS=((1,4,CH),TO=CH,LENGTH=4,(5,4,BI),TO=ZD,LENGTH=4)
/*


But I'm getting error "operand defined error"
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Sep 30, 2009 9:17 pm    Post subject:
Reply with quote

You can't just make up your own syntax and expect it to work. You have to use the syntax actually defined by DFSORT.

You say "col 5 to col 9 binary" which would be 5 bytes, but then you use 4 bytes for the BI field, so I'll assume it's actually 4 bytes. If so, you can use these DFSORT control statements:

Code:

    OPTION COPY
    OUTREC OVERLAY=(5:5,4,BI,TO=ZD,LENGTH=4)


However, keep in mind that the maximum 4-byte BI value is 4294967295 which will NOT fit in a 4-byte ZD field, so LENGTH=10 would make more sense unless your maximum BI value happens to be only 9999.
Back to top
View user's profile Send private message
janani vs

New User


Joined: 01 Sep 2009
Posts: 15
Location: CHENNAI

PostPosted: Thu Oct 01, 2009 12:34 pm    Post subject:
Reply with quote

Thanks a lot. I got it sorted out.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us