View previous topic :: View next topic
|
Author |
Message |
Sasi Kiran Patha Warnings : 2 New User
Joined: 19 Nov 2006 Posts: 73 Location: Hyederabad
|
|
|
|
Hi ,
Im new to Rexx and CLIST.
Can a COBOL program execution be invoked using Clist command like "TSO ----"
If Yes can we pass parameters that the program requires and
the store the output of the program in any file.
The COBOL program accesses Db2 tables.
Regards,
Sasi Patha. :-) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Usually, you invoke DB2 programs using the RUN command, which is actually a subcommand of TSO's DSN command.
You can invoke the DSN command just as you invoke any other TSO command from within REXX (same as ALLOCATE, FREE etc.).
O. |
|
Back to top |
|
|
venkatesh.nayak
New User
Joined: 07 Jan 2007 Posts: 3 Location: Bangalore
|
|
|
|
If you want to execute a COBOL+ DB2 progra using REXX then you need to follow th ebelow steps.
1. Code the REXX Program as
PARSE VALUE v1 v2 v3 with r1 r2 r3
ADDRESS ISPEXEC "EDIT DATASET (<JCL member location>) MACRO(abcde)
wher 'abcde' is a clist member which may conatins SUBMIT command and/or change command if you want to change parameters inside the JCL.
2. execute the REXX code using EXEC command
But prerequisite is your JCL should do PC, Compile, LKED & Bind operations. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
venkatesh.nayak -
Why do you have to use JCL in order to run a program?
O. |
|
Back to top |
|
|
Sasi Kiran Patha Warnings : 2 New User
Joined: 19 Nov 2006 Posts: 73 Location: Hyederabad
|
|
|
|
Hi,
I did not mention i need JCL. I wanted to execute a program which
can be invoked from REXX. I did not know how to proceed.
This idea could be useful for testing in Test(development) regions.
especially to prepare a test case. If we can pass a few input parameters
the output will be helpful in preparing the test case parameters.
its going for automation rather that going through all the Db2 tables
and then determining the test case.
Regards,
Sasi Patha. |
|
Back to top |
|
|
venkatesh.nayak
New User
Joined: 07 Jan 2007 Posts: 3 Location: Bangalore
|
|
|
|
Hi
Please do let you clarify one thing to me
1. Do you want to execute a COBOL + DB2 program which inturn called/invoked by REXX program directly?
- I have no idea
2. Do you want to execute the JCL which inturn execute the COBOL + DB2 program?
- if so we can do by this way.
/* Rexx */
"concatc sysproc USERID.MACRO.CLIST TOP"
PARSE VALUE v1 v2 v3 with r1 r2 r3
ADDRESS ISPEXEC "EDIT DATASET ('userid.program.cobol(coboldb2)' ) MACRO(sumbitjob)
Exit
/* End of Rexx Program */
USERID.MACRO.CLIST (submitjob)
SUB
1. here using PARSE VALUE command you can pass the value to your JCL i.e. passing a few input parameters. v1, v2, v3 are the values that you wish to pass it on to job where as r1 r2 r3 are recieving variable in JCL
2. CLIST member submitjob should have contain "SUB" tso command.
3. After all this, issue EXEC command on command line
Please revert back to me if you have not clear with this replay.
Thanks,
Venkatesh
919448450590 |
|
Back to top |
|
|
|