View previous topic :: View next topic
|
Author |
Message |
ganna_f16
New User
Joined: 07 Mar 2005 Posts: 17 Location: India
|
|
|
|
Hi,
Can any body explain me how to pass a value from JCL to Cobol-Db2 Program.
Thanks |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Usually done via the parm, have you looked? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not an expert, but I thought that COBOL-DB2 programs had to be run unde the Terminal Monitor Program (TMP) thus:
Code: |
//STEP0100 EXEC PGM=IKJEFT01
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(XXXX)
RUN PROGRAM(pgmname) -
PLAN(planname) -
LIB('your.loadlib.pds') -
PARMS('2005-08-08/')
END
/*
|
and aren't allowed to receive parameters via the JCL, but instead must receive them within the SYSTSIN datastream. |
|
Back to top |
|
|
ganna_f16
New User
Joined: 07 Mar 2005 Posts: 17 Location: India
|
|
|
|
In my JCL I am passing it through SYSTSIN in the JCL. In my program I am using Linkage section as in Normal Batch JCL. But when I am Displaying the passed value. I am not able to see any thing there.
JCL is:
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN -
PROGRAM(INQUIRY1) PLAN(CUSTPLAN) -
LIB('****') -
PARM(400001)
Cobol-Db2:
LINKAGE SECTION.
01 PARM-REC.
05 PARM-SIZE PIC S9(4) COMP.
05 PARM-CUST-NO PIC X(6).
PROCEDURE DIVISION USING PARM-REC.
Is this correct way of passing the PARM value in the DB2-Cobol Program. |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
H frnd,
Instead of using
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN -
PROGRAM(INQUIRY1) PLAN(CUSTPLAN) -
LIB('****') -
PARM(400001)
try coding a sysin dd * statement in your run jcl
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN -
PROGRAM(INQUIRY1) PLAN(CUSTPLAN) -
LIB('****')
/*
//sysin dd *
400001
/*
This would also serve the same purpose , no need to break your head with linkage section and the length of the data passed.
Cheer's
Thamilzan. |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Hi,
I guess there is another way to pass the values.
ie. UTILITYF.
I usually pass values through this DD statement and code corrsponding parm variables in Linkage section of Prog.
But I hardly c any difference in passing the variable via SYSIN or UITLITYF.
Can any body let me know wats the exact difference.
Thanks,
-Kapil. |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
we can pass the data in two ways from our jcll to cobol program .
one is using parm parameter ,but one restriction in this is we can send max of 100 characters only by using this parm parameter.
anothr way is by using instream data in jcl we can pass the data from our jcl to cobol program . there is no restriction in this we can send much data. |
|
Back to top |
|
|
Help-Me-Out
New User
Joined: 09 Dec 2006 Posts: 56 Location: Pune
|
|
|
|
Hi chandracdac,
Can you explain the second way by giving example/JCL. |
|
Back to top |
|
|
|