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

Variable record length


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Wed May 21, 2008 2:57 pm
Reply with quote

I have a FB file which has records of various sizes, like,


FIle1:

aaaaaaaaaaaaaaaa
bbbbbbbbbbbb
cccccccccc
ddddddddddddddddd

now, what i need to do is to get to the end of the record which is not fixed.Each record may vary in its length.
I need to add a char at the end of the record (say a | symbol)

hw do i do it ?

pls suggest...
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed May 21, 2008 8:45 pm
Reply with quote

samuel_inba,

The following DFSORT JCL will give you the desired results(Assuming your input is 80 bytes LRECL and FB recfm)

Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD *                                   
AAAAAAAAAAAAAAAA                                 
BBBBBBBBBBBB                                     
CCCCCCCCCC                                       
DDDDDDDDDDDDDDDDD                                 
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                   
  OPTION COPY                                     
  INREC BUILD=(1,80,JFY=(SHIFT=LEFT,TRAIL=C'|')) 
//*                                               
Back to top
View user's profile Send private message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Fri May 23, 2008 1:13 pm
Reply with quote

Thank you
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top