HotKey to directly access a file
Moderators: Frank Yaeger, DikDude, Moderator Group
HotKey to directly access a file
Hi there,
Hoping that someone can help me. I am looking for a solution to something that I saw in a previous job.
A few years ago when I was working for a different company, if I ever wanted to look at a file whilst I was looking at the JCL all I would need to do would be to place the cursor over the file and hit an action key (a PF key) .
This would directly take me into the file in edit mode. Does anyone know how I would set this up.
I am working on OS390.
Thanks in advance.
edit: making the subject more descriptive.
Hoping that someone can help me. I am looking for a solution to something that I saw in a previous job.
A few years ago when I was working for a different company, if I ever wanted to look at a file whilst I was looking at the JCL all I would need to do would be to place the cursor over the file and hit an action key (a PF key) .
This would directly take me into the file in edit mode. Does anyone know how I would set this up.
I am working on OS390.
Thanks in advance.
edit: making the subject more descriptive.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
HI,
I am exactly not sure what you are looking for but try this...may help you..
Assign PDFDSN E to any of the function key from your starting mainframe screen, you can get that screen by typing KEYS on first screen after your login.
Once you assign the PF key it will directly take you to the edit mode..when you place a cursor below that file and press PF KEY....
Thanks,
Pradeep.
I am exactly not sure what you are looking for but try this...may help you..
Assign PDFDSN E to any of the function key from your starting mainframe screen, you can get that screen by typing KEYS on first screen after your login.
Once you assign the PF key it will directly take you to the edit mode..when you place a cursor below that file and press PF KEY....
Thanks,
Pradeep.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
This edit macro allows the user to VIEW the data set located on the line that the cursor is on. The cursor can be anywhere on a line that has DSN= or DSNAME= but must be at the start of the data set name if there is no DSN= or DSNAME=.
Code: Select all
/* REXX */
/* TRACE ?R */
Address ISREDIT
"MACRO"
Address ISPEXEC "CONTROL ERRORS RETURN"
Address ISPEXEC "VGET ZPCFMCN PROFILE" /* get confirm setting */
If ZPCFMCN == '/' then CONF = 'YES'
Else CONF = 'NO'
/***********************************************/
/* BEGIN PROCESSING */
/***********************************************/
"(row,col) = CURSOR"
"(data1) = LINE " row /* data1 = cursor line */
/**********************************/
/* Find start of data set name */
/**********************************/
dsnstart = Pos('DSN=',data1) /* look for DSN= */
If dsnstart = 0 then do /* no DSN = */
dsnstart = Pos('DSNAME=',data1) /* look for DSNAME= */
If dsnstart = 0 then do /* no DSN= or DSNAME= */
"CURSOR = " row col /* cursor pos */
If col < 1 then dsnstart = 1 /* needed for ZV line cmd */
Else dsnstart = col /* assume cursor on DSN */
End
Else dsnstart = dsnstart + 7 /* DSNAME= specified in JCL */
End /* if dsnstart = 0 */
Else dsnstart = dsnstart + 4 /* DSN = specified in JCL */
/**********************************/
/* Find end of data set name */
/**********************************/
dsnend = Pos(',',data1,dsnstart) /* look for comma at end of dsn */
If dsnend = 0 then do /* no comma found */
dsnend = Pos(' ',data1,dsnstart) /* look for blank to end DSN */
If dsnend = 0 then do /* no blank or comma at end */
zedsmsg = 'No end of DSN'
zedlmsg = 'The data set name is not terminated with a' ,
'space or comma.'
Address ISPEXEC "SETMSG MSG(ISRZ001)" /* msg - with alarm */
"CURSOR = " row col /* put cursor back to last position */
Exit 8
End /* if dsnend = 0 */
Else dsnend = dsnend - 1 /* DSN ends with blank */
End /* if dsnend = 0 */
Else dsnend = dsnend - 1 /* DSN ends with comma */
/**********************************/
/* VIEW the data set */
/**********************************/
dsn = Substr(data1,dsnstart,dsnend-dsnstart+1) /* extract dsn */
dsn = Strip(Translate(dsn,"","'")) /* remove quotes if used */
Address ISPEXEC "VIEW DATASET('"dsn"') CONFIRM("conf")"
If RC <> 0 then Address ISPEXEC "SETMSG MSG("ZERRMSG")"
"CURSOR = " row col /* put cursor back to last position */
Exit 0
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Following info may be useful..
Open the jcl.. type KEYS command.
set PF4 command to DSNVIEW command.
It will work in all members in that PDS.
Now in any member in that PDS if you place cursor on the file name and press PF4 key that file will be opened in edit mode.
Open the jcl.. type KEYS command.
set PF4 command to DSNVIEW command.
It will work in all members in that PDS.
Code: Select all
Key Definitions Format Labels
PF4 DSNVIEW LONG DSNVIEW
Now in any member in that PDS if you place cursor on the file name and press PF4 key that file will be opened in edit mode.
Regards,
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
@Krishna,Krishna wrote:Following info may be useful..
Open the jcl.. type KEYS command.
set PF4 command to DSNVIEW command.
It will work in all members in that PDS.
Code: Select all
Key Definitions Format Labels PF4 DSNVIEW LONG DSNVIEW
Now in any member in that PDS if you place cursor on the file name and press PF4 key that file will be opened in edit mode.
Thanks for hte suggestion. I tried the DSNVIEW but I get the following message.
COMMAND DSNVIEW NOT FOUND
***
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
padair,
why have you not tried using the macro that Anuj provided?
there is no IBM offered macro or command that accomplishes what you want.
all the other suggestions are in-house macros, and as such need to be in your system.
why have you not tried using the macro that Anuj provided?
there is no IBM offered macro or command that accomplishes what you want.
all the other suggestions are in-house macros, and as such need to be in your system.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
That is what I am trying now. I had to google the REXX Userguide to see how to setp the script and see where to put it and how to execute it.dbzTHEdinosauer wrote:padair,
why have you not tried using the macro that Anuj provided?
there is no IBM offered macro or command that accomplishes what you want.
all the other suggestions are in-house macros, and as such need to be in your system.
Padair.
Go to the CBT Tape website.
Download the file File # 671 ZOOM edit macro to "cursor retrieve" datasets.
Follow the instructions for installing it on your system, or better yet, have your Systems Programming team install it for you and your entire shop.
Download the file File # 671 ZOOM edit macro to "cursor retrieve" datasets.
Follow the instructions for installing it on your system, or better yet, have your Systems Programming team install it for you and your entire shop.
Thanks for all of the help folks.MrSpock wrote:Go to the [url=http://www.cbttape-----/]CBT Tape[/url] website.
Download the file File # 671 ZOOM edit macro to "cursor retrieve" datasets.
Follow the instructions for installing it on your system, or better yet, have your Systems Programming team install it for you and your entire shop.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
DSNVIEW CLIST - REXX
Hello all,Krishna wrote:Following info may be useful..
Open the jcl.. type KEYS command.
set PF4 command to DSNVIEW command.
It will work in all members in that PDS.
Code: Select all
Key Definitions Format Labels PF4 DSNVIEW LONG DSNVIEW
Now in any member in that PDS if you place cursor on the file name and press PF4 key that file will be opened in edit mode.
I am asking on this old thread because is related to something I am trying to accomplish: To open on View / Edit a dataset or member from DSLIST panel.
Does anyone of you have the "DSNVIEW" clist?
I guess it is a REXX or CLIST placed on many companies, but not an IBM standard provided.
Thanks in advance
DSNVIEW CLIST - REXX
Hello Krishna (or another forum member):Krishna wrote:Following info may be useful..
Open the jcl.. type KEYS command.
set PF4 command to DSNVIEW command.
It will work in all members in that PDS.
Code: Select all
Key Definitions Format Labels PF4 DSNVIEW LONG DSNVIEW
Now in any member in that PDS if you place cursor on the file name and press PF4 key that file will be opened in edit mode.
By coincidence, do you have the DSNVIEW CLIST / REXX?
I am trying to accomplish something similar. Looks like DSNVIEW is a non-standard command list that it is used in many companies. Thanks!!
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page