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?
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copying a column


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.
Global moderator
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Copying a column

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


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

//SORTIN DD DSN=...  input file (FB/247)
//SORTOUT DD DSN=...  output file (FB/9)
   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: ... g3T7000080
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Return to JCL


  • Related topics
    Last post