IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem with parameter PARM


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
Search our Forums:

Back to Top