IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

to sort out various datatypes


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Wed Sep 30, 2009 9:17 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top