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
 

 

Read contents of PS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Mon Mar 28, 2016 10:28 pm    Post subject: Read contents of PS file
Reply with quote

1. I want to count the contents of PS file , if count is 2 process it

Code:

//IDR123   EXEC PGM=MDCAMS,REGION=0M                   
//INFILE   DD DSN=F9340T.IDR.COUNT.FILE,               
//            DISP=SHR                                 
//OUTFILE  DD DUMMY,                                   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)       
//SYSIN    DD *                                       
  REPRO INFILE(INFILE) OUTFILE(OUTFILE) COUNT(2)       
/*                                                     


2. Read contents of File. File is 80- byte FB and it contains PS file names

3. Use the first record found in Step 2 as DD for next step.


I am not sure how can I achieve Step 3. Any suggestions.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Mar 28, 2016 10:59 pm    Post subject:
Reply with quote

In what language are you planning to implement this process?
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Mon Mar 28, 2016 11:16 pm    Post subject: Reply to: Read contents of PS file
Reply with quote

just thinking if we can do this in JCL only without COBOL or REXX
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Mar 28, 2016 11:43 pm    Post subject:
Reply with quote

As you should know, JCL does and can do nothing except set up environments and execute programs.

Since JCL is frozen when it is submitted and interpreted, you cannot change it dynamically to use a DSN read from a data set -- or indeed any other source. Rather, you must have the program in step 3 read the data set and dynamically allocate the data set, using the TSO ALLOCATE command in Rexx or BPXWDYN in COBOL.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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