How to read the member again Filtered via OUTTRAP



IBM's Command List programming language & Restructured Extended Executor

How to read the member again Filtered via OUTTRAP

Postby samurai » Thu Apr 03, 2014 2:52 pm

Could someone help me out to continue the below coding to read all the member and find if it contains the field XXX in it.


THEPDS = "'MX9C.SAMPLE1.JCL'"
X = OUTTRAP('ML.')
"LISTDS "THEPDS" MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
SAY ML.N

O/p is
SAM1
SAM2
SAM3
samurai
 
Posts: 30
Joined: Tue Mar 18, 2014 3:29 pm
Has thanked: 6 times
Been thanked: 0 time

Re: How to read the member again Filtered via OUTTRAP

 

Re: How to read the member again Filtered via OUTTRAP

Postby samurai » Thu Apr 03, 2014 4:04 pm

i have added the below code to read all the member of a PDS, while using sysdsn command its throwing error as below, Can someone help !!

ML.N = STRIP(ML.N)
PDS_NAME = STRIP(THEPDS)"("ML.N")"
IF SYSDSN("'"PDS_NAME"'") = "OK" THEN
SAY PDS_NAME



error:

IKJ56709I INVALID DATA SET NAME, ''MX9C.SAMPLE1.JCL'(SAM1)'
IKJ56709I INVALID DATA SET NAME, ''MX9C.SAMPLE1.JCL'(SAM2)'
IKJ56709I INVALID DATA SET NAME, ''MX9C.SAMPLE1.JCL'(SAM3)'
samurai
 
Posts: 30
Joined: Tue Mar 18, 2014 3:29 pm
Has thanked: 6 times
Been thanked: 0 time

Re: How to read the member again Filtered via OUTTRAP

Postby Pedro » Thu Apr 03, 2014 9:33 pm

IKJ56709I INVALID DATA SET NAME, ''MX9C.SAMPLE1.JCL'(SAM1)'
THEPDS seems to contain single quotes. You need to strip out the quotes so that only one appears at the beginning and one at the end.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post