Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us