Global Parameters in JCL ?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Global Parameters in JCL ?

Postby noha_nabil » Mon Sep 10, 2012 3:27 pm

Dear All

I am working with IBM System VSE/ESA.

My need is to :
1- get an i/p parameter from user through Console
2- and set it as a Global Parameter in the JCL and use it when executes 3 different COBOL Programs.

How to do that in JCL ?

Thanks
noha_nabil
 
Posts: 14
Joined: Wed Jun 27, 2012 4:46 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Global Parameters in JCL ?

Postby BillyBoyo » Mon Sep 10, 2012 3:35 pm

Mmmm... not generally a good way to do it. The Computer Operator, who has access to the Console, is not your "user" - normally, anyway, unless it is some processing for OPS?

It will be far better to allow your actual user to input data through a screen at their desk. It can be validated. The data will go to a file designed for that purpose. That file will later be read by three different programs. The data input by the user can be recorded/reported/backed-up so that the three programs can be later re-run to get the same results, the use can't argue that they didn't ask for "that" and Computer OPS can concentrate on running the system. It is unfair to expect Computer OPS to do accurate data-entry as well.

So, what you'd need in the JCL would be

// DLBL etc
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Global Parameters in JCL ?

Postby noha_nabil » Mon Sep 10, 2012 3:46 pm

BillyBoyo wrote:Mmmm... not generally a good way to do it. The Computer Operator, who has access to the Console, is not your "user" - normally, anyway, unless it is some processing for OPS?

It will be far better to allow your actual user to input data through a screen at their desk. It can be validated. The data will go to a file designed for that purpose. That file will later be read by three different programs. The data input by the user can be recorded/reported/backed-up so that the three programs can be later re-run to get the same results, the use can't argue that they didn't ask for "that" and Computer OPS can concentrate on running the system. It is unfair to expect Computer OPS to do accurate data-entry as well.

So, what you'd need in the JCL would be

// DLBL etc


Thank you, Its a good idea.

Sorry I mean by "user" is the "Computer Operator".

I found this JCL line:

// SETPARM PWRJOB,MyPARM='123'

Is it possible to set this parameter "MyPARM" through COBOL Program ????!!!!

If I can do that, my problem is solved, so I can pass this Global parameters to any program I executes in My JCL!!

Right or I am wrong ??
noha_nabil
 
Posts: 14
Joined: Wed Jun 27, 2012 4:46 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Global Parameters in JCL ?

Postby BillyBoyo » Mon Sep 10, 2012 4:37 pm

Mmmm... I doubt it, unless you want to investigate "getting dirty" with Assembler, which I'd not suggest as a good idea.

The "usual" alternative would be to include what is needed as part of the "run instructions" and have your "Production Control" prepare the job correctly. They will have more time, fewer other things to do. They may still prefer that it is not their responsibilty, and you are back to the file...

These users thanked the author BillyBoyo for the post:
noha_nabil (Mon Sep 10, 2012 8:23 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Global Parameters in JCL ?

Postby noha_nabil » Mon Sep 10, 2012 4:47 pm

BillyBoyo wrote:Mmmm... I doubt it, unless you want to investigate "getting dirty" with Assembler, which I'd not suggest as a good idea.



mmm ... you mean that I can set the JCL Parameters by using Assembler Program but using COBOL program I cannot ?!!
I feel from your reply that is very hard to go with Assembler solution :S !!

The "usual" alternative would be to include what is needed as part of the "run instructions" and have your "Production Control" prepare the job correctly. They will have more time, fewer other things to do. They may still prefer that it is not their responsibilty, and you are back to the file...


I think about this solution before submitting my question and i reached the same result as you stated :D

Thank you BillyBoyo..
noha_nabil
 
Posts: 14
Joined: Wed Jun 27, 2012 4:46 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Global Parameters in JCL ?

Postby BillyBoyo » Mon Sep 10, 2012 4:51 pm

I'm not saying it is possible with Assembler :-) I'm saying that if the world were about to explode unless you could do this, then you'd better try to find out how to do it. Otherwise leave it.

I know you can't do it in Cobol.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Global Parameters in JCL ?

Postby noha_nabil » Mon Sep 10, 2012 4:58 pm

BillyBoyo wrote:I'm not saying it is possible with Assembler :-) I'm saying that if the world were about to explode unless you could do this, then you'd better try to find out how to do it. Otherwise leave it.

I know you can't do it in Cobol.



Thanks.
I'll try to search How can I do that using Assembler :)
noha_nabil
 
Posts: 14
Joined: Wed Jun 27, 2012 4:46 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Global Parameters in JCL ?

Postby BillyBoyo » Mon Sep 10, 2012 5:03 pm

Is the world about to explode? :-)

If you are determined to do this through JCL, how about looking into using the "punch"?. Punch the JCL you want, assign SYSPCH to SYSIPT. Amended JCL arrives. Your auditors or production control may not like this approach.

But by whom/how would the parameter get set anyway?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Global Parameters in JCL ?

Postby noha_nabil » Mon Sep 10, 2012 5:20 pm

BillyBoyo wrote:Is the world about to explode? :-)

If you are determined to do this through JCL, how about looking into using the "punch"?. Punch the JCL you want, assign SYSPCH to SYSIPT. Amended JCL arrives. Your auditors or production control may not like this approach.



hhhhhh :D

I don't know "punch the JCL".

But by whom/how would the parameter get set anyway?


If I find the solution through assembler :)

The assembler program is responsible to get the parameter (eg. MyParm) through Console.
and set the value to the Global parameter in JCL.

// SETPARM PWRJOB,MyPARM='&MyParm_SET'
noha_nabil
 
Posts: 14
Joined: Wed Jun 27, 2012 4:46 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Global Parameters in JCL ?

Postby BillyBoyo » Mon Sep 10, 2012 5:37 pm

Get your JCL reference.

Look at SYSRDR, SYSPCH and SYSIPT.

SYSPCH used to be a physical card punch. SYSRDR the card reader. So, you could "punch" a "deck". Then assign the RDR to IPT and your "punched" cards start running, as a continuation of your Job.

Of course, you'll need something that can PUNCH and some way to change the thing that can be punched. I did it from our source-libary/editor system, which conveniently had a "-PU(NCH)" command.

I've never done this with "physical" equipment :-)

It is a loooonnnggggg time since I did that. Would've been about 1980 or so. So I can't give you the exact details without doing the research myself. It would spoil your "learning opportunity" if I did, as well.

These users thanked the author BillyBoyo for the post:
noha_nabil (Mon Sep 10, 2012 8:24 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post