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

[Closed]Open a dataset thru arg


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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Mar 31, 2006 12:22 pm
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
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 31, 2006 5:00 pm
Reply with quote

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

Active User


Joined: 12 Jan 2006
Posts: 103

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

Sorry SuperK, its not working

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Apr 03, 2006 2:27 pm
Reply with quote

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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Mon Apr 03, 2006 2:47 pm
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: 36
Location: Hyderabad

PostPosted: Mon Apr 03, 2006 3:29 pm
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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Mon Apr 03, 2006 4:20 pm
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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Apr 03, 2006 5:31 pm
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

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Mon Apr 03, 2006 5:49 pm
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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Mon Apr 03, 2006 5:54 pm
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: 290
Location: Basel, Switzerland

PostPosted: Mon Apr 03, 2006 9:52 pm
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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Tue Apr 04, 2006 10:41 am
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
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Thu Apr 07, 2011 6:02 pm
Reply with quote

Hi,

I have a simple rexx but I am not getting the result.

Code:
/*REXX  */
TRACE I
ARG AA 
SAY AA 
EXIT   


if I run the above like AG 1234. I should get 1234 in the variable AA but its not happening getting blank. Pls advise. Thanks.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Thu Apr 07, 2011 6:07 pm
Reply with quote

ibmmainframe1 wrote:
I have a simple rexx but I am not getting the result.

Code:
/*REXX  */
TRACE I
ARG AA 
SAY AA 
EXIT   

if I run the above like AG 1234. I should get 1234 in the variable AA but its not happening getting blank. Pls advise. Thanks.


Wow, you've added it to the command table?

Run it as "TSO AG 1234"
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 07, 2011 6:08 pm
Reply with quote

Post the output from the TRACE.
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Thu Apr 07, 2011 6:43 pm
Reply with quote

Hi Robert, Kevin.

Thanks for your prompt responses.

I changed the name to a diff one then I ran with TSO SIM 1234 and I am getting the result.

I dont know why AG was not working.

I appreciate you all.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Apr 07, 2011 6:50 pm
Reply with quote

Maybe there is a clist\rexx\macro etc. in your library sequence called like that?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 08, 2011 2:56 pm
Reply with quote

Also, is this foreground or background.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 08, 2011 4:36 pm
Reply with quote

and stop tagging onto 5 year old posts!!

5 years and 3 days....is that a record enrico??
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Calling an Open C library function in... CICS 1
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top