Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
[Closed]Open a dataset thru arg

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Fri Mar 31, 2006 12:22 pm    Post subject: Open a dataset thru arg
Reply with quote

Hi,

I use the below code to open a dataset. My Q is h do u open the sane dataset passed thru an argument? I tried but the codes are really bothering me.

ADDRESS ISPEXEC
"ISPEXEC VIEW DATASET('dsname')"

T & R
Prabs
Back to top
View user's profile Send private message
References
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3296
Location: Charlotte,NC USA

PostPosted: Fri Mar 31, 2006 5:00 pm    Post subject: Re: Open a dataset thru arg
Reply with quote

Arg dsname .
"ISPEXEC VIEW DATASET('"dsname"')" perhaps?
Back to top
View user's profile Send private message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Mon Apr 03, 2006 10:58 am    Post subject:
Reply with quote

Sorry SuperK, its not working

T & R
Prabs
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3296
Location: Charlotte,NC USA

PostPosted: Mon Apr 03, 2006 2:27 pm    Post subject: Re: Open a dataset thru arg
Reply with quote

Please post the TRACE output from where it is failing.
Back to top
View user's profile Send private message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Mon Apr 03, 2006 2:47 pm    Post subject:
Reply with quote

Hi,

This is the code I am executing
/* REXX */
ARG FNAME
ADDRESS ISPEXEC
"ISPEXEC VIEW DATASET("'FNAME'")"

and below is the error which I get
Note: Fname is passed thru arg, no quotes are given.
ISRD028
Data set not cataloged
'AA59391.FNAME' was not found in catalog.

Current dialog statement:
ISPEXEC VIEW DATASET(FNAME)

Enter HELP command for further information regarding this error.
Press ENTER key to terminate the dialog.

T & R
Prabs
Back to top
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 38
Location: Hyderabad

PostPosted: Mon Apr 03, 2006 3:29 pm    Post subject: Modified Code
Reply with quote

Hi Prabs,

Change your code to the following one:

Code:

/* REXX */
ARG FNAME
ADDRESS ISPEXEC
"VIEW DATASET("FNAME")"


This is working.

--------
Vamshi Krishna Indla
Kanbay
Back to top
View user's profile Send private message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Mon Apr 03, 2006 4:20 pm    Post subject:
Reply with quote

No Vams, even that is not working

Plz look at the error which I get

ISRE177

Missing EDIT/VIEW parm
Either data set, DATAID or workstation file parameter is required.

Current dialog statement:
ISPEXEC VIEW DATASET()

Enter HELP command for further information regarding this error.
Press ENTER key to terminate the dialog.

T & R
Prabs
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3296
Location: Charlotte,NC USA

PostPosted: Mon Apr 03, 2006 5:31 pm    Post subject: Re: Open a dataset thru arg
Reply with quote

The code:
Code:

/* REXX */                                 
TRACE I                                   
ARG FNAME                                 
ADDRESS ISPEXEC                           
"VIEW DATASET("FNAME")"                   

works fine at my site also, both my original post and the one from mainframesguru. That presumes, of course, that the dataset passed to FNAME actually exists.

Again, you really need to post your TRACE command output.
Back to top
View user's profile Send private message
antonrino.b

Active User


Joined: 10 Jan 2006
Posts: 74
Location: Germany

PostPosted: Mon Apr 03, 2006 5:49 pm    Post subject: Re: Open a dataset thru arg
Reply with quote

Code:
/* REXX */
ARG FNAME
ADDRESS ISPEXEC
"VIEW DATASET('"FNAME"')"


Try this one. Hope this works.

Regards,
Antu
Back to top
View user's profile Send private message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Mon Apr 03, 2006 5:54 pm    Post subject:
Reply with quote

Hi friends,

Thanks a lot. The problem is no rexx code in this M/F system works fine when we pass something thru arg. So I have changed the code like below

SAY 'ENTER A DATASET NAME: '
PULL FNAME
ADDRESS ISREDIT
ADDRESS ISPEXEC
ISPEXEC VIEW DATASET("FNAME")"

and its working fine now.

Thanks & Regards
Prabs
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 278
Location: Basel, Switzerland

PostPosted: Mon Apr 03, 2006 9:52 pm    Post subject:
Reply with quote

hy prabs2006,

call your rexx with that parameter...

MYREXX FNAME --> where FNAME is any valid dataset, i.e. A.BCD.HZF
if you give no value to any rexx variable, it
takes the variable-name as value... ok?
therefore i think you forgot this.

martin9
Back to top
View user's profile Send private message
prabs2006
Warnings : 1

Active User


Joined: 12 Jan 2006
Posts: 104

PostPosted: Tue Apr 04, 2006 10:41 am    Post subject:
Reply with quote

Martin, I have called the Rexx routine with that parameter. But somehow that is not taking it up. There are other people here who have the same problem.

Thanks & Regards
Prabs
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1