If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > call dsntep2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-05, 16:58
prism321 prism321 is offline
Registered User
 
Join Date: Dec 2005
Posts: 1
call dsntep2

Has anyone called DSNTEP2 from a program (assembler or cobol) not REXX? From REXX it is easy.
Reply With Quote
  #2 (permalink)  
Old 01-03-06, 10:54
jongdel jongdel is offline
Registered User
 
Join Date: Jan 2006
Location: Zeist - the Netherlands
Posts: 3
The call is easy: (in assembler)
...
LINK EP=DSNTEP2,PARAM=(NULL),VL=1
..
NULL DC H'0' * simulate no JCL parm
..
END
But you have to fill the SYSIN with the desired SQL and allocate SYSPRINT in the JCL

And....
You have to execute it under IKJEFT1A, like this:
//GO EXEC PGM=IKJEFT1A
//STEPLIB DD DISP=SHR,DSN=xxx.LOAD
//SYSTSIN DD *
DSN S(dsn)
RUN PROG(prog) PLAN(DSNTEP2)
//SYSIN DD *
some sql statement' ;
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*

Alternativly you can connect to DB2 with CAF and then call DSNTEP2. But then, i think you have to relink DSNTEP2 with an other DB2 stub. Hope this helps.
Leo
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On