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

Shifting Fields from a Dataset


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

New User


Joined: 27 Apr 2006
Posts: 23

PostPosted: Wed May 03, 2006 9:45 pm
Reply with quote

I have a dataset that is 133 in length. I want to copy to an 80 byte record and have it wrap around. Any ideas how to do this ?l
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu May 04, 2006 12:55 am
Reply with quote

Code:

//*                                                       
//SORTSTEP EXEC PGM=SORT                                   
//SORTIN   DD   DSN=<133-BYTE DATASET>
//SORTOUT  DD   DSN=<80-BYTE DATASET>,DISP=(,CATLG,DELETE),...
//SYSOUT   DD   SYSOUT=*                                   
//SYSIN    DD   *                                         
  OPTION COPY                                             
  OUTFIL OUTREC=(1,80,/,81,53,80:X)                       
/*                                                         
//*             
Back to top
View user's profile Send private message
T.O.

New User


Joined: 27 Apr 2006
Posts: 23

PostPosted: Thu May 04, 2006 2:06 am
Reply with quote

Terrific !!

Thanks !
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: Thu May 04, 2006 2:27 am
Reply with quote

For the record, you don't need to specify 80:X in the second line. The 1,80 in the first line will set the record length to 80 and the second line will be padded with blanks at the end automatically. So you can use this DFSORT OUTFIL statement:

Code:

  OUTFIL OUTREC=(1,80,/,81,53)
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu May 04, 2006 6:24 am
Reply with quote

Thanks for the tip. I kind of thought that's what would happen.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top