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 

TSO SUBMIT and JOBCHAR

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
southskies
Beginner


Joined: 14 Jul 2008
Posts: 9
Topics: 4

PostPosted: Tue Dec 14, 2010 9:38 am    Post subject: TSO SUBMIT and JOBCHAR Reply with quote

Hi,

If a jobs is submitted via the TSO SUBMIT <dsn> JOBCHAR(xy), is there any way that the value of the JOBCHAR parameter can be identified in the JCL at all? Is it given a variable name by any chance?

Within a PROC in the JCL I wish to pass this value. Looking for a simple solution, not wanting one using REXX or Skels. Simplicity is the key here. Our site has not been configured to have the correct value of &JOBNAME either - it is incorrectly set to have a value of JES2, not the actual job name Sad

Thanks,

Steve
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Dec 14, 2010 2:23 pm    Post subject: Reply with quote

southskies,

AFAIK it is not possible to use a symbol for the Jobname. Why can't you generate the Jobcard before submitting the job?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
southskies
Beginner


Joined: 14 Jul 2008
Posts: 9
Topics: 4

PostPosted: Tue Dec 14, 2010 6:09 pm    Post subject: Reply with quote

Hi Kolusu,

The jobname wasn't really the issue. I was wanting to be able to test or use the value of JOBCHAR in my job.

If it can't be tested, then why on earth was this functionality invented? To submit the same job over and over without altering any of the processing in the job? bonk

Steve
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Dec 14, 2010 6:28 pm    Post subject: Reply with quote

southskies wrote:
Hi Kolusu,

The jobname wasn't really the issue. I was wanting to be able to test or use the value of JOBCHAR in my job.

If it can't be tested, then why on earth was this functionality invented? To submit the same job over and over without altering any of the processing in the job? bonk

Steve


Oh if you just want the jobname then it is very easy.


With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can now use DFSORT's new JP1 Symbols to pass parms to sort like shown below

Code:

//STEP0100 EXEC PGM=SORT,PARM='JP1"&JOBNAME"'
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD *                               
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                               
  SORT FIELDS=COPY                           
  OUTFIL REMOVECC,                           
  TRAILER1=('THE JOBNAME IS : ',JP1)         
//*


If you don't have the PTF installed you can use the following method using symnames.

Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//SYMNAMES DD *                             
CURRJOB,S'&JOBNAME'                         
//SORTIN   DD *                             
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  OUTFIL REMOVECC,                         
  TRAILER1=('THE JOBNAME IS : ',CURRJOB)   
//*


The output will be 80 byte file with the following contents.

Code:

THE JOBNAME IS : xxxxxxx

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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