View previous topic :: View next topic
|
Author |
Message |
Nehanisha Pandey
New User
Joined: 29 Jul 2008 Posts: 3 Location: Bangalore
|
|
|
|
eg: dataset ABC.XYZ.T<n> is unique dataset where n is some number and there is no dataset having qualifiers starting with ABC.XYZ. How can it be referred in JCL? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Nehanisha Pandey wrote: |
dataset ABC.XYZ.T<n> is unique dataset where n is some number . . . |
"hard code" that number in JCL . . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Quote: |
eg: dataset ABC.XYZ.T<n> is unique dataset where n is some number and there is no dataset having qualifiers starting with ABC.XYZ. How can it be referred in JCL? |
Other than Anuj's suggestion "hard code" the number, i have no idea what is gong on with this topic. . .
What good are "the numbers" if there are no datasets starting with ABC.XYZ?
A more clear descriptoin of what exists and what is needed may generate more usable replies. . .
Maybe i am completely missing something. . . |
|
Back to top |
|
|
Nehanisha Pandey
New User
Joined: 29 Jul 2008 Posts: 3 Location: Bangalore
|
|
|
|
hi ppl,
thanks for your prompt replies, I'll explain with a clear example.
My requirement:
Let us assume I have following 5 datasets:
ABC.XYZ.D1.T123
ABC.XYZ.D2.T659
ABC.XYZ.D3.T280
ABC.XYZ.D4.T217
ABC.XYZ.D5.T479
where D* is the parm to be passed from JCL, so we have
ABC.XYZ.D*.T* as fixed format of the dataset available.
Also, the no. follwing T is random, which we don't know.
Depending on the parm passed the respective dataset should be referred in the JCL.And there is only 1 unique dataset for the parm passed.
eg: if the parm passed is D4 then ABC.XYZ.D4.T217 should be referred in the JCL.
Hard coding won't help because then everytime JCL has to be modified. I was looking for some generic method.
I hope i explained well, let me know if you need any further clarification. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Also, the no. follwing T is random, which we don't know. |
Will this number also be specified by some parm?
Are these D*.T* datasets being read in the process or are they being created?
It may help if you post one step of complete jcl as it needs to exist for a successful execution.
Depending on what the real requirement becomes, using one or more symbolic parameters in a cataloged procedure may be part of a solution. Dynamically creating jcl and submitting this via the internal reader may also be part of a solution.
Once we have a more clear understanding, more suggestions will be posted.
An explanation of the input files and the output files for this process may provide helpful info. An explanation what business function is supported by this could be useful as well. |
|
Back to top |
|
|
Nehanisha Pandey
New User
Joined: 29 Jul 2008 Posts: 3 Location: Bangalore
|
|
|
|
hi,
1-the random no. is unknown, can't be passed as parm
2-dataset is available, i.e. we are not creating, it exists already.
3-In the following jcl, basically I am trying to copy from the TAPE dataset to another dataset(being created in JCL).
4-The business requirement being I want to browse the contents of the TAPE dataset created on a certain day(DATE parm is passed from JCL)
the jcl:
Code: |
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,
// DSN=TPOMCS.ONSITE.STARTSK.&DATE..*
//SORTOUT DD DISP=(NEW,CATLG,DELETE),
// DSN=TPOMCS.ONSITE.STARTSK.TEMP,
// SPACE=(80,(100,200)),
// LRECL=80,RECFM=FB,
// AVGREC=U |
Let me know if you need any further clarification!
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Let me know if you need any further clarification! |
Yup - sure do. . .
Quote: |
1-the random no. is unknown, can't be passed as parm
2-dataset is available, i.e. we are not creating, it exists already. |
I do not recall ever seeing an input dataset being opened where the dataset was not known. . . You might generate a dsn for an output file, but if you are going to read it, you have to specify the dataset name.
If you want to copy a tape to dasd to look at the data, determine the dataset name (maybe by using tso/ispf 3.4) and copy to dasd. If the tape has a high volume of data, suggest you only copy data of interest - there may not be space available to copy the entire file and if it is quite large, you will not be able to view it. . . |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
You will need to write a small program to do the work for you. The easiest way is to write a small Rexx routine to find the data set(s) and do the allocation(s) and call the progam that you would have called directly in the JCL. The other way is to write a different small program to generate the JCL for you. Either way, since there is some unknown external factor that is determining the names, you are going to have to program something to find and use the name. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Rexx for tape. . .? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Really poor design, not knowing the input file name.
You'll have to write a program that runs against the file list to get the exact file name and copy the JCL (that you want to use the file with) to the internal reader. The file list can be generated by any of a variety of methods ... pick one, but know the format of the output so your program can be appropriately coded. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
Really poor design, not knowing the input file name. |
Not sure that there is enough space on the back of a fag packet to enter a fully qualified dataset name |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
expat, a bar napkin has plenty of space ... if you write small enough. Reading the written material whilst sober, however, now that's a fish of a different color ... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Robert Sample wrote: |
expat, a bar napkin has plenty of space ... if you write small enough. Reading the written material whilst sober, however, now that's a fish of a different color ... |
Aaaaaaaaaaah, and I always thought that the bar napkin was for user documentation and the fag packet was the full design docs.
So that's where I've been going wrong. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
and some non-smoker threw away the design-docs. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
expat, that explains so much |
|
Back to top |
|
|
|