Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reading of PS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Tue Apr 27, 2010 7:04 pm    Post subject: Reading of PS file
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 27, 2010 7:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Apr 27, 2010 7:22 pm    Post subject: Re: Reading of PS file
Reply with quote

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
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Apr 28, 2010 9:51 am    Post subject:
Reply with quote

I want to read every 10th record from a file..

ex, 1,10,20,30 so on... till end of file..
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 28, 2010 10:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 28, 2010 11:36 am    Post subject:
Reply with quote

Here let me do YOUR work for you

click HERE and see what YOU could have found for YOURSELF
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Wed Apr 28, 2010 1:17 pm    Post subject: Reply to: Reading of PS file
Reply with quote

Quote:
ex, 1,10,20,30 so on... till end of file..
wrong!
better ==> 1,11,21,31 and so on
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Apr 28, 2010 2:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us