View previous topic :: View next topic
|
Author |
Message |
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
Does any one know how to call INZUTILB utility in rexx? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
If youn REXX exec is running in a TSO address space, then, from what I can tell, you'd do it the same way you would from a TSO prompt. |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
thnx. I was trying this command
ADDRESS TSO
"CALL 'DB2D.PSYSB.P.D01G.SINZLINK(INZUTILB)' 'D01G' "
SAY 'RC AFTER CALL' RC
but getting rc=16.
I have allocated this library to steplib also but no luck. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
yes i did. Please find my code below.
DSN1 = 'R008534.DEXTB.HELLOT1';
DSN2 = 'R008534.DEXTB.HELLOT2';
DSN4 = 'R008534.DEXTB.HELLOT4';
DSN3 = 'R008534.DEXTB.HELLOT3';
K = SYSDSN("'"DSN1"'")
IF K = 'OK' THEN
"ALLOC DD(SYSIN) DA('"DSN1"') SHR REUSE"
ELSE
"ALLOC DD(SYSIN) DA('"DSN1"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN2"'")
IF K = 'OK' THEN
"ALLOC DD(SYSPRINT) DA('"DSN2"') SHR REUSE"
ELSE
"ALLOC DD(SYSPRINT) DA('"DSN2"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN3"'")
IF K = 'OK' THEN
"ALLOC DD(MYOUT) DA('"DSN3"') SHR REUSE"
ELSE
"ALLOC DD(MYOUT) DA('"DSN3"') NEW DSORG(PS)",
"CYL RECFM(F B) LRECL(80) SPACE(500,500)";
SAY 1
SAY 2
SQL.1 = "UNLOAD TABLESPACE CAADB026.CAATS399 "
SQL.2 = " DB2 NO "
SQL.3 = " QUIESCE NO QUIESCECAT NO "
SQL.4 = " LOCK NO "
SQL.5 = " SELECT "
SQL.6 = " MSG_ID "
SQL.7 = " ,VERSION_ID "
SQL.8 = " ,INPUT_OUTPUT_IND "
SQL.9 = " FROM CAADB026.CAA_MSG_SIM "
SQL.10= "OUTDDN (MYOUT) "
SQL.11= "FORMAT DSNTIAUL "
SQL.0 = 11
SAY 3
"EXECIO * DISKW SYSIN (STEM SQL. FINIS)"
ADDRESS TSO
DSN6= 'DB2D.PSYSB.P.D01G.SINZLINK('||INZUTILB||')'
"CALL '"DSN6"' 'D01G'"
SAY 'RC AFTER CALL' RC
SAY 123
"FREE F(SYSIN SYSPRINT MYOUT )";
exit |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What is shown when you run a trace? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Did you get this to work in Batch (without rexx)?
I would try to do that first.
I would also make sure all the DDs required in batch are allocted in your rexx. |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
Other than this i dont see any error
>O> "CALL 'DB2D.PSYSB.P.D01G.SINZLINK(INZUTILB)' 'D01G'"
+++ RC(16) +++ |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
It works in batch but i want to run this utility using Rexx. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
So what does your JCL for your batch run look like?
Does the results of the run show in one of the DDs there?
What does the results in the same DD look like in you Rexx run?
Do you get where I am going with this? |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
Yes. When i submit through jcl i use PGM=INZUTILB and it works fine.
But when i call the same program though rexx it gives me some error.
I think since INZUTILB is assembly langauge program rexx is giving some error(not sure).
The below is my batch jcl
//CAAPS010 EXEC PGM=INZUTILB,REGION=0M,DYNAMNBR=99,
// PARM='D01G'
//*
//STEPLIB DD DSN=DB2D.PSYSB.P.D01G.SINZLINK,DISP=SHR
// DD DSN=DB2D.PSYSB.P.D01G.SDSNEXIT,DISP=SHR
// DD DSN=DB2D.PSYSB.P.D01G.SDSNLOAD,DISP=SHR
//*
//MYOUT DD DSN=R008534.SEXTB.CAAHPU05.DB18.TC01,
// DISP=(NEW,CATLG,KEEP),
// SPACE=(CYL,(500,500),RLSE),
// UNIT=SYSDA,BUFNO=30
//*
//*
//SYSPRINT DD DSN=R008534.DEXTB.HELLOT2,DISP=SHR
//SYSIN DD DSN=R008534.DEXTB.HELLOT1,DISP=SHR |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Make sure your STEPLIB DD is allocated to all three libraries above.
Try changing your call to "CALL *(INZUTILB)" |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
it didnt work. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Then you'd best fix it. . .
If you want help, you cannot post "if didn't work". This is just a waste of everyone's time.
Post the code that fails but has the proper steplib datasets allocated. |
|
Back to top |
|
|
Venkat1001
New User
Joined: 25 Feb 2008 Posts: 12 Location: chennai
|
|
|
|
Please find my code below. I am also attaching the trace
Code: |
/* REXX */
TRACE '?i'
DSN1 = 'R008534.DEXTB.HELLOT1';
DSN2 = 'R008534.DEXTB.HELLOT2';
DSN3 = 'R008534.DEXTB.HELLOT3';
DSN4 = 'R008534.DEXTB.HELLOT4';
DSN5 = 'R008534.DEXTB.HELLOT9';
DSN6 = 'R008534.DEXTB.HELLOT6';
DSN7 = 'R008534.DEXTB.HELLOT7';
DSN8 = 'R008534.DEXTB.HELLOT8';
DSN9 = 'R008534.DEXTB.HELLOT9';
K = SYSDSN("'"DSN1"'")
IF K = 'OK' THEN
"ALLOC DD(SYSIN) DA('"DSN1"') SHR REUSE"
ELSE
"ALLOC DD(SYSIN) DA('"DSN1"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN2"'")
IF K = 'OK' THEN
"ALLOC DD(SYSPRINT) DA('"DSN2"') SHR REUSE"
ELSE
"ALLOC DD(SYSPRINT) DA('"DSN2"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN3"'")
IF K = 'OK' THEN
"ALLOC DD(MYOUT) DA('"DSN3"') SHR REUSE"
ELSE
"ALLOC DD(MYOUT) DA('"DSN3"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN5"'")
IF K = 'OK' THEN
"ALLOC DD(SYSTSPRT) DA('"DSN5"') SHR REUSE"
ELSE
"ALLOC DD(SYSTSPRT) DA('"DSN5"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN6"'")
IF K = 'OK' THEN
"ALLOC DD(SYSDBOUT) DA('"DSN6"') SHR REUSE"
ELSE
"ALLOC DD(SYSDBOUT) DA('"DSN6"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN7"'")
IF K = 'OK' THEN
"ALLOC DD(SYSOUT) DA('"DSN7"') SHR REUSE"
ELSE
"ALLOC DD(SYSOUT) DA('"DSN7"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
K = SYSDSN("'"DSN8"'")
IF K = 'OK' THEN
"ALLOC DD(SYSUDUMP) DA('"DSN8"') SHR REUSE"
ELSE
"ALLOC DD(SYSUDUMP) DA('"DSN8"') NEW DSORG(PS)",
"RECFM(F B) LRECL(80) SPACE(1,1)";
SQL.1 = " UNLOAD TABLESPACE CAADB026.CAATS399 "
SQL.2 = " DB2 NO "
SQL.3 = " QUIESCE NO QUIESCECAT NO "
SQL.4 = " LOCK NO "
SQL.5 = " SELECT "
SQL.6 = " MSG_ID "
SQL.7 = " ,VERSION_ID "
SQL.8 = " ,INPUT_OUTPUT_IND "
SQL.9 = " FROM CAADB026.CAA_MSG_SIM "
SQL.10= " OUTDDN (MYOUT) "
SQL.11= " FORMAT DSNTIAUL "
SQL.11= " FORMAT DSNTIAUL "
SQL.0 = 11
"EXECIO * DISKW SYSIN (STEM SQL. FINIS)"
"CALL *(INZUTILB) 'D01G'"
SAY 'RC AFTER CALL' RC
"CALL *(INZUTILB) "
SAY 'RC AFTER CALL' RC
"FREE F(SYSIN SYSPRINT MYOUT SYSUDUMP SYSTSPRT SYSDBOUT SYSOUT )"
exit |
|
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
"STEPLIB ('DB2D.PSYSB.P.D01G.SINZLINK' " ||,
"'DB2D.PSYSB.P.D01G.SDSNLOAD' " ||,
"'DB2D.PSYSB.P.D01G.SDSNEXIT' ) "
|
Does this command really allocate your steplib?
I have never seen it done that way.
I have a feeling this may be part of your problem.
Your allocate to steplib needs to be done the same way you are allocating your other DDs.
Please use code tag in the future for all input and output. See how nice this sample looks:
Code: |
* REXX */
/*"ISPEXEC CONTROL ERRORS RETURN"*/
TRACE '?i'
ADDRESS TSO
"STEPLIB ('DB2D.PSYSB.P.D01G.SINZLINK' " ||,
"'DB2D.PSYSB.P.D01G.SDSNLOAD' " ||,
"'DB2D.PSYSB.P.D01G.SDSNEXIT' ) "
SAY RC
DSN1 = 'R008534.DEXTB.HELLOT1';
DSN2 = 'R008534.DEXTB.HELLOT2';
DSN3 = 'R008534.DEXTB.HELLOT3';
DSN4 = 'R008534.DEXTB.HELLOT4';
DSN5 = 'R008534.DEXTB.HELLOT9';
DSN6 = 'R008534.DEXTB.HELLOT6';
DSN7 = 'R008534.DEXTB.HELLOT7';
DSN8 = 'R008534.DEXTB.HELLOT8';
DSN9 = 'R008534.DEXTB.HELLOT9';
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Does this command really allocate your steplib?
I have never seen it done that way. |
I've not either.
Something to consider is that just because "something" results in an rc=0, this does not mean the "thing" did what was wanted. . . It was merely acceptable (or not rejected) by the system. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
What part of this did you not understand.
"Make sure your STEPLIB DD is allocated to all three libraries above"
Code: |
"ALLOC FI(STEPLIB) DA('DB2D.PSYSB.P.D01G.SINZLINK',",
"'DB2D.PSYSB.P.D01G.SDSNEXIT',",
"'DB2D.PSYSB.P.D01G.SDSNLOAD')",
" SHR REUSE" |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the steplib <thing> might be a legal command...
there are add on tools some of them free other for a fee
that provide a dynamic steplib facility.
You cannot allocate a steplib under TSO
the steplib is allocated before the program in the stepp gets executed
to allocate dynamically a steplib there is quite a bit od control block mangling to be done
but if the tool is written in the proper way it works very well.
so
Code: |
Address TSO "STEPLIB ('DB2D.PSYSB.P.D01G.SINZLINK' " ||,
"'DB2D.PSYSB.P.D01G.SDSNLOAD' " ||,
"'DB2D.PSYSB.P.D01G.SDSNEXIT' ) " |
might work
Code: |
"ALLOC FI(STEPLIB) DA('DB2D.PSYSB.P.D01G.SINZLINK',",
"'DB2D.PSYSB.P.D01G.SDSNEXIT',",
"'DB2D.PSYSB.P.D01G.SDSNLOAD')",
" SHR REUSE" |
certainly not!
www.tsotimes.com/articles/current/summer04/TSO_Times_Tips.htm
gsf-soft.com/Products/STEPLIB.shtml
www.cbttape.org/ftp/cbt/CBT452.zip |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is this rexx to run under tso in batch?
If it is, the tso joblib/steplib could be changed to include these datasets. |
|
Back to top |
|
|
|