MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dynamically naming a flat file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
navhin
Beginner


Joined: 26 Mar 2007
Posts: 20
Topics: 7
Location: india

PostPosted: Thu May 24, 2007 12:04 am    Post subject: dynamically naming a flat file Reply with quote

Can we include a qualifier to a DSN dynamically in a JCL while creating the file. I want to include the current date to a DSN( *.*.<date> ).

if we could do that, please show me how to do it.
_________________
navhin
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu May 24, 2007 1:47 am    Post subject: Reply with quote

Yes, if you have a schedule package that is one of the many functions that it can do for you.

If not, it is possible but far more involved.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
navhin
Beginner


Joined: 26 Mar 2007
Posts: 20
Topics: 7
Location: india

PostPosted: Thu May 24, 2007 2:26 am    Post subject: Reply with quote

expat,

can u guide me how to do it without using a schedule package
_________________
navhin
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu May 24, 2007 2:33 am    Post subject: Reply with quote

There have been numerous threads on this but because people keep posting utility questions in the JCL forum the search throws up many unrelated threads so you will have to wade through them. But if you have a scheduler why not use its facilities? it is simple a case of coding a symbolic name in your jcl which the scheduler resolves rather than the JCL interpreter.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu May 24, 2007 2:48 am    Post subject: Reply with quote

navhin,

I will spare you the lecture on why this is not professional and not a good idea.

this will though, limit you to one file per day. If you need to run this job more than once per day, GDG's serve this purpose. No, there is no date in the DSN, you have to look at creation date.

If in development and you want to have this, often the solution is a REXX script which will:
  • generate the JCL for the JOB
  • build a DSN with the date as a LLQ
  • submits the job


I have to ask, why do you want a date in the DSN?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu May 24, 2007 3:40 am    Post subject: Reply with quote

Right - this is the particular thread I was thinking of:

http://www.mvsforums.com/helpboards/viewtopic.php?t=8171&highlight=date+datasetname

This has a link to the relevant page in the OPC documentation - if you have some other scheduler then you will need the equivalent. There are various options so you might be able to get around the problem mentioned by Dick that a GDG would circumvent.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu May 24, 2007 5:40 am    Post subject: Reply with quote

navhin,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=2101&highlight=current%20date%20and%20time

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu May 24, 2007 7:15 am    Post subject: Reply with quote

I think that Kolusu and Nic have given you enough ideas, renaming a standard PS file is the easiest option.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group