Page 1 of 1

issue with copying.

PostPosted: Mon Nov 09, 2009 4:28 pm
by andy
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.

Re: issue with copying.

PostPosted: Mon Nov 09, 2009 4:49 pm
by expat
/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.

Re: issue with copying.

PostPosted: Mon Nov 09, 2009 4:53 pm
by andy
thanks expat.

Re: issue with copying.

PostPosted: Mon Nov 09, 2009 10:30 pm
by Frank Yaeger
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

Re: issue with copying.

PostPosted: Tue Nov 10, 2009 12:50 pm
by andy
thank you very much frank...