View previous topic :: View next topic
|
Author |
Message |
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all,
I have to perform a search for the GDG bases using the pattern LJ.**.EXAMPLE.
This should return all the GDG base which has the above mentioned pattern. For example LJ.AA.EXAMPLE , LJ.BBBB.EXAMPLE should be the output.
How this can be achieved in background?
Purusothaman.HR |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
You use pgm IDCAMS to list catalog entries and parameter GDG to list only those types of entries:
Code: |
//LIST EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(LJ.*.EXAMPLE) GDG
/* |
|
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
Thanks for your reply.
In front end when running using REXX Exec:
When I use LISTCAT, my TSO user id gets appended to the pattern. For example LJ.*.EXAMPLE becomes TSOXXXX.LJ.*.EXAMPLE
When running using IDCAMS:
I am getting Memory error and also LJ.**.EXAMPLE does not seem to work. |
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
Forgot to write the code. Sorry. Here is the code.
Code: |
//STEP01 EXEC PGM=IDCAMS,REGION=1024K
//SYSIN DD *
LISTCAT ENTRIES(LJ.**.TRADERPT) GDG
/*
//SYSPRINT DD SYSOUT=* |
I am getting the following error for the above mentioned code.
LISTCAT ENTRIES(LJ.**.TRADERPT) GDG
IDC3203I ITEM 'LJ.**.TRADERPT' DOES NOT ADHERE TO RESTRICTIONS
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12 |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
In front end when running using REXX Exec:
enclose the name pattern in single quote 'LJ.*.EXAMPLE' to keep your ID from getting pre-pended
When running using IDCAMS:
use a single asterisk LJ.*.EXAMPLE
What messages indicate a memory error? |
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
When I use LJ.*.TRADERPT in IDCAMS, I am not able to get the desired GDGs. All the GDGs that I am looking for are like
LJ.XXXX010XX.X010.TRADERPT
So kindly mention how this should be applied. I need to run through IDCAMS since I need the resuls to be routed to a output file.
When I tried LJ.*.TRADERPT, I got the below error.
LISTCAT LEVEL(LJ.*.TRADERPT) GDG
IDC3012I ENTRY LJ.*.TRADERPT. NOT FOUND
IDC3007I ** VSAM CATALOG RETURN-CODE IS 8
IDC1566I ** LJ.*.TRADERPT NOT LISTED
Thanks a bunch for ur help.. |
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
Memory Error that I got earlier:
LISTCAT ENTRIES(LJ.*.TRADERPT) GDG
IDC3332I ** INSUFFICIENT MAIN STORAG
IDC1566I ** LJ.*.TRADERPT NOT LISTED |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Google 'IBM lookat'.
Search for IDC3332I. |
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
I tried increasing the REGION size.. But still I am getting the error.
Any idea? |
|
Back to top |
|
|
nirmalya sengupta
New User
Joined: 28 May 2007 Posts: 5 Location: kolkata
|
|
|
|
You may use rexx code to run this program. Your id will not be apended if you use "PREF NOPREF". I think that will help you out.
Code: |
/**REXX**/
PROF NOPREF
ADDRESS TSO
XX=OUTTRAP("LIST.")
"LISTCAT ENTRIES (LJ.*.EXAMPLE) GDG"
XX=OUTTRAP("OFF")
DO X=1 TO LIST.0
SAY LIST.X
END
|
I think this should work. Now you may use list. stem as you want. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
SYS1.SAMPLIB (IGGCSIRX) is a good place to look at |
|
Back to top |
|
|
purusothaman
New User
Joined: 17 Feb 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all,
Finally I found a solution for this. Thanks to all the buddies who have helped me.
Here is the code:
Code: |
/* REXX */
NAMES. = ' '
J = 0
ADDRESS ISPEXEC "LMDINIT LISTID(TEMPLIST) LEVEL(LJ.**.TRADERPT)"
DO FOREVER
ADDRESS ISPEXEC
"LMDLIST LISTID(&TEMPLIST) OPTION(LIST) DATASET(DSVAR) STATS(YES)"
IF RC <> 0 THEN LEAVE
J = J +1
NAMES.J = USERID()"."DSVAR
DSVAR = ''
END
ADDRESS ISPEXEC "LMDFREE LISTID(&TEMPLIST)"
NAMES.0 = J
ADDRESS TSO "EXECIO "J" DISKW GDGLIST(STEM NAMES. FINIS"
EXIT |
Thanks again to all. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank you for posting your solution
d |
|
Back to top |
|
|
sampatir
New User
Joined: 12 May 2009 Posts: 13 Location: India
|
|
|
|
Hi Purusothaman,
The code you posted above will bring all the NON GDG files along with the required GDGS in the given pattern.
Can you let me know how can we eliminate those files from getting retrieved?
Thanks,
Ram |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
You did not specify if it is a repetitive task,
for a once in a while job the best thing would be to use the ISMF dialogs
for dataset list, it has quite powerful filtering facilities
ask Your storage support about ISMF dialogs and how to have them available in Your ISPF session |
|
Back to top |
|
|
|