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 refer unique dataset where last qualifier is unknown

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Nehanisha Pandey

New User


Joined: 29 Jul 2008
Posts: 3
Location: Bangalore

PostPosted: Mon Mar 30, 2009 6:12 pm    Post subject: How to refer unique dataset where last qualifier is unknown
Reply with 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?
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 Mar 30, 2009 6:56 pm    Post subject: Re: How to refer unique dataset where last qualifier is unkn
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Mar 30, 2009 9:55 pm    Post subject:
Reply with quote

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. . . icon_confused.gif

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
View user's profile Send private message
Nehanisha Pandey

New User


Joined: 29 Jul 2008
Posts: 3
Location: Bangalore

PostPosted: Tue Mar 31, 2009 10:13 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Mar 31, 2009 10:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
Nehanisha Pandey

New User


Joined: 29 Jul 2008
Posts: 3
Location: Bangalore

PostPosted: Tue Mar 31, 2009 10:44 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Apr 01, 2009 2:13 am    Post subject:
Reply with quote

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
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Wed Apr 01, 2009 5:23 am    Post subject: Reply to: How to refer unique dataset where last qualifier i
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Apr 01, 2009 7:56 am    Post subject:
Reply with quote

Hello,

Rexx for tape. . .?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Apr 01, 2009 8:12 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 01, 2009 11:40 am    Post subject:
Reply with quote

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 icon_cry.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Apr 01, 2009 4:42 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 01, 2009 5:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Apr 01, 2009 5:14 pm    Post subject:
Reply with quote

and some non-smoker threw away the design-docs.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Apr 01, 2009 5:19 pm    Post subject:
Reply with quote

expat, that explains so much icon_biggrin.gif
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 To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


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