Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, 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

Active User


Joined: 12 Jan 2006
Posts: 103

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: 4648
Location: Raleigh, 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

Active User


Joined: 12 Jan 2006
Posts: 103

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: 36
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

Active User


Joined: 12 Jan 2006
Posts: 103

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: 4648
Location: Raleigh, 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

New User


Joined: 10 Jan 2006
Posts: 76
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

Active User


Joined: 12 Jan 2006
Posts: 103

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: 287
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

Active User


Joined: 12 Jan 2006
Posts: 103

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
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Thu Apr 07, 2011 6:02 pm    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Apr 07, 2011 6:07 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Apr 07, 2011 6:08 pm    Post subject: Reply to: Open a dataset thru arg
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Apr 07, 2011 6:50 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 08, 2011 2:56 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us