Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem with parameter PARM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Tue Oct 04, 2005 6:08 pm    Post subject: Problem with parameter PARM
Reply with quote

Hi, i need help

In my JCL use variables &JOBNAME (name of job) and &HHMMSS (the hour of execution) to create dataset. In addition, I need to pass these variables (&JOBNAME and &HHMMSS) like parameters in the PARM to execute a program but the content that passes to the program is &JOBNAME and &HHMMSS and not the value that these variables have.

//PROG EXEC PGM=REXEC,PARM=&JOBNAME&HHMMSS

?any way exists to pass the content of these variables?


I have tested another. I have recorded in dataset the content of these 2 variables, for example, CONT101125, and to put in the PARM the name of dataset but what me pass to the program is the name of dataset and not its content. ?exists any way to pass in the PARM a name of dataset but what really it goes to the program it is his content? I need to pass like parameter to a program a value that

//PROG EXEC PGM=REXEC,PARM=nombredataset
Back to top
View user's profile Send private message

Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Tue Oct 04, 2005 6:54 pm    Post subject: Re: Problem with parameter PARM
Reply with quote

You haven't mentioned where the value for the variables &JOBNAME (name of job) and &HHMMSS (the hour of execution) are supplied, so I have to assume that they are provided to your job by your job scheduling system.

I created a test job, using the SET statement to assign values to the two variables, since I don't have access to a job scheduler on the test system.

My job looks like this:

Code:

//MYJOB  JOB (...),'KEVIN',CLASS=T,MSGCLASS=X,
// MSGLEVEL=(1,1)
//*                                                         
// SET JOBNAME=MYJOB                                         
// SET HHMMSS=090000                                         
//*                                                         
//PROG EXEC PGM=REXEC,PARM=&JOBNAME&HHMMSS                   
//SYSPRINT  DD SYSOUT=*                                     
//*                                                         


The output looks like this:

Code:

1 //MYJOB  JOB (...),'KEVIN',CLASS=T,MSGCLASS=X,                 
  // MSGLEVEL=(1,1)
  //*                                                             
2 // SET JOBNAME=MYJOB                                             
3 // SET HHMMSS=090000                                             
  //*                                                             
4 //PROG EXEC PGM=REXEC,PARM=&JOBNAME&HHMMSS                       
  IEFC653I SUBSTITUTION JCL - PGM=REXEC,PARM=MYJOB090000           
5 //SYSPRINT  DD SYSOUT=*                                         
  //*                                                             
Back to top
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Tue Oct 04, 2005 9:10 pm    Post subject:
Reply with quote

Hi Kevin,

I see that your assign a value to the variables with , but to the variables &JOBNAME and &HHMMSS , I do not give value them with the SET, if not that are variable own of the JCL.

My JCL is:

//SYSNPARM SET PARM1=&JOBNAME
//SYSNPARM SET PARM2=&HHMMSS
//DOCEXEC EXEC PGM=REXEC,REGION=4M,COND=(0,LT),
// PARM='&PARM1&PARM2'


The results are:

'JOBNAME' is not recognized as an internal or external command,
operable program or batch file.
'HHMMSS' is not recognized as an internal or external command,
operable program or batch file.


It does not work correctly.

Thanks
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Tue Oct 04, 2005 11:18 pm    Post subject: Re: Problem with parameter PARM
Reply with quote

I don't know exactly what you're trying to do, but this works:

Code:

//EZACFSM1 EXEC PGM=EZACFSM1                                 
//SYSOUT   DD   SYSOUT=(*,INTRDR)                           
//SYSIN    DD   DATA,DLM=@@                                 
//MYJOB JOB (...),'KEVIN',CLASS=T,                   
// MSGCLASS=X,MSGLEVEL=(1,1)                                 
//*                                                         
//SYSNPARM SET PARM1=&JOBNAME                               
//SYSNPARM SET PARM2=&HHMMSS                                 
//*                                                         
//DOCEXEC EXEC PGM=REXEC,REGION=4M,COND=(0,LT),             
// PARM='&PARM1&PARM2'                                       
//SYSPRINT DD   SYSOUT=*                                     
@@                                                           
//*                                                         


which results is this:

Code:

1 //MYJOB JOB (...),'KEVIN',CLASS=T,
  // MSGCLASS=X,MSGLEVEL=(1,1)                                                 
  //*                                                                           
2 //SYSNPARM SET PARM1=MYJOB                                                   
3 //SYSNPARM SET PARM2=174608                                                   
  //*                                                                           
4 //DOCEXEC EXEC PGM=REXEC,REGION=4M,COND=(0,LT),                               
  // PARM='&PARM1&PARM2'                                                       
  IEFC653I SUBSTITUTION JCL - PGM=REXEC,REGION=4M,COND=(0,LT),PARM='MYJOB174608'
5 //SYSPRINT DD   SYSOUT=*                       
Back to top
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Wed Oct 05, 2005 10:30 pm    Post subject: Re: Problem with parameter PARM
Reply with quote

Thank you Kevin
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us