MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calling COBOL DB2 program from rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
ssd
Beginner


Joined: 24 Mar 2006
Posts: 25
Topics: 10

PostPosted: Mon Aug 20, 2007 3:58 am    Post subject: Calling COBOL DB2 program from rexx Reply with quote

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
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Mon Aug 20, 2007 6:37 am    Post subject: Reply with quote

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
View user's profile Send private message
ssd
Beginner


Joined: 24 Mar 2006
Posts: 25
Topics: 10

PostPosted: Mon Aug 20, 2007 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 20, 2007 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ssd
Beginner


Joined: 24 Mar 2006
Posts: 25
Topics: 10

PostPosted: Mon Aug 20, 2007 11:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group