View previous topic :: View next topic
|
Author |
Message |
anand.nanda
New User
Joined: 25 Jun 2010 Posts: 10 Location: india
|
|
|
|
hi,
i tried writing in to the date-file from cobol as
// set date=101010
and included this file in run as below
.
.
.
.
//DATEFILE DD DSN=A.B.C(DATEFILE),
// DISP=SHR
// INCLUDE MEMBER=DATEFILE
//FILE1 DD DSN=A.B.C.F&DATE,
// DISP=(NEW,CATLG,DELETE),
.
.
.
so as to set &date to be what i have written in the date-file.
but while running &date is not assigned with updated content
it takes only the previous content before writing.
how to save the date-file after writing and include the updated content? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You can not do that within the same job. Once the JCL has been interpretted by JES, it is set in stone. So if you then update a file that is included into the JCL, it will be too late as the original would have been already processed by the JES interpreter. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I'm some what confused with what you've posted, you show this
Quote: |
//FILE1 DD DSN=A.B.C.F&DATE, |
and talked about "contents" here
Quote: |
how to save the date-file after writing and include the updated content? |
so by "content" you didn't really mean the "data in the file" instead "the qualified Data-set name"?
If the above lines make sense and are true for your case - search for EZACFSM1 in this Forum - you'll get enough examples to work upon what you are looking for. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You could always do this in two different jobs.
Job1 - creates the include file.
Job2 - uses the include file.
This is how we done this at another site many many years back, where the first job of an application created all of the includes that were to be used during the application, and any subsequent jobs then included them into the JCL stream.
Also, have you considered the use of the date variables available from your scheduling software. At my current site we use these all of the time in the production JCL
// SET DATE=#Date Var 1#
which is resolved by the schedular at job submission time. |
|
Back to top |
|
|
anand.nanda
New User
Joined: 25 Jun 2010 Posts: 10 Location: india
|
|
|
|
SPLITTING OF JCLS WORKS FINE TO HANDLE THIS
THANKS |
|
Back to top |
|
|
|