Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Appending Date as LLQ, JCL error->wrong use of '&'

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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Mar 01, 2007 10:51 pm    Post subject: Appending Date as LLQ, JCL error->wrong use of '&'
Reply with quote

To append the system date as LLQ(Low Level Qualifier) I used the following JCL

This JCL is terminating due to a JCL error, showing the JESYSMSG as pasted below.

Please suggest, some remedy for this.

Code:

//BKUP     EXEC PGM=FILEAID,REGION=3M         
//*                                           
//DD01     DD  DSN=HLQ.FIRST.FILE,         
//             DISP=SHR                       
//*                                           
//DD01O    DD  DSN=HLQ.FIRST.FILE.D&LYYMMDD,
//             DISP=(NEW,CATLG,DELETE),       
//             DATACLAS=NONSTD,               
//             STORCLAS=DEFAULT,               
//             BLKSIZE=27920,                 
//             LIKE=HLQ.FIRST.FILE         


-----------------------------------------------------------------------
JESYSMSG
STMT NO. MESSAGE
4 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD
******************************* BOTTOM OF DATA **************




I used one more JCL for the same purpose, JCL is

Code:
             
//*                                                             
//STEP001  EXEC UCC11RMS,PARM=F                                 
//*                                                             
//STEP002  EXEC PGM=EZACFSM1                                   
//SYSOUT   DD SYSOUT=(*,INTRDR)                                 
//SYSIN    DD *,DLM=AA                                         
//JOB2 JOB (@),MSGCLASS=T,CLASS=R,NOTIFY=@,REGION=32M,
//       MSGLEVEL=(1,1)                                         
//STEPK1   EXEC PGM=IEBGENER                                   
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT   DD *                                                 
//SYSUT1   DD  DISP=SHR,DSN=HLQ.FIRST.FILE                 
//SYSUT2   DD  DSN=HLQ.D&LYYMMDD,                           
//             DISP=(NEW,CATLG,DELETE),                         
//             SPACE=(TRK,(1,1),RLSE),                         
//             UNIT=SYSDA,                                     
//             DSORG=PS,                                       
//             LRECL=80,
//             RECFM=FB
//SYSIN   DD  DUMMY     
AA                     


BUT GETTING THE SAME MSG FOR JOB2

MSG IS:
STMT NO. MESSAGE
6 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD

Please advice.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 01, 2007 11:17 pm    Post subject:
Reply with quote

Hello,

The &LYYMMDD is a system symbolic. The use of system symbolics is not supported by batch jobs.

When the JCL is parsed, the & signifies a symbolic parameter - not the same thing as a system symbolic.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Mar 02, 2007 12:45 am    Post subject: Re: Appending Date as LLQ, JCL error->wrong use of '&
Reply with quote

Two options to try:

1. Change this line:
Code:

//SYSIN    DD *,DLM=AA                                         


to this line:
Code:

//SYSIN    DD DATA,DLM=AA                                         


2. ONLY create the SYSUT2 DD statement, and not the rest of the JCL.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 02, 2007 2:39 pm    Post subject:
Reply with quote

Hi Superk,

I changed the Code:

//SYSIN DD *,DLM=AA

to
//SYSIN DD DATA,DLM=AA

But it gives the following error msg:

23.13.19 JOB35856 $HASP165 JOB1 ENDED AT ADC1 MAXCC=0 CN(INTERNAL)
23.13.19 JOB35859 $HASP165 JOB2 ENDED AT ADC1 - JCL ERROR CN(INTERNAL)

JESYSMSG
STMT NO. MESSAGE
4 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD

JOB1 & JOB2 are same as from my previous post.

One more thing..

2. ONLY create the SYSUT2 DD statement, and not the rest of the JCL.

By above post from your mailm what you want me to do actually..I did not get you.

if You want me to run JOB2 only then I did that..but got the same error.

Please suggest.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 02, 2007 3:38 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

The &LYYMMDD is a system symbolic. The use of system symbolics is not supported by batch jobs.

When the JCL is parsed, the & signifies a symbolic parameter - not the same thing as a system symbolic.



Thanks for correcting me.

Could you please suggest me some good way of appending Date.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Mar 03, 2007 9:16 am    Post subject:
Reply with quote

Hello Anuj ,

These are most likly not the answers you would prefer, but please consider them.

From my experience, putting "today's-date" in the dataset name is not a good practice. Although it "is not supposed to happen", everywhere i've been found themselves in the situation that the job had to run for a second time that "day". This lead to some extra work just to be able to submit the job. If the dataset was defined as a gdg, there would be no issue of trying to "get the date" into the dsn. It also makes the problem of a second run go away. If you want the file from "yesterday" you need only specify (-1) not come up with the actual date and plug it into some jcl.

If you must include the date in the dsn, one easy way is to write a little program that creates either the run jcl or a proc execution "on the fly", inserting the date in the dsn or as a parm as appropriate. This program would write the created jcl to the internal reader and end. The real job would then run with the current date "available".

Please post back if you'd like any more info.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us