View previous topic :: View next topic |
Author |
Message |
ssd Beginner
Joined: 24 Mar 2006 Posts: 25 Topics: 10
|
Posted: Mon Aug 20, 2007 3:58 am Post subject: Calling COBOL DB2 program from rexx |
|
|
I am looking for a sample piece of code that would illustrate calling of COBOL DB2 program from an rexx exec. Can anyone help ? |
|
Back to top |
|
 |
acevedo Beginner

Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Mon Aug 20, 2007 6:37 am Post subject: |
|
|
without db2
Code: |
"CALL '"llib"("PGM")' parms
|
with db2
Code: |
queue "run program ("pgm") parms('"parameters"')"
queue "end"
address tso "dsn system("ssid")"
|
|
|
Back to top |
|
 |
ssd Beginner
Joined: 24 Mar 2006 Posts: 25 Topics: 10
|
Posted: Mon Aug 20, 2007 10:59 am Post subject: |
|
|
Acevedo,
I tried as you had suggested. The program executed Successfully
But a system dump was produced at the end of execution and my TSO session automatically logged off ? What is wrong here ?
Code: |
CEE0374C CONDITION=CEE3250C TOKEN=00040CB2 61C3C5C5 00000000
WHILE RUNNING PROGRAM WFMSGD01
AT THE TIME OF INTERRUPT
PSW 078D1000 95236F86
GPR 0-3 40000000 40000064 952C4189 00000064
GPR 4-7 152C4189 FFFFFFFF 152D40B8 152CC0B8
GPR 8-B 152C40B8 152C0100 15233144 15236FD0
GPR C-F 15236F30 15236FD0 95235728 00000000
IEA995I SYMPTOM DUMP OUTPUT
USER COMPLETION CODE=0100
TIME=11.54.59 SEQ=15928 CPU=0000 ASID=01BE
PSW AT TIME OF ERROR 078D1000 95236F86 ILC 2 INTC 0D
ACTIVE LOAD MODULE ADDRESS=15233000 OFFSET=00003F86
NAME=WFMSGD01
DATA AT PSW 15236F80 - 00181610 0A0D1813 410000C0
GR 0: 00000000_40000000 1: 00000000_40000064
2: 00000000_952C4189 3: 00000000_00000064
4: 00000000_152C4189 5: 00000000_FFFFFFFF
6: 00000000_152D40B8 7: 00000000_152CC0B8
8: 00000000_152C40B8 9: 00000000_152C0100
A: 00000000_15233144 B: 00000000_15236FD0
C: 00000000_15236F30 D: 00000000_15236FD0
E: 00000000_95235728 F: 00000010_00000000
END OF SYMPTOM DUMP
IKJ56470I LAST STEP COMPLETION CODE WAS USER 0100
C: 00000000_15236F30 D: 00000000_15236FD0
E: 00000000_95235728 F: 00000010_00000000
END OF SYMPTOM DUMP
IKJ56470I LAST STEP COMPLETION CODE WAS USER 0100 |
|
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Aug 20, 2007 11:18 am Post subject: |
|
|
ssd,
Did you change the bold item values in the code? SSID should be your DB2 region ID. parameters are your plan name and any other parm you need to pass to the program
Quote: |
queue "run program ("pgm") parms('"parameters"')"
queue "end"
address tso "dsn system("ssid")"
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
ssd Beginner
Joined: 24 Mar 2006 Posts: 25 Topics: 10
|
Posted: Mon Aug 20, 2007 11:32 pm Post subject: |
|
|
Kolusu,
As mentioned in the previous post , the program executed successfully (and produced the desired output), meaning I had given the correct parameters and the subsystem ID.
I was partially able to find out the reason for the dump and the subsequent logoff which is explained below:
In my DB2 program I am creting a dynamic file.
Whenever I run the rexx exec without deleting the dynamic file created on the previous instance the dump and the logoff happens.
But my opinion is that this shouldnt happen unless otherwise the error is serious enough to terminate a mainframe session.
Any explanation as to why this happened ?
Thanks
SSD |
|
Back to top |
|
 |
|
|