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