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

How to open a PDS EDIT/Browse/VIew mode


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Sun Jun 15, 2008 12:10 pm
Reply with quote

I want to open an PDS in View and browse and Edit mode....but I'm able to open in only one mode
"ISPEXEC EDIT DATASET('OurID.PDS')"
but above command only open dataset in edit mode...we can't open the members in view/browse mode.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 15, 2008 1:11 pm
Reply with quote

Hello,

Try ISPEXEC BROWSE - EDIT means edit.
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Sun Jun 15, 2008 2:40 pm
Reply with quote

do u mean ADDRESS ISPEXEC "BROWSE - EDIT DATASET('ID.PDS')"

but it is giving the rerror
Invalid keyword
'-' is not a valid keyword for this service.

My reqirement is to open a PDS in all opening modes (EDIT/BROWSE/View)
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Jun 15, 2008 3:53 pm
Reply with quote

No
ADDRESS
"ISPFEXEC BROWSE DATASET(pds(member))"
or
"ISPFEXEC VIEW DATASET(pds(member))"
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Sun Jun 15, 2008 4:30 pm
Reply with quote

ADDRESS
"ISPFEXEC BROWSE DATASET(pds)"
or
Address
"ISPFEXEC VIEW DATASET(pds)"
above method only open a dataset in Edit or Browse mode...Let us say If we open a dtaset in browse mode...it can not be viewed...
My reqirement is I want to open Just like 3.4 option like it can viewed or Browse or edited depending on the B/E/V what we specify infront of the PDS member
EX:
VIEW YOURID.PDS
Command ===>
Name
V/B/E________ PDSMEM
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Jun 15, 2008 5:08 pm
Reply with quote

Quote:
ADDRESS
"ISPFEXEC BROWSE DATASET(pds)"
or
Address
"ISPFEXEC VIEW DATASET(pds)"
above method only open a dataset in Edit or Browse mode...Let us say If we open a dtaset in browse mode...it can not be viewed...

open in Browse or View mode, not , as you said, Edit or Browse mode !!!

Execpt this, I don't understand your requirement now. Sorry
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Sun Jun 15, 2008 6:10 pm
Reply with quote

Oh Sorry Brother....
Let us say I opened the dataset using Following Rexx code
ADDRESS
"ISPFEXEC BROWSE DATASET(pds)"

Output will be
BROWSE MYID.PDS Row 00001 of 00002
Command ===> Scroll ===> CSR
Name Prompt Size Created Changed ID
. MEM1
. Mem2


If you Put V infront of Member then we will get

BROWSE MYID.PDS Invalid select codeCommand ===> Scroll ===> CSR
Name Prompt Size Created Changed ID
V MEM1
. Mem2

My reqirement is If we put V it should open in View mode...if we put B it should open in browse mode...if E -->edit mode

But Normal REXX code will open in either in view or in browse or in EDIT
I want All should work
Thanks
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jun 15, 2008 7:07 pm
Reply with quote

You can open a dataset only in one mode at a time.

You can code something like this:
Code:

/* REXX */
ARG DSNAME MODE .
 
SELECT
  WHEN MODE = 'B' THEN
    ADDRESS ISPEXEC "BROWSE DATASET(&DSNAME)"
  WHEN MODE = 'V' THEN
    ADDRESS ISPEXEC "VIEW DATASET(&DSNAME)"
  WHEN MODE = 'E' THEN
    ADDRESS ISPEXEC "EDIT DATASET(&DSNAME)"
  OTHERWISE
  NOP
END
 
EXIT


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

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Jun 15, 2008 7:36 pm
Reply with quote

OK I see what you want ( as Ofer71 said ).

Why do you have to change your mind between the two commands?
You start browsing , stay browsing....

Is there a specific need to change?

Cheers
Pierre
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jun 15, 2008 10:10 pm
Reply with quote

Regarding switching - remember that BROWSE/VIEW/EDIT are also an ISPF Edit-Macro commands (in addition to the above ISPF Services), so you can issue them from within an edit-macro (ISREDIT),thus switching between modes.

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

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Mon Jun 16, 2008 10:26 am
Reply with quote

Hi
I want to Develop a REXX tool it will overome a drawbacks of 3.4 option
Requirement:
1 It should show last 10 Viewed/browsed/Edited dataset
2 It should have all features of 3.4 option Like
i/p in 3.4 :-YOURID.**.*
o/p :-all datasets

My reqirement is If we put V it should open in View mode...if we put B it should open in browse mode...if E -->edit mode
please anybody knows let me now
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jun 16, 2008 10:41 am
Reply with quote

Take a look at the LMDDISP Service.

O.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Jun 16, 2008 11:42 am
Reply with quote

I just checked... from option 3.4
after selecting in ANY(browse,view,edit) mode a dataset
You can use any from any member command ( even delete )only if You have activated
Code:
Enhanced member list for Edit, View, and Browse


Quote:
... It should show last 10 Viewed/browsed/Edited dataset


ever heard about DSLIST, REFLIST and friends
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Mon Jun 16, 2008 10:24 pm
Reply with quote

I think the poster wants the member list service.
Code:
/*REXX*/                                             
DSN = 'PEDRO.JCL.CNTL'   
Address ISPEXEC                                     
"LMINIT  DATAID(DID) DATASET('"DSN"') ENQ(SHRW)"     
"LMOPEN  DATAID("did")"                             
"MEMLIST DATAID("did") CONFIRM(YES)"                 
"LMFREE  DATAID("did")"                             


Which provides a member list and where you can issue B, E, or V line commands (or other line commands).
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Tue Jun 17, 2008 2:56 am
Reply with quote

Regarding:
Quote:
I want to Develop a REXX tool it will overome a drawbacks of 3.4 option
Requirement:
1 It should show last 10 Viewed/browsed/Edited dataset


Try ISPF option 11 - the 'ISPF workplace'. It is very much like ISPF 3.4, but the name rules are slightly different and you can recall the last 30 names. And you can create your own list of names, so you can save many more names than the 10 you want.

-or- perhaps what you want is to change one of your keys to be NRETRIEV when you are in the ISPF 'edit entry panel' (where you provide name of dataset). Press the key repeatedly and it will retrieve the previously used names. Also works from View and from option 3.4
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 17, 2008 3:14 am
Reply with quote

Hello,

Quote:
Try ISPF option 11 - the 'ISPF workplace'.
Might this be some add-on product?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Tue Jun 17, 2008 6:24 am
Reply with quote

Surprise! You thought you knew everything about ISPF and then you find there is a whole other option! It has been there for several releases.

The ISPF Workplace is documented in ISPF User's Guide, vol 2.

If your ISPF panel does not have it, try ISPFWORK in the command line or make your own:
Code:
/*rexx */
Addres ISPEXEC  "SELECT PGM(ISRUDA) PARM(ISRWORK) SCRNAME(WORK)"
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 17, 2008 7:55 am
Reply with quote

Hello Pedro,

Quote:
You thought you knew everything about ISPF
Not really, i use it fairly often, but am no expert.
Quote:
and then you find there is a whole other option!
Seems like our system support people left it off the menu. ISPFWORK brings it up, though.

Something new to look into, thanks icon_smile.gif

d
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Fri Sep 19, 2008 3:32 pm
Reply with quote

hi Pedro.. sorry, continuing in the old topic...

is there a way we can invoke a macro after MEMLIST, e.g. to sort the list with userid... etc...
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Sep 20, 2008 1:26 am
Reply with quote

Not really a macro, but with some trickery, you can issue one sort command.

Novices, please avert your eyes.

1. rexx program. Notice the 'mysort' variable. and the use of CONTROL service, and also the use of a customized panel.
Code:

/*REXX*/                                                           
DSN = 'PEDRO.JCL.CNTL'                                             
Mem = 'ADR*'                                                       
Address ISPEXEC                                                   
"LMINIT  DATAID(DID) DATASET('"DSN"') ENQ(SHRW)"                   
"LMOPEN  DATAID("did")"                                           
mysort = 'SORT CREATED'                                           
"CONTROL NONDISPL ENTER"                                           
"MEMLIST DATAID("did") CONFIRM(YES)  MEMBER("Mem") PANEL(PSVUDSM)"
"LMFREE  DATAID("did")"                                           


2. a customized panel, based on ISRUDSM panel of ISPF.
add as first part of )init section, set the zcmd variable:
Code:
)INIT                 
IF (&MYSORT NE &Z)     
  &ZCMD = &MYSORT     

and add as last line of )PROC, blank out the variable
Code:
&MYSORT =  &Z   


So this is what happens:
* member list is displayed (not really) with your sort command at top
* because of previous CONTROL NONDISPL ENTER command, the sort is processed before you see the member list.
* when you finally see the list, your sort command has been processed.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Sat Sep 20, 2008 1:52 pm
Reply with quote

great! thanks.. 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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts SET PATH in View DDL DB2 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top