Page 1 of 1

issue in skipping records...

PostPosted: Mon Feb 16, 2009 12:53 pm
by SIREESHA
I'm using Sync Tool to copy first 100 records and last 500 records of a file to a output file.
I have the folowing code:

//S1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=---
//OUT1 DD DISP=SHR,DSN=----
//TOOLIN DD *
SUBSET FROM(IN1) TO(OUT1) OUTPUT KEEP FIRST(100) LAST(500)
/*

but this code is not working.

I would like to know an alternative for SUBSET command.
sireesha.

Re: issue in skipping records...

PostPosted: Mon Feb 16, 2009 10:28 pm
by dick scherrer
Hello and welcome to the forum,

When you have a question, you should start a new topic for your question rather than reply to some other topic.

What release of Syncsort s used on your system?

Re: issue in skipping records...

PostPosted: Tue Feb 17, 2009 9:30 pm
by Alissa Margulies
SIREESHA,

SUBSET is supported in SyncSort for z/OS 1.3.2.0 (SYNCTOOL release 1.6.2). When you say that the code is not working, what error message are you getting? If it is a syntax error, I suspect that you are running an earlier release of the product.

Re: issue in skipping records...

PostPosted: Wed Feb 18, 2009 6:15 pm
by SIREESHA
Hi Alissa,

Iam working with SYNCTOOL RELEASE 1.5.3.
And this is the error message iam getting

SUBSET FROM(IN1) TO(OUT1) OUTPUT KEEP FIRST(100) LAST(500)
STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR
OPERATION COMPLETED WITH RETURN CODE 12

Re: issue in skipping records...

PostPosted: Wed Feb 18, 2009 8:50 pm
by Alissa Margulies
I would recommend that you upgrade to the current version of SyncSort for z/OS, which will include the support for the new SYNCTOOL features.

Re: issue in skipping records...

PostPosted: Thu Feb 19, 2009 10:58 am
by SIREESHA
Thanks for the suggestion Alissa. But Iam working for a SW Company and i do not have any rights to do any upgradations or installations. I have to make use of what i have.
So it would be helpfull if u suggest me any alternative for the above CODE.

Re: issue in skipping records...

PostPosted: Thu Feb 19, 2009 8:57 pm
by Alissa Margulies
Do you know how many records are in the file?

Re: issue in skipping records...

PostPosted: Fri Feb 20, 2009 9:39 am
by SIREESHA
No Idea but its very large file

Re: issue in skipping records...

PostPosted: Fri Feb 20, 2009 9:45 am
by dick scherrer
Hello,

If you use the sort to simply "copy" the file and direct the output of the copy to a DD DUMMY, the output will show the record count. . .

"Very large" has different meanings in different environments. We'd probably all agree that a billion records is very large. How about 1million or 10 million? Some places have no files that big while 100 million is about average for several of the processes i support. . .

Re: issue in skipping records...

PostPosted: Sat Feb 21, 2009 3:23 am
by Alissa Margulies
Sireesha,

Assuming that the file is FB/80, try this code:

//SYSIN DD *                                                   
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),           
         IFTHEN=(WHEN=(81,8,ZD,LE,100),OVERLAY=(81:C'99999999')) 
   SORT FIELDS=(81,8,ZD,D),EQUALS                               
   OUTFIL ENDREC=600,OUTREC=(1,80)         
/*