IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can we browse member whose name is given in seq. file


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: Australia

PostPosted: Thu Aug 30, 2007 2:31 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Aug 30, 2007 3:11 pm
Reply with quote

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
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: Australia

PostPosted: Thu Aug 30, 2007 3:15 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Aug 30, 2007 3:30 pm
Reply with quote

BROWSE is an ISPF service, and you can read about it here.

O.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Aug 30, 2007 3:32 pm
Reply with quote

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
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: Australia

PostPosted: Thu Aug 30, 2007 4:04 pm
Reply with quote

Thanks to all of you it solved my problem icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top