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

Copy part of the input file to output


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jun 24, 2008 6:12 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top