|
View previous topic :: View next topic
|
| Author |
Message |
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
Hi,
I have to every 10 record of my available PS file.
Is there any method to get this read possible..
Regards,
Krunal |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Take a look at the DFSORT forum, there is functionality available to do this. I think, but am not 100% sure, it is the SAMPLE parameter. |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
| krunalbafna wrote: |
Hi,
I have to every 10 record of my available PS file.
Is there any method to get this read possible..
Regards,
Krunal |
Explanation of problem you have give is clear as mud..
Do you want every 10 records in separate file from set of records in input file? |
|
| Back to top |
|
 |
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
I want to read every 10th record from a file..
ex, 1,10,20,30 so on... till end of file.. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Either read and skip the nine unwanted records or pre-process the input so the 'every 10th record' is the only thing available to your application.
FWIW, using a sort/copy, a one digit seqnum would allow you to include every tenth record when the seqnum = zero for output. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Here let me do YOUR work for you
click HERE and see what YOU could have found for YOURSELF |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10902 Location: italy
|
|
|
|
| Quote: |
| ex, 1,10,20,30 so on... till end of file.. |
wrong!
better ==> 1,11,21,31 and so on |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Here is the DFSORT step doing what is required.
| Code: |
//S1 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=YOUR.INPUT.HERE
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL SAMPLE=10
/*
|
|
|
| Back to top |
|
 |
|
|