View previous topic :: View next topic |
Author |
Message |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Nov 16, 2005 12:05 pm Post subject: Passing Run-Time Options to IKJEFT01 |
|
|
I am trying to get a storage report for a DB2 job that runs under IKJEFT01. I am able to get it by using the option "PARMS=(/RPTSTG)" within the DSN statement but I would really like to define it on the EXEC statement as "EXEC IKJEFT01,PARM='/RPTSTG'". When I do this, I get an error. Does anyone know how to pass run-time options directly to IKJEFT01? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Wed Nov 16, 2005 12:27 pm Post subject: |
|
|
Bithead,
As far as I Know , if it is DB2 process, you cannot directly pass parms to IKJEFT01 on a exec statement.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Nov 16, 2005 2:53 pm Post subject: |
|
|
I am trying to apply the option to a number of processes and I was hoping I could change the procedure. Thanks Kolusu. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Nov 16, 2005 4:41 pm Post subject: |
|
|
Wen you start TSO (IKJEFT01), you can pass parameters on the PARM statement. The parameter is the name of the initial command you want to execute. So you should be able to create a Rexx exec that just takes a parameter and runs the commands you want to run. So something like this... Code: |
// EXEC PGM=IKJEFT01,PARM='%YOURCMD /RPTSTG'
//SYSEXEC DD ...dsn of PDS containing YOURCMD...
| Member yourcmd: Code: | /* REXX */
Say arg(1) /* or whatever you want to do with the parameter */ |
or if Rexx doesn't work for some reason, then CLIST (in SYSPROC instead of SYSEXEC) Code: | PROC 1 PARM
WRITE &PARM /* or whatever...
|
Last edited by semigeezer on Wed Nov 16, 2005 4:46 pm; edited 1 time in total |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Nov 16, 2005 4:45 pm Post subject: |
|
|
Semigeezer - it doesn't seem to work with DB2, probably because the PARM is considered as another source for SYSIN. When I try it, I get "IKJ56621I INVALID COMMAND NAME SYNTAX". |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Nov 16, 2005 4:47 pm Post subject: |
|
|
Can you show what you've done? |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Nov 16, 2005 4:52 pm Post subject: |
|
|
Code: |
//DB2TMP PROC DB2SYS='DB2'
//TMPEXEC EXEC PGM=IKJEFT01,PARM='/RPTSTG'
//STEPLIB DD DSN=DSN=&DB2SYS..DSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DDNAME=CTLCARDS
//SYSTSIN DD DDNAME=TSOCTRL
// PEND
//*
//PROGRAM1 EXEC DB2TMP,DB2SYS=DB2T
//TSOCTRL DD *
DSN SYSTEM(DB2T)
RUN PROGRAM(PROGRAM1) PLAN(PROGRAM1) LIB('MY.LOADLIB')
END
/*
//
|
|
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Nov 16, 2005 5:13 pm Post subject: |
|
|
You are trying to execue the command /RPTSTG which is not valid TSO command name syntax.
I've never used the DSN command though I know it has some odd behaviours. I don't know how you'd pass it bsically 2 parameters. Maybe some form of TSO's CALL command (within a called CLIST or exec). How does this get invoked not using TSO? |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Nov 17, 2005 8:57 am Post subject: |
|
|
I am trying to get Language Environment Storage Reports for DB2 jobs without modifying the jobs themselves. I can run the jobs in test but the resources are not allocated the same as production. I would like to modify the global parameters and I am trying to run a baseline. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Nov 17, 2005 10:04 am Post subject: |
|
|
I understand what you are trying to do, but what does a sample job that pases the LE parms look like? If I understand how it looks in JCL, I might be able to give you a similar method for use in TSO. |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Nov 17, 2005 10:09 am Post subject: |
|
|
Here is my COBOL sample JCL using "Hello World":
Code: |
//HWORLD EXEC PGM=HWORLD PARM='/RPTOPTS(ON)'
//STEPLIB DD DSN=MY.PGMLIB,DISP=SHR
//OUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
|
(Note that I missed the (ON) from the code I gave for the TSO sample). |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Nov 17, 2005 1:45 pm Post subject: |
|
|
I can't try to help without sufficient information. I know how to pass parameters to a program in JCL. How does this work with the DSN command? There must be a program you are invoking, and are there then inline control statements? What does a job that invokes DSN statements look like?
You need to simulate exactly what is being done in JCL from within the TSO TMP. That can be done in several ways (TSO CALL command, ISPF's SELECT PGM() PARM() commands, SELECT CMD() followed by SELECT PGM() if using ISPLLIB, assembler calls to IKJTSR, etc) but without knowing how the DSN command is really invoked from JCL, I can't suggest a method of invocation that will be the same as in JCL but from within TSO instead.
Without knowing the exact environment, I'd suggest
Add all necessary program libraries to STEPLIB (not ISPLLIB) and invoke ISPF in batch, then call a CLIST that uses ISPEXEC SELECT PGM(...) PARM(/RPTOPTS(ON)) to call the program that processes the DSN command. I say this because ISPEXEC SELECT PGM() sets up register 1 to point to the same type of parameter list that JCL's PARM= clause creates. The problem with the DSN command (and I don't even know what DSN does) is that it uses dynamic calls that must be in STEPLIB to work under ISPF. If you get S806 abends, then that is probably the problem.
I can't gaurentee that this will work, but it is my best guess. |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Nov 17, 2005 2:23 pm Post subject: |
|
|
I found a reference on passing run-time parameters to application running under batch TSO and it involves use of the CALL statement which defeats the object. If I need to change the format of the program invocation, I may as well code the PARMS() statement.
I don't think I will be able to do what I wanted so I will have to fall back on running applications out of test.
semigeezer, thanks for your help but I don't think that I can persue this any further.  |
|
Back to top |
|
 |
|
|