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
 

 

How to open a dataset without going through 3.4 utility
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 06, 2007 11:35 am    Post subject: How to open a dataset without going through 3.4 utility
Reply with quote

My requirement is : I want to open the dataset without actually going through 3.4 utility.
In my previous assingment, I was opening the PROC, which contained many datasets in it. I was just typing &BR on the command line and placing the cursor on the line, the dataset I am looking for and press enter. It will open the dataset on the same screen and I was able to see the contents of the dataset without actually everytime opening another screen and viewing the dataset.
This was really saving the time....The same command I am trying on my recent assingment, but this command is not working?
Do you have any idea, how this can be achieved may be this through REXX or using Macro concept?
Back to top
View user's profile Send private message

shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Sep 06, 2007 11:52 am    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

hi,

Look at the following code.

I invoke this code to view/Browse a member of a particular PDS. You can modify this on your requirement.


*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* REXX MACRO */
/* THE BMEM MACRO */
/* TSO BMEM (MEMBER) */
/* SENDS THE USER TO THE VIEW OF 'XXXX.XXX.XXXXX' TO */
/* VIEW THIS PDS */
/* */
TRACE OFF
ADDRESS ISPEXEC
PARSE ARG STR1 STR2
IF STR1 = '' THEN SIGNAL NOPARM
IF STR2 ¬= '' THEN SIGNAL PARM2
UPPER STR1
MEMBER = STR1
"CONTROL ERRORS RETURN"
"VIEW DATASET('XXXX.XXX.XXXXX("MEMBER")') "
IF RC = 16 THEN DO
SAY 'MEMBER PATTERN MAY HAVE NO MATCH'
END
"CONTROL ERRORS CANCEL"
EXIT
NOPARM:
"VIEW DATASET('XXXX.XXX.XXXXX') "
EXIT
PARM2:
EXIT
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 06, 2007 11:53 am    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Yes, datasets can be opened without using 3.4. Even in my project we open the dataset using a command rather than 3.4. It was created sometime back. I searched and found the code.

Code:

  ADDRESS ISPEXEC 'ISREDIT MACRO'                   
  "SWAT LINEE 'EDIT'"   



LINEE - Command name (similar to &BR in u r case)
EDIT - To open the file in the edit mode

Try coding this and let me know if this works.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 06, 2007 12:02 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Use this code if u dont like using macros.

Code:

/* rexx */                                 
ARG DSNAME                                 
"ISPEXEC VIEW DATASET('"DSNAME"')"         


Store this in a member allocated to SYSEXEC or SYSPROC and then use the following TSO command.

TSO <member name> <dataset name>
Back to top
View user's profile Send private message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 06, 2007 12:37 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

I suppose you guys have written REXX code, I am new to REXX.
I believe SYSEXEC is the DD name and corresponding to it will have a PDS name SYSC.CTSO.V3R4.SYSEXEC in my system. I got to see this PDS after typing TSO ISRDDN on the command line.
I have created a local PDS and coded what you have written. I am not able to get how to use this code?
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Sep 06, 2007 12:42 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

find out thru the following link
http://www.ibmmainframes.com/viewtopic.php?p=95139&highlight=#95139
Back to top
View user's profile Send private message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 06, 2007 12:59 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

I am getting an error saying : FILE SYSEXEC NOT UNALLOCATED, DATA SET IS OPEN
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 06, 2007 1:51 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Just code both the lines in a PDS member which is allocated to either SYSEXEC or SYSPROC. Then u can use the TSO command mentioned in my previous post to execute from any screen.

1) First get a list of all the datasets allocated to either SYSEXEC or SYSPROC. You can use the LISTALC command

start:option 6 and then

tso listalc status

2) Copy this member into any of the PDS allocated to these libraries.
3) Use the TSO command to execute.

If you want to allocate your PDS to these libraries instead of adding u r member to the already allocated PDS, then this link might help u

http://ibmmainframes.com/viewtopic.php?t=5446
Back to top
View user's profile Send private message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 06, 2007 2:35 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Aaru you mean to say Whatever code i write into my local PDS member, I should copy this PDS member to the SYSEXEC PDS?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 06, 2007 3:53 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

