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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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