Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10210
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us