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
 
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: 998
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm

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