Results 1 to 2 of 2

Thread: call dsntep2

  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Unanswered: call dsntep2

    Has anyone called DSNTEP2 from a program (assembler or cobol) not REXX? From REXX it is easy.

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •