View previous topic :: View next topic
|
Author |
Message |
bhim_s
New User
Joined: 19 Sep 2006 Posts: 46 Location: Australia
|
|
|
|
Hi,
I have a sequential dataset named TSOID.ABC.JOBLIST that contains member name like
TSOID.COMMON.XYZ(member1)
TSOID.COMMON.XYZ(member2)
TSOID.COMMON.XYZ(member3)
Is there any way to browse the members by reading a member name from the file. I tried to execute following code..
Code: |
/* REXX STP999*/
/* **************
call read_rec
call brws_file
read_rec:
amr_file = "'TSOID.ABC.JOBLIST'"
say amr_file
"Alloc Fi(amrf) da("amr_file") shr"
"ExecIO * Diskr amrf (Stem amr_Lines. Finis "
say amr_lines.0
say amr_lines.1
return
brws_file:
say "record first 1" amr_lines.1
file1=space(amr_lines.1,0)
say "this is amr_file2" amr_file2
"Alloc F(DDbf2) da('file1') shr"
"ExecIO * Diskr DDbf2 (Stem rec. Finis "
say "this is rec one" rec.1
"Free File(DDbf2)"
"Free Fi(amrf)"
return |
but i am getting the following error:
Code: |
record first 1 TSOID.COMMON.XYZ(member1)
File1 is TSOID.COMMON.XYZ(member1)
IKJ56228I DATA SET FILE1 NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
IRX0555E The input or output file DDBF2 is not allocated. It cannot be opened f
or I/O.
IRX0670E EXECIO error while trying to GET or PUT a record.
this is rec one REC.1
***
|
Also tried by changing the quotes like ..
Code: |
'file1' or "'file1'" or "file1" or file |
but got the same errors like IKJ56228I DATA SET FILE1 NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
Appreciations for any suggestion
Rgrds, |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
There is a problem in your quotes. Use TRACE I to see how REXX interprets this line.
By the way, why not using the BROWSE service?
O. |
|
Back to top |
|
|
bhim_s
New User
Joined: 19 Sep 2006 Posts: 46 Location: Australia
|
|
|
|
Ok.. i try to use TRACE I
I am not so much familier with rexx would be great if you can guide me to use "BROSE service " |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
BROWSE is an ISPF service, and you can read about it here.
O. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
as Ofer71 said is just a problem of quoting:
instead of
Code: |
"Alloc F(DDbf2) da('file1') shr" |
try
Code: |
"Alloc F(DDbf2) da('"file1"') shr" |
BTW you're not using the BROWSE service. |
|
Back to top |
|
|
bhim_s
New User
Joined: 19 Sep 2006 Posts: 46 Location: Australia
|
|
|
|
Thanks to all of you it solved my problem |
|
Back to top |
|
|
|