There are many ways to execute the REXX programs and one such way is to allocate the dataset to the SYSEXEC/SYSPROC libraries. Then the programs can be executed using TSO <execName>

Quote:
Whatever code i write into my local PDS member, I should copy this PDS member to the SYSEXEC PDS?


By SYSEXEC PDS what are referring to? As posted before, Use the TSO LISTALC STATUS command to get the list. I did and got the following. I have pasted only one dataset that is allocated to SYSEXEC.


Code:
  SYSPROC  KEEP       
PBHQ.PRHD.REXX
           KEEP



The above code indicates that the PDS PBHQ.PRHD.REXX is allocated to SYSPROC. Hence u need to copy your member into this PDS so that you can use the TSO command.
Back to top
View user's profile Send private message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 06, 2007 4:49 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Thanks Aaru
Back to top
View user's profile Send private message
Select-mf

New User


Joined: 11 May 2007
Posts: 42
Location: bangalore

PostPosted: Thu Sep 13, 2007 7:32 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

Aaru,
I have done with concatenating my personal PDS for REXX code with the SYSEXEC member. I took some time, because I have not given the access to concatenate it to the system library. Now I am able to execute my REXX programs just by typying TSO <member name> on the command line.
But, I tried both of your code to view or edit the dataset, but its not working. For the first code, its showing SWAT is not found. And for the second code, its showing me some error.

Could you or anyone please look into this, or some other code, so that I can try that.
All I wanted is to just place my cursor on the dataset coded in PROC and type the TSO <member name> on the command line and I can view or edit the dataset on the same screen.

Thanks,
Anil.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Sep 13, 2007 10:17 pm    Post subject:
Reply with quote

I think my DSNB works more like you want. Put this in "personal PDS for REXX " with member name DSNB. To use it when you are in edit on your JCL type "DSNB" on the command line, position your cursor on the line with DSN=... the dataset you want to browse, then hit enter.

Code:
/* REXX EDITOR MACRO DSNB BY DOUGLAS WILDER OF AIC */           
/***************************************************/           
/* BROWSES THE DATASET ON THE CURRENT LINE         */           
/* OR BETWEEN THE "CC" AND "CC"                    */           
/* DSN STARTS AT DSN= OR DSNAME= OR ISC            */           
/* DSN END AT "," OR SPACE                         */           
/* FOR GDG BASE OR GDG (+1) USES GDG (0)           */           
/***************************************************/           
                                                                 
ADDRESS "ISREDIT" "MACRO NOPROCESS"                             
ADDRESS "ISREDIT" "PROCESS DEST RANGE C M"                       
                                                                 
ADDRESS "ISREDIT" "ISREDIT" "(CMD)   = RANGE_CMD"               
ADDRESS "ISREDIT" "ISREDIT" "(FIRST) = LINENUM .ZFRANGE"         
ADDRESS "ISREDIT" "ISREDIT" "(LAST)  = LINENUM .ZLRANGE"         
ADDRESS "ISREDIT" "ISREDIT" "(DEST)  = LINENUM .ZDEST"           
                                                                 
IF CMD = " " THEN DO                                             
    ADDRESS "ISREDIT" "(ROW,COL) = CURSOR"                       
    ADDRESS "ISREDIT" "(DATALN) = LINE (ROW)"                   
                                                                 
    DSN = GETDSN( DATALN, COL )                                 
                                                                 
    IF DSN = "" THEN DO                                         
       SAY 'NO DSN FOUND'                                       
    END                                                         
    ELSE DO                                                     
       DSNOK = CHECKDSN( DSN )                                   
                                                                 
       IF DSNOK = 'Y' THEN DO                                   
           ADDRESS "ISPEXEC" "BROWSE DATASET('" || DSN || "')"   
       END                                                       
    END                                                         
END                                                             
ELSE DO                                                         
   CNT = 1                                                       
   DO CURRLN = FIRST TO LAST                                     
       ADDRESS "ISREDIT" "(DATALN) = LINE (CURRLN)"             
                                                                 
       DSN = GETDSN( DATALN )                                   
                                                                 
       IF DSN = "" THEN DO                                       
          NOP                                                   
       END                                                       
       ELSE DO                                                   
          DSNOK = CHECKDSN( DSN )                               
                                                                 
          IF DSNOK = 'Y' THEN DO                                 
             ADDRESS "ISPEXEC" "BROWSE DATASET('" || DSN || "')"
          END                                                   
          ELSE DO                                               
             SAY "----------------------------------------"     
          END                                                   
       END                                                       
   END                                                           
