View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Hi All,
I want to build a macro to filter the input PDS by masking like view 'PDS(M***160*) using LMINIT command, when I tried to use
DDNAME = DSNNAME || '(' || 'M***160*' || ')'
ADDRESS ISPEXEC "LMINIT DATAID("MYDS'") DATASET('"DDNAME"') ENQ(SHR)"
ADDRESS ISPEXEC "LMOPEN DATAID("MYDS'") OPTION(INPUT)"
got RC 12.
I did the search for any post similar but didn't find any. Also I read through the manuals.
View PDS(M***160*) is filtering the required name when it is issued in TSO command under 3.4 option but not sure how this can be done using LMINIT.
Please suggest. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
You cannot filter at this level by member name.
You must access the PDS as a whole, then get its list of members, and then filter them using the mask, or whatever else.
That's it.
P.S.
The "triple asterisk" is not valid in a standard naming mask accepted by some standard tools. You can write your own one, to handle this if needed. |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
After
ADDRESS ISPEXEC 'LMLIST DATAID('MYDS') OPTION(LIST) MEMBER(MEMBER) STATS(NO)'
Can I give the masking as mentioned below.
ADDRESS ISPEXEC 'VIEW DATAID('MYDS') MEMBER(M***160*) MACRO(FETCH)'
I will try and let you know. |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
After Listing while passing the member with masking it worked. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
pkmurali wrote: |
Code: |
ADDRESS ISPEXEC "LMINIT DATAID("MYDS'") DATASET('"DDNAME"') ENQ(SHR)"
ADDRESS ISPEXEC "LMOPEN DATAID("MYDS'") OPTION(INPUT)"
|
|
AFAIR, the LMINIT takes the output parameter DATAID by name (to assign an unique value to this REXX variable), while all other LMM functions take this input parameter by value.
That is, in LMINIT the MYID must be given inside the outer quotes, as the name, but in all other LMM - out of quotes, for its value to be substituted by REXX as parameter value.
Besides of this, a single quote after MYDS is definitely a syntax error. |
|
Back to top |
|
|
|