IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

checking 3rd qualifier of a dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 2:55 pm
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: 6966
Location: porcelain throne

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

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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Nov 27, 2008 3:00 pm
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: 91
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 3:02 pm
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: 1287
Location: Chennai, India

PostPosted: Thu Nov 27, 2008 5:22 pm
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: 2481
Location: @my desk

PostPosted: Thu Nov 27, 2008 5:34 pm
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: 91
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 6:11 pm
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: 2481
Location: @my desk

PostPosted: Thu Nov 27, 2008 7:27 pm
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: 1287
Location: Chennai, India

PostPosted: Thu Nov 27, 2008 7:52 pm
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

Global Moderator


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

PostPosted: Thu Nov 27, 2008 10:09 pm
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: 1287
Location: Chennai, India

PostPosted: Fri Nov 28, 2008 10:43 am
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: 91
Location: Hyderabad

PostPosted: Fri Nov 28, 2008 3:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top