View previous topic :: View next topic
|
Author |
Message |
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Any input would be appreciated. Thanks. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
How do you invoke your COBOL program without rexx? |
|
Back to top |
|
|
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Here is a CLIST example executing Cobol/DB2:
DSN SYSTEM(DSN1)
DATA
RUN PROGRAM(TESTDSJG) PLAN(TESTPLAN) LIB('DB2DBA.DBA.BTCHLOAD')
END
ENDDATA
Here is a sample from JCL:
DSN SYSTEM(DSN1)
RUN PROGRAM(TESTDSJG) PLAN(TESTPLAN) LIB('DB2DBA.DBA.BTCHLOAD')
END
I just can't seem to figure out how to call this Cobol/DB2 program from a Rexx exec. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is the rexx to wait on the cobol program to complete? Is the rexx to have interaction with the cobol program?
If there is no interaction between the rexx code and the cobol program, you might just submit the cobol program to run in batch?
If the cobol program must run as part of the online session (Clarification please), you might invoke a little clist (from rexx) to execute the cobol program (surely less than elegant<g>). |
|
Back to top |
|
|
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Dick,
Yes I need the Rexx to wait until the Cobol program completes. Is that possible? If I invoke a clist that executes the cobol program do I have the ability to pass information between the rexx, clist and cobol program? Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Yes I need the Rexx to wait until the Cobol program completes. Is that possible? |
Yes - actually, unless some provision was made to do otherwise, the rexx would wait until control was returned to the rexx.
You can pass info from the rexx to the clist. . .
Currently, how do you pass a parm from a clist to a cobol/db2 program? |
|
Back to top |
|
|
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Dick,
I need to be able to pass parms from a rexx exec to a clist to a cobol/db2 program and back.
When I call the clist from rexx I use this command:
ADDRESS TSO "EXEC 'DB2DBA.DBA.REXX.CLIST(DB2REXXE)' CLIST"
I think I can add what I want to pass on the end like this:
ADDRESS TSO "EXEC 'DB2DBA.DBA.REXX.CLIST(DB2REXXE)' CLIST" 'parm1 parm2'
Then I will execute the cobol/db2 program from the clist like this:
PROC 2 parm1 parm2
DSN SYSTEM(DSN1)
DATA
RUN PROGRAM(TESTDSJB) PLAN(TESTPLAN) LIB ('DB2DBA.DBA.BTCHLOAD') PARMS ('/parm1 parm2')
END
ENDDATA
EXIT
I will be testing my theory tomorrow. Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi David
This may be more tricky. . .
Code: |
RUN PROGRAM(TESTDSJB) PLAN(TESTPLAN) LIB ('DB2DBA.DBA.BTCHLOAD') PARMS ('/parm1 parm2')
|
is "one-way" is it not?
What "service" does the called program provide? |
|
Back to top |
|
|
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Dick,
Upon further investigation I realized I do not need to pass any information back. I have tested this process Rexx calls Clist call Cobol/DB2, I pass information from the Rexx to the Clist to the Cobol/Db2 and everything is working. Thanks for your help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi David,
Good to hear it is working - thanks for the update
d |
|
Back to top |
|
|
|