issue with copying.



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

issue with copying.

Postby andy » Mon Nov 09, 2009 4:28 pm

hi all,

i have one doubt,
In a file there are 1000 of records, i want to copy all 999record except 590th records.i want to skip only 590th records.

this can be done thru sort utility using OMIT COND=(.....) but for this i should know the record name which is present on the 590th position.
but apart from OMIT COND is there any other way to handle this situation only thru JCL.
andy
 
Posts: 3
Joined: Mon Nov 09, 2009 2:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: issue with copying.

 

Re: issue with copying.

Postby expat » Mon Nov 09, 2009 4:49 pm

/RANT ON
Once more let us clarify exactly what JCL is.

it is Job Control Language.

By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.

JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
/RANT OFF
So, by using MORE than just JCL you can use the IDCAMS REPRO command to copy the first 589 records, and then with a second set of statements copy from record 591 until the end of file.

Also, you may wish to read the sort product documentation, because I believe that you are incorrect in saying that you need to know anything about the record except its relative position within the file. I know that this can be done using DFSORT, but for SYNCSORT I do not know as I have not used it in many many years.

Click HERE to read the DFSORT smart tricks publication.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: issue with copying.

Postby andy » Mon Nov 09, 2009 4:53 pm

thanks expat.
andy
 
Posts: 3
Joined: Mon Nov 09, 2009 2:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: issue with copying.

Postby Frank Yaeger » Mon Nov 09, 2009 10:30 pm

Andy,

Here's a DFSORT/ICETOOL job thagt will will do what you asked for:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) REMOVE INPUT RRN(590)
/*


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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: issue with copying.

Postby andy » Tue Nov 10, 2009 12:50 pm

thank you very much frank...
andy
 
Posts: 3
Joined: Mon Nov 09, 2009 2:41 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post