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: 991
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm


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