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
 
Shifting Fields from a Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Shifting Fields from a Dataset
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

Moderator Team Head


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

PostPosted: Thu May 04, 2006 12:55 am    Post subject: Re: Shifting Fields from a Dataset
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    Post subject:
Reply with quote

Terrific !!

Thanks !
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: Thu May 04, 2006 2:27 am    Post subject:
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

Moderator Team Head


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

PostPosted: Thu May 04, 2006 6:24 am    Post subject: Re: Shifting Fields from a Dataset
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    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 Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm

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