Copying a column



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Copying a column

Postby nm992 » Wed Oct 13, 2010 10:15 pm

I have a file of 247 bytes..I need tocopy only column 237-245 to another file..


How do I do that using sort?
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copying a column

Postby NicC » Wed Oct 13, 2010 10:27 pm

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?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Copying a column

Postby Frank Yaeger » Wed Oct 13, 2010 10:54 pm

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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post