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
 

 

Copy part of the input file to output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Smita Sebastian

New User


Joined: 30 May 2007
Posts: 7
Location: India

PostPosted: Tue Jun 24, 2008 5:20 pm    Post subject: Copy part of the input file to output
Reply with quote

I have a fixed length sorted input file of length 80 bytes. My requirement is to copy bytes 10 to 80 of the input file to the output file. Hence the length of the resultant output file should be 70.

Thanks,
S
Back to top
View user's profile Send private message

cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Tue Jun 24, 2008 6:09 pm    Post subject: Re: Copy part of the input file to output
Reply with quote

Hi,

Please use this step

Code:

//S1 EXEC PGM=SORT
//SORTIN  DD DSN=INPUTFILE   FB/80
//SORTOUT DD DSN=OUTFILE    FB/70
//SYSOUT  DD SYSOUT=*
//SYSIN   DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(1:10,70)
/*
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Jun 24, 2008 6:12 pm    Post subject:
Reply with quote

Smita,

Your specification of bytes 10 to 80 will give you a 71 byte record, not a 70 byte record

Garry.
Back to top
View user's profile Send private message
Smita Sebastian

New User


Joined: 30 May 2007
Posts: 7
Location: India

PostPosted: Mon Jun 30, 2008 8:34 am    Post subject: Reply to: Copy part of the input file to output
Reply with quote

Hi -

Thankyou for your response. I shall try that out. It was a typo...I am expecting the output file to be bytes 11 thru 80 of the input file, hence 70 bytes.

Thanks,
S
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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