END                                                             
EXIT                                                             
                                                                 
GETDSN: PROCEDURE                                               
    ARG LINE, COL                                               
    STARTPOS = POS('DSN=',LINE ) + 4                             
    IF STARTPOS = 4 THEN DO                                     
        STARTPOS = POS('DSNAME=',LINE ) + 7                     
        IF STARTPOS = 7 THEN DO                                 
            STARTPOS = POS('ISC',LINE )                         
        END                                                     
    END                                                         
                                                                 
    ENDPOS = POS(',',LINE,STARTPOS)                             
                                                                 
    IF ENDPOS = 0 THEN DO                                       
        ENDPOS = POS(' ',LINE,STARTPOS)                         
    END                                                         
                                                                 
    IF STARTPOS > 0 & ENDPOS > 0 THEN DO                         
       DSN = SUBSTR(LINE,STARTPOS, ENDPOS - STARTPOS)           
    END                                                         
    ELSE DO                                                     
       DSN = ""                                                 
    END                                                                 
    RETURN DSN                                                         
                                                                       
GETDSI:                                                                 
    ARG DSN                                                             
    DSNOK = 'N'                                                         
    MSGSTAT = MSG()                                                     
    STAT = MSG('OFF')                                                   
    DSNRTN = LISTDSI("'"DSN"'")                                         
    CALL MSG MSGSTAT                                                   
    SELECT                                                             
      WHEN SYSUSED = 0 THEN DO                                         
            SAY DSN " EMPTY LRECL = " SYSLRECL                         
            DSNOK = 'N'                                                 
      END                                                               
      WHEN SYSREASON > 1 THEN DO                                       
          MSGSTAT = MSG()                                               
          STAT = MSG('OFF')                                             
          DSN2 = DSN || '(0)'                                           
          DSNRTN = LISTDSI("'" || DSN2 || "'")                         
          STAT = MSG(MSGSTAT)                                           
                                                                       
          IF SYSUSED = 0 THEN DO                                       
              SAY DSN2 "DATASET EMPTY EMPTY LRECL = " SYSLRECL         
          END                                                           
          ELSE IF SYSREASON > 1 THEN DO                                 
              SAY DSN2 " NOT FOUND*"                                   
          END                                                           
          ELSE DO                                                       
              SAY DSN2 " FOUND LRECL = " SYSLRECL                       
          END                                                           
      END                                                               
      OTHERWISE DO                                                     
          DSNOK = 'Y'                                                   
      END                                                               
    END                                                                 
    RETURN DSNOK                                                       
                                                                       
CHECKDSN:                                                               
    ARG DSN                                                             
    CALL OUTTRAP "VAR."                                                 
    LISTDS "'" || DSN || "'"                                           
    CALL OUTTRAP "OFF"                                                 
    IF VAR.0 >= 3,                                                     
    &  SUBSTR(VAR.3,10,3) = 'GDG' THEN DO                               
        SAY DSN ' GDG BASE'                                             
        DSNOK = CHECKGDG(DSN, 0)                                       
    END                                                                 
    ELSE DO                                                             
      IF VAR.0 >= 7,                                                   
      &  SUBSTR(VAR.7,1,21) = 'MEMBER NAME NOT FOUND' THEN DO           
          SAY DSN ' PDS MEMBER NOT FOUND'                               
          DSNOK = 'N'                                                   
      END                                                               
      ELSE DO                                                           
          DSNOK = 'N'                                                   
          MSGSTAT = MSG()                                               
          STAT = MSG('OFF')                                             
          CALL OUTTRAP "VAR."                                           
          IF SYSDSN("'"DSN"'") = "OK" THEN DO                           
              CALL OUTTRAP "OFF"                                       
              CALL MSG MSGSTAT                                         
              DSNOK = GETDSI( DSN )                                     
          END                                                           
          ELSE DO                                                       
              CALL OUTTRAP "OFF"                                       
              CALL MSG MSGSTAT                                         
              STARTPOS = POS("(",DSN )                                 
              ENDPOS = POS(")",DSN,STARTPOS + 1)                       
              IF STARTPOS > 0 & ENDPOS > 0 THEN DO                     
                  DSN2 = SUBSTR(DSN,1,STARTPOS - 1 )                   
                  GEN = SUBSTR(DSN,STARTPOS+1, ENDPOS - STARTPOS -1 )   
                  IF GEN > 0 THEN DO                                   
                      SAY DSN2 || " GENERATION " || GEN || " NOT FOUND"
                      SAY "USING GENERATION (0)"                       
                      GEN = 0                                           
                  END                                                   
                  DSNOK = CHECKGDG(DSN2, GEN)                           
              END                                                       
              ELSE DO                                                   
                  SAY DSN || " NOT FOUND"                               
              END                                                       
          END                                                           
      END                                                               
    END                                                                 
    RETURN DSNOK                                                       
                                                                       
CHECKGDG:                                                               
    ARG DSN, GEN                                                       
    DSNOK = 'N'                                                         
                                                                       
    GEN2 = 0                                                           
    DSN2 = DSN                                                         
    CALL OUTTRAP "VAR."                                                 
    "LISTC LEVEL(" || DSN || ") ALL"                                   
    CALL OUTTRAP "OFF"                                                 
    DO I = VAR.0 TO 1 BY -1                                             
        IF SUBSTR(VAR.I,1,7) = "NONVSAM" THEN DO                       
            IF GEN = GEN2 THEN DO                                       
                DSN2 = SUBSTR(VAR.I,17)                                 
                LEAVE                                                   
            END                                                         
            ELSE DO                                                     
                GEN2 = GEN2 - 1                                         
            END                                                         
        END                                                             
    END                                                                 
    IF DSN = DSN2 THEN DO                                               
        SAY DSN || ' NOT FOUND'                                         
        DSNOK = 'N'                                                     
    END                                                                 
    ELSE DO                                                             
        SAY "BROWSING " || DSN2                                         
        DSNOK = GETDSI( DSN2 )                                         
        DSN = DSN2                                                     
    END                                                                 
    RETURN DSNOK                                                       

Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Mon Sep 24, 2007 1:08 pm    Post subject:
Reply with quote

Anil,

Whatever Aaru has posted, SWAT is the program which accepts two parameters, DSN name and the mode it should be opened.

I beleive he has'nt posted the code.

May be you can try Douglas code.

Douglas,

Thanks for sharing the code buddy.
Back to top
View user's profile Send private message
SCARCEBOYZ

New User


Joined: 16 May 2005
Posts: 32
Location: Millenium Business Park, Mumbai

PostPosted: Sat Oct 06, 2007 2:16 pm    Post subject: open the dataset without actually going through 3.4 utility
Reply with quote

---- I think I am too late in the discussion but it can be easily done by using EPDF command.

Syntax is EPDF 'dataset name'

Type above command on TSO panel and it will work.

Regards,
Vivek Tripathi
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Sat Oct 06, 2007 2:44 pm    Post subject:
Reply with quote

Vivek,

EPDF is shop specific.

Its not TSO command.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sat Oct 06, 2007 3:57 pm    Post subject:
Reply with quote

EPDF is not a TSO command, but an ISPF System Command, and is well documented in the fine manual.

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Oct 09, 2007 1:29 am    Post subject:
Reply with quote

Thank You Vivek. I had not heard of EPDF. Is it standard? It works for me.
Back to top
View user's profile Send private message
kannanakp
Currently Banned

New User


Joined: 02 Apr 2007
Posts: 3
Location: Chennai

PostPosted: Tue Oct 09, 2007 1:20 pm    Post subject: Here is the details for u
Reply with quote

Issue EPDF 'dataset name'. The dataset will be opened in EDIT MODE
If you want to open in view mode Issue: EPDF 'dataset name' VIEW.
Similary, for opening in BROWSEmode, type BROWSE at the end.

Hope this helps you.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Oct 09, 2007 1:49 pm    Post subject: Reply to: How to open a dataset without going through 3.4 ut
Reply with quote

EPDF command works fine for both PS and PDS. Thanks for this cool tip.
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

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 Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm


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