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
 

 

checking 3rd qualifier of a dataset

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

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 2:55 pm    Post subject: checking 3rd qualifier of a dataset
Reply with quote

I have hundreds of datasets as below

AAA.AAA.XX.XYZ
AAA.BBB.XY.XYZ
AAA.CCC.XX.XYZ
AAA.DDD.SS.XYZ
AAA.EEE.MM.XYZ

I need to run a job which will FTP all the datastet
whose the 3rd qualifier is XX or XY.

I know how to FTP the datasets.
my concern is how shall I put a check on 3rd qualifier to know whether its XX or XY.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Nov 27, 2008 3:00 pm    Post subject:
Reply with quote

what is the source of your dataset names?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 27, 2008 3:00 pm    Post subject: Reply to: checking 3rd qualifier of a dataset
Reply with quote

is this once in a while or a continuous task ?
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 3:02 pm    Post subject:
Reply with quote

Dick,
These are all flat file.
What is meant by source of dataset name.
all the qualifier names are same expect one 3rd qualifier which variers.

Enrico,
This is a On Request Job ...might be quaterly once...
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 27, 2008 5:22 pm    Post subject: Reply to: checking 3rd qualifier of a dataset
Reply with quote

Quote:

I have hundreds of datasets as below


Is the first qualifier AAA the same in all the datasets?



Quote:
I know how to FTP the datasets.


Are you using a JCL for that?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Nov 27, 2008 5:34 pm    Post subject:
Reply with quote

Quote:
What is meant by source of dataset name.

Quote:
I have hundreds of datasets as below

AAA.AAA.XX.XYZ
AAA.BBB.XY.XYZ
AAA.CCC.XX.XYZ
AAA.DDD.SS.XYZ
AAA.EEE.MM.XYZ

That means, where does this list of "hundreds of datasets" reside? Do you have this in another dataset?
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 6:11 pm    Post subject:
Reply with quote

Aaru,
All the datsets Starts with AAA. All qualifiers are same except the middile two characters.

yes I m using JCL for this.

Arun,
All files are flat files and not in any PDS.
they gets created by another upstream job.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Nov 27, 2008 7:27 pm    Post subject:
Reply with quote

dp33770,
Quote:
All files are flat files and not in any PDS.
they gets created by another upstream job.

The question raised was, do you have the dataset-names stored somewhere?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 27, 2008 7:52 pm    Post subject: Reply to: checking 3rd qualifier of a dataset
Reply with quote

dp,

Quote:

That means, where does this list of "hundreds of datasets" reside? Do you have this in another dataset?


Please answer to the above ques so that we can suggest.

Anyways i do not think u can use JCL for this requirement, u can go for REXX.

Read the file incase u have all the dataset names listed in a file. Use POS and SUBSTR to get the third qualifier and check if it is equal to XX or YY. If yes then BUILD a FTP jcl with the datasets and submit it.

Even if it is not stored in a dataset, use LMDINIT to get all the datasets with ** in the third qualifier and then the above mentioned approach.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Thu Nov 27, 2008 10:09 pm    Post subject: Reply to: checking 3rd qualifier of a dataset
Reply with quote

If you use LISTCAT for at least the HLQ, does it give you a list of all of the datasets? Can you just then read that list and select only those entries that match on the 3rd qualifier.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 28, 2008 10:43 am    Post subject: Reply to: checking 3rd qualifier of a dataset
Reply with quote

Hi Superk,

Was that question for me?

I normally use LMDINIT for getting the list of datasets.

Code:
ADDRESS ISPEXEC "LMDINIT LISTID(TEMPLIST) LEVEL("HLQ1")"
DO FOREVER
ADDRESS ISPEXEC
"LMDLIST LISTID(&TEMPLIST) OPTION(LIST) DATASET(DSVAR) STATS(YES)"


HLQ1 - dataset name

[/quote]
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Fri Nov 28, 2008 3:56 pm    Post subject:
Reply with quote

All the files are generated in another upstream job as below and I know it will have the following format

AAA.BBB.XX.ZZZ
AAA.BBB.YY.ZZZ
AAA.BBB.ZZ.ZZZ
AAA.BBB.CC.ZZZ
AAA.BBB.DD.ZZZ

So when I will run my job it has to FTP datasets based on the 3rd qualifer of DSN.
Ex : If the 3rd qualifier is DD it has to FTp to differnt folder ....

If we can do it in JCL then pls let me know the process.
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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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