Using an ampersand in JCL

15 pts.
Tags:
Date in JCL
JCL
Job Control Language
Programming Languages
Does anyone know how to handle 2 &'s together in a JCL ?? I mean in my jcl after replacement of my variables, it is coming like '&&'. No errors on jj but run time error 'Incorrect use of ampersand' !! Please reply asap, urgent requirement. Thanks!!

Answer Wiki

Thanks. We'll let you know when a new response is added.

Generally a single ampersand is used for a variable.
example:
001150 // SET PARM1=’some.dataset’
—-
//JCLIN DD DSN=&PARM1.,DISP=SHR

Two ampersands can be used for a temporary dataset.
example:
002500 //SYSUT1 DD DSN=&&WORK,SPACE=(CYL,(5,5)),UNIT=DASD

You state “in my jcl after replacement of my variables, it is coming like ‘&&’. ”

What does your JCL look like? Can you show me the line or two involved ? What it looks like before submitting the job and what it looks like after submitting the job?

You aren’t by chance trying to replace a parm with a value that contains an ampersand, are you?

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Ankurshankdhar
    yes, I was trying to do the later one. But got the solution after a lot of hit and trials. I achieved what I wanted to, thru OPC. My basic requirement was to include the current date in my dataset name. Thanks for your effort, I really appreciate it. :)
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following