Call a JCL by program.



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: Call a JCL by program.

Postby Mehdi shri » Sat Nov 10, 2012 11:35 am

Dear dick scherrer
In our operational environment PROGA must run once every night via a JCL. But now in our test invironment I want to run it multiple of times to simulate for example 10 night passed. Its may be not true to use thw word "test the functionality " of PROGA. I want just run PROGA multiple of times via MYPROG and MYPROG must change the PARM1 for PROGA also.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Call a JCL by program.

Postby dick scherrer » Sun Nov 11, 2012 5:25 am

Hello,

Suggest you simply change MYPROG to create 10 sets of jcl for PROGA and either submit this thru the internal reader or write it to a dataset or member and submit this.

You will have the 10 executions of PROGA that you want. COnvenitntly, they will all be in one set of sysouts.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
Mehdi shri (Sun Nov 11, 2012 4:59 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Call a JCL by program.

Postby Mehdi shri » Sun Nov 11, 2012 10:37 am

Thank you dick scherrer.
What is the statement for using internal reader in COBOL.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Call a JCL by program.

Postby steve-myers » Sun Nov 11, 2012 10:54 am

Mehdi shri wrote:... What is the statement for using internal reader in COBOL.
You define an internal reader to your program using JCL, as discussed in MVS JCL Reference and MVS JCL User's Guide for your z/OS release. This has not changed in almost 40 years. All your program does is use standard Cobol methods to open the data set, write to the data set, and close the data set as though it is a sequential data set. There are no special Cobol statements to use an internal reader.

These users thanked the author steve-myers for the post:
Mehdi shri (Sun Nov 11, 2012 4:59 pm)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Call a JCL by program.

Postby BillyBoyo » Sun Nov 11, 2012 1:49 pm

In addition to actually using the INTRDR (Internal Reader) you can, for your initial testing, just create a "normal" sequential file, even SYSOUT=* (or whatever), so that you know you've got things right before tossing the job through the INTRDR.

If writing to an actual dataset, you can edit the dataset and use SUBmit if it looks OK. It doesn't have to go through the INTRDR, that doesn't make the job work or not, it is just a way of then automating the process.

These users thanked the author BillyBoyo for the post:
Mehdi shri (Sun Nov 11, 2012 4:59 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Call a JCL by program.

Postby steve-myers » Mon Nov 12, 2012 12:02 am

BillyBoyo's idea of specifying SYSOUT=* or specifying a real data set to review to job before actually submitting it is excellent; I've done this many times over my career.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Call a JCL by program.

Postby dick scherrer » Mon Nov 12, 2012 1:39 am

Hello,

I've also been known to generate the early testing with a JCL Error in the submitted job so that while i'm making sure i built the job correctly it can be submitted with no fear of running and having the system validate the jcl as much as possible . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Call a JCL by program.

Postby steve-myers » Mon Nov 12, 2012 6:06 am

Another excellent idea; one I've done many times over the course of my career.
//A        JOB ...
// THIS IS A JCL ERROR!
//MOREJCL EXEC ...
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post