View previous topic :: View next topic
|
Author |
Message |
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hello,
Having a date value in a VSAM file (1,8 - position), Daily it will get updated. On daily basis need to take up this date value ang have to pass
this in to PARM parameter in the JCL. Because with the data, have to
fetch the corressponding Input File.
fyi,
Input File - P.SYSTEM.IIC.DDMMYY - here in DDMMYY - have to pass the
date value whatever entered in to the VSAM file using PARM parameter in the jcl.
Kindly post your reply |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The only way that you can use that value in a batch job is if you create the JCL in one job and submit the job either through INTRDR or by issuing a schedule trigger.
The best way would be for a program to read the value from the VSAM file and use that value within the program. |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
expat wrote: |
The best way would be for a program to read the value from the VSAM file and use that value within the program. |
If we are reading through a COBOL program, how we can recognize the
corresponding file ? By CICS screen we will get the datevalue in to VSAM file. with the Date value I have to take the required file for further process. Suppose the file having "073108" , I have to take july31st Input file. Here we are having the Input file till up to date. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
OK.
You have a program that reads the VSAM file and retrieves the date value as required. It then writes this value to a specific member of a PDS in the form of a valid JCL SET statement:
// SET DAT=thedatevalue
Then, that PDS and member are used in the subsequent job via a JCLLIB and an INCLUDE statement:
// JCLLIB ORDER=THE.PDS
// INCLUDE THEMEMBER
...
//STEPXXXX EXEC PGM=XXXX,PARM='&DAT' |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
One way to do what you want would be to read the date from the file and create a set statement in a pds member that could be included in your job streams (other then the job reading the file). Of course if DDMMYY is all numeric it won't work. |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Still Im nt clear of this. Sorry to trouble you again.
Normally we will be giving the overrides to SET parameter here, you have given " // SET DAT=thedatevalue " how that date value in the PDS have given to SET DAT=mmddyy. This is an automated process.
In JCLLIB if we are giving the PDS/Dataset how it vl recognize the first
three position is data value ? |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
superk wrote: |
OK.
You have a program that reads the VSAM file and retrieves the date value as required. It then writes this value to a specific member of a PDS in the form of a valid JCL |
can we create a PDS member thru program? and how to validate that as valid for SET statement. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Vasukip,
Quote: |
can we create a PDS member thru program? and how to validate that as valid for SET statement. |
You can write the entire SET command having the date value to a PDS member using SORT.
Try it out and see what happens.
Thanks,
Arun |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Vasukip,
Quote: |
P.SYSTEM.IIC.DDMMYY |
Again as Craig suggested, this will not work if you are passing a numeric value to DDMMYY.
Thanks,
Arun |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
MMDDYY as an all numeric value will not work as a node in an MVS File name! |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Through COBOL pgm I can change that into DDMMMYY , that is not an issue |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Craq Giegerich wrote: |
MMDDYY as an all numeric value will not work as a node in an MVS File name! |
Just a typo
DDMMYY as an all numeric value will not work as a node in an MVS File name! You can not have an all numeric node in an MVS File name! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
If the value is being used as a PARM then being all numeric will be OK
Code: |
// SET PREFIX='12345678'
//*
//TESTSTEP EXEC PGM=IEFBR14,PARM='&PREFIX'
IEFC653I SUBSTITUTION JCL - PGM=IEFBR14,PARM='12345678'
|
|
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Code: |
//TSOVAPA4 JOB (12345),'JCL',CLASS=Q,
// MSGCLASS=X,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1)
//*
// SET DAT=DATEVALUE
// JCLLIB ORDER=(TSOXXXX.PAS.FORM)
//STEPLIB INCLUDE MEMBER=DAT
//R010 EXEC PGM=SORT,PARM='&DAT'
//SORTIN DD *
111 05 ABCD 173
112 02 ABCDE
112 03 123
/*
//SORTOUT DD DSN=TSOXXXX.PAS.OUTPUT.&DAT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// AVGREC=K,
// STORCLAS=CTSDASD, |
here in the PDS member - 'TSOXXXX.PAS.FORM(DAT)' - the date value is passed as "T082708". The output file got created in TSOXXX.PAS.OUT.DATEVALUE , instead of "TSOXX.PAS.OUT.T082708".
SET command should take that date value "T082708" automatically from the PDS member - DAT. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Vaas,
Code: |
//R010 EXEC PGM=SORT,PARM='&DAT' |
Why do you want to pass the date value to SORT program?It will not accept whatever you specify in PARM.
From whatever data you have provided so far, You are trying to pass a date value to a program as DDMMYY (all numeric) and within your program you are converting into DDMMMYY to resolve a file-name you want to process further.
expat has provided the solution for the above problem.
If this is not what you are trying to achieve, please explain it more clearly.
Thanks,
Arun |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hi all,
what I was trying to say is need to create a dynamic output file with name of TSOXX.PAS.OUTPUT.&DAT. For this override &DAT - I will be getting the date value as "TDDMMYY" through a file on daily basis, here T just a alphabet because we cudn't create a dataset with numeric after a terminator.
you people have helped me by getting date value in a PDS member.
Eventhough the date value passed to a PDS member, those value is not taken by "SET" command which is referred in the JCL. In the SET - statement we need to provide the datevalue manually. I want that process as a automated one.
Kindly advise to resolve my issue |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Your question has been answered, just that you either ignored it or mis understood it.
superk wrote: |
OK.
You have a program that reads the VSAM file and retrieves the date value as required. It then writes this value to a specific member of a PDS in the form of a valid JCL SET statement:
// SET DAT=thedatevalue
Then, that PDS and member are used in the subsequent job via a JCLLIB and an INCLUDE statement:
// JCLLIB ORDER=THE.PDS
// INCLUDE THEMEMBER
...
//STEPXXXX EXEC PGM=XXXX,PARM='&DAT' |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Vasukip,
Quote: |
you people have helped me by getting date value in a PDS member.
Eventhough the date value passed to a PDS member, those value is not taken by "SET" command which is referred in the JCL |
Now your PDS member has nothing but the JCL SET statement along with the date value. Why do you want to enter manually the date value again?
Thanks,
Arun |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Quote: |
Now your PDS member has nothing but the JCL SET statement along with the date value. Why do you want to enter manually the date value again?
|
Hi Arun,
Now my PDS member having Date value as - T070808. This value is not passing to SET command. It got expaned only at INCLUDE member statement. This value is not taken by SET command. I tried one JCL with SET , JCLIB, and INCLUDE MEMBER.
Superk also given SET=datvalue --the PDS member value is not passing here. |
|
Back to top |
|
|
|