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: 10256
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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