|
|
| Author |
Message |
purusothaman
New User
Joined: 17 Feb 2007 Posts: 9 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 |
|
 |
References
|
Posted: Fri Jun 20, 2008 5:22 pm Post subject: Re: Getting all GDG Base Names using Search Pattern |
 |
|
|
 |
Bill Dennis
Active User
Joined: 17 Aug 2007 Posts: 246 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: 9 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: 9 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 User
Joined: 17 Aug 2007 Posts: 246 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: 9 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: 9 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
Senior Member
Joined: 01 Sep 2006 Posts: 313 Location: work
|
|
|
|
Google 'IBM lookat'.
Search for IDC3332I. |
|
| Back to top |
|
 |
purusothaman
New User
Joined: 17 Feb 2007 Posts: 9 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: 3 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: 2953 Location: Brussels once more ...
|
|
|
|
| SYS1.SAMPLIB (IGGCSIRX) is a good place to look at |
|
| Back to top |
|
 |
purusothaman
New User
Joined: 17 Feb 2007 Posts: 9 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
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
Thank you for posting your solution
d |
|
| Back to top |
|
 |
|
|