View previous topic :: View next topic
|
Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
In what language are you planning to implement this process? |
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
just thinking if we can do this in JCL only without COBOL or REXX |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
|