MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Passing Run-Time Options to IKJEFT01

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Nov 16, 2005 12:05 pm    Post subject: Passing Run-Time Options to IKJEFT01 Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Nov 16, 2005 12:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Nov 16, 2005 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 16, 2005 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Nov 16, 2005 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 16, 2005 4:47 pm    Post subject: Reply with quote

Can you show what you've done?
Back to top
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Nov 16, 2005 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 16, 2005 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Nov 17, 2005 8:57 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Nov 17, 2005 10:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Nov 17, 2005 10:09 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Nov 17, 2005 1:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Nov 17, 2005 2:23 pm    Post subject: Reply with quote

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. Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group