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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Mar 01, 2007 10:51 pm
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

Moderator Emeritus


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

PostPosted: Thu Mar 01, 2007 11:17 pm
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

Global Moderator


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

PostPosted: Fri Mar 02, 2007 12:45 am
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

Superior Member


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

PostPosted: Fri Mar 02, 2007 2:39 pm
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

Superior Member


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

PostPosted: Fri Mar 02, 2007 3:38 pm
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

Moderator Emeritus


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

PostPosted: Sat Mar 03, 2007 9:16 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top