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

How to add date in the dataset name


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

New User


Joined: 19 Apr 2007
Posts: 37
Location: Bangalore

PostPosted: Fri Jan 23, 2009 9:24 pm
Reply with quote

Hi I have to add the date in the dataset name. I am not using any scheduler for this job.

I wanted to use pure JCL to do this and tried the following JCL advised by another user in the forum. But I am getting following error.Can anyone help me out of this.

Code:

//STEP1 EXEC PGM=..
//....
//SYSUT2 DD DSN=TESTFILE,DISP(,CATLG),UNIT=SYSDA,
//       SPACE(CYL,(1,1),RLSE)
//*
//STEP2 EXEC PGM=EZACFSM1
//SYSOUT DD DSN=&&CNTL,DISP(,PASS),
// UNIT=SYSDA,SPACE(CYL,(1,1),RLSE)
//SYSIN DD *
  ALTER 'TESTFILE' +
    NEWNAME('TESTFILE.D&YR2&MON&DAY..F1')
/*
//*
//STEP3  EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN  DD  DSN=&&CNTL,DISP=(OLD,DELETE)



GETTING MAXCC 12 WITH ERROR SAYING
ALTER 'TESTFILE' -
NEWNAME('TESTFILE.D090123.F1')

IDC3211I KEYWORD 00220000 IS IMPROPER---------WHERE 00220000 IS THE LINE NUMBER TO RIGHT SIDE
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND CONDITION CODE IS 12

As you can see from the above error date is getting substituted but couldn't understand the error.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jan 23, 2009 9:36 pm
Reply with quote

What columns are 00220000 in?
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 Jan 23, 2009 9:44 pm
Reply with quote

abhishek, I added the CODE paramaters around your code, and added the IDCAMS step that you originally omitted.

As shown, that code worked fine at my site.
Back to top
View user's profile Send private message
abhishek dadhichi

New User


Joined: 19 Apr 2007
Posts: 37
Location: Bangalore

PostPosted: Wed Jan 28, 2009 10:36 am
Reply with quote

Hi Superk,

Sorry for the delayed response, I have tried the above code given by you ,but still I am getting the same error :

IDC3211I KEYWORD 00220000 IS IMPROPER---------WHERE 00220000 IS THE LINE NUMBER TO RIGHT SIDE
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND CONDITION CODE IS 12

Also, as you have said ,you have added the CODE parameter ,do you refer to the plus(+) sign by saying that?


Thanks,
Abhishek
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: Wed Jan 28, 2009 10:50 am
Reply with quote

Hello,

Quote:
you have added the CODE parameter
Kevin has "Code"ed your jcl to make it more readable (green on black) and this also preserves alignment as the font is a fixed rather than a proportional font.

"Code"ing code from a post will have nothing with being able to run the code. Also, as Kevin mentioned, your code works on his system. You need to get rid of the 00220000 and any other values in those positions.
Back to top
View user's profile Send private message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Fri Jan 30, 2009 2:51 pm
Reply with quote

Superk,

I confused with the following statement.

NEWNAME('TESTFILE.D&YR2&MON&DAY..F1')

My doubt is , where it gets the values for D&YR2&MON&DAY.

As Abhishek said , he is not using any scheduler to replace those mentioned above symbolic parameters.

Could you please explain how it works .
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 Jan 30, 2009 5:08 pm
Reply with quote

Hello,
prashanth1 wrote:
My doubt is , where it gets the values for D&YR2&MON&DAY.
Check this link on EZACFSM1: publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2
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 Jan 30, 2009 5:14 pm
Reply with quote

The EZACFSM1 program is part of TCP/IP. It is known as the "symbol translator utility". EZACFSM1 reads an input file (SYSIN) and writes to an output file (SYSOUT), translating any symbols in the process. The rest of the data that doesn't contain symbols just gets copied as-is.

The symbols it translates are the MVS built-in dynamic system symbols. A basic set is provided by IBM, and others can be created by your MVS systems programmers.

Also note that DFSORT could also easily be used to perform the same process, as well as other programs such as SAS or Easytrieve or even a CLIST or a REXX EXEC.
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Jan 30, 2009 7:47 pm
Reply with quote

Hi abhishek,

I think the problem is with the your SYSIN. I expect your dataset has NUM ON so you must be hvaing line numbers in right side also.

So if you see your JCL properly by pressing F11. It must be like this.

Code:


//SYSIN DD *
  ALTER 'TESTFILE' +
    NEWNAME('TESTFILE.D&YR2&MON&DAY..F1')                  00220000
/*


Actuallt SYSIN will be read as if each line has 80 bytes in it. So your number 00220000 would have been in between from 1-80 columns.


I suggest you to remove that number and try it out. It will work.


Regards
Amar
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Jan 30, 2009 7:51 pm
Reply with quote

Small correction to the above .

Quote:
Actuallt SYSIN will be read as if each line has 80 bytes in it


Actuallt SYSIN will be read as if each line has 80 bytes in it until and unless it find a continuation character in the same line which says the data is continuing in the next line.


Regards
Amar
Back to top
View user's profile Send private message
abhishek dadhichi

New User


Joined: 19 Apr 2007
Posts: 37
Location: Bangalore

PostPosted: Mon Feb 02, 2009 3:18 pm
Reply with quote

Hi Amar,

You were very true as it was the problem with NUM ON , I created another member ,did NUM OFF and copied the JCL and everything
worked fine for me.Thanks..





Thanks,
Regards,
Abhishek
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Feb 02, 2009 5:01 pm
Reply with quote

Some times we overlook very small things . . . great to hear, finally things are working.. icon_smile.gif

Ad
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top