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
 

 

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: 4648
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: 4648
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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