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
 

 

How to add date in the dataset name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to add date in the dataset name
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    Post subject:
Reply with quote

What columns are 00220000 in?
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Jan 23, 2009 9:44 pm    Post subject: Reply to: How to add date in the dataset name
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    Post subject:
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

Site Director


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

PostPosted: Wed Jan 28, 2009 10:50 am    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Jan 30, 2009 5:08 pm    Post subject:
Reply with quote

Hello,
prashanth1 wrote:
My doubt is , where it gets the values for D&YR2&MON&DAY.
Check this link on EZACFSM1: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Jan 30, 2009 5:14 pm    Post subject: Reply to: How to add date in the dataset name
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: 189
Location: INDIA

PostPosted: Fri Jan 30, 2009 7:47 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Fri Jan 30, 2009 7:51 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Feb 02, 2009 5:01 pm    Post subject:
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    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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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