[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR JCL to pass a Run-Time Parm?
- Subject: Re: SQR JCL to pass a Run-Time Parm?
- From: "Steve K. Schelske" <skschelske@WORLDNET.ATT.NET>
- Date: Tue, 4 Aug 1998 07:04:26 -0400
Here's some info I recevied recently on, I believe, the same question.
----------------------------------------------------------------------------
-------------------------------------
What we did here is to port the program to run on the MVS and accept
parameters from JCL.
Suppose your program is to be submitted from process scheduler and run
in MVS and your codes look like this:
.....
Do Define-Prcs-Vars
Do Get-Run-Control-Parms
Do Get-Current-Year-Period
Do Main
........
You would change them to:
.....
Do Define-Prcs-Vars
Do Get-Run-Control-Parms
if $prcs_process_instance = '' ! if run from MVS
do Get-Mainframe-Parms
else
Do Get-Current-Year-Period
end-if
Do Main
........
Begin-Procedure Get-Mainframe-Parms
input $fiscal_year maxlen=4 'Enter the FISCAL YEAR' type=integer
move $fiscal_year to #fiscal_year
input $Acctng_period maxlen=3 'Enter the accounting period' type=integer
move $acctng_period to #Acctng_period
......
End-Procedure
And your JCL would look like this:
.....
//sqrstep exec sqrproc
//sysin dd *
<==leave one blank line here
1998
10
/*
The blank line in the JCL //sysin is critical for the input command (in
prcsapi.sqc) to get a value for $prcs_process_instance.
----------
>
>
> I would like to put the Run-Time parameter in my JCL. In my SQR, I
> would have an Input statement.
>
> Where and how would I put the parm?
>
>
> Thanks in advance.
>
>
>
> Normal JCL:
>
>
> //STEPONLY EXEC SQRPROC,SQRID='PYCALLD'
> //SQR.SYSTSIN DD *
> DSN SYSTEM(KFT1)
> RUN PROG(SQR) -
> PLAN(DB2CALLS) -
> LIB('TSHR.SQR.LOAD') -
> PARMS('DDN:SQRIN DSN/LSH1 -FDDN:SQROUTF -GPRINT=NO -
> -IDDN:SQRINC( -TBZ -DDN:MAXIN')
> END
> /*
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com