Page 1 of 1

Copying a column

PostPosted: Wed Oct 13, 2010 10:15 pm
by nm992
I have a file of 247 bytes..I need tocopy only column 237-245 to another file..


How do I do that using sort?

Re: Copying a column

PostPosted: Wed Oct 13, 2010 10:27 pm
by NicC
First you read the forum rules. Then you post in the correct section. Someone will probably move this to the correct place. Do you use DFSORT or SYNCSORT?

Re: Copying a column

PostPosted: Wed Oct 13, 2010 10:54 pm
by Frank Yaeger
nm992,

Here's a DFSORT job that will do what you asked for:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/247)
//SORTOUT DD DSN=...  output file (FB/9)
//SYSIN DD *
   OPTION COPY
   INREC BUILD=(237,9)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080