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
 

 

Something to ponder over the weekend...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
prino

Senior Member


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

PostPosted: Sat May 07, 2011 5:43 pm    Post subject: Something to ponder over the weekend...
Reply with quote

I have a REXX exec (VBACKEND) that, combined with a number of "Vx" entries in my user-command table allows me to view or edit most of my personal libraries, e.g. if I enter
Code:
vp whatever

I end up VIEWing member "whatever" in my PLI library. To a certain extent it's comparable to Mark Zelden's FVE, except for the fact that he requires the macro to be changed to add new libraries, while I just require the command-table to contain entries like:

Code:
Verb      T  Action
VR        0  SELECT CMD(%VBACKEND exec,view,&ZPARM) NEWAPPL(ISR)
VRE       0  SELECT CMD(%VBACKEND exec,edit,&ZPARM) NEWAPPL(ISR)
VP        0  SELECT CMD(%VBACKEND pli,view,&ZPARM) NEWAPPL(ISR)
VPE       0  SELECT CMD(%VBACKEND pli,edit,&ZPARM) NEWAPPL(ISR)
VT        0  SELECT CMD(%VBACKEND text,view,&ZPARM) NEWAPPL(ISR)
VTE       0  SELECT CMD(%VBACKEND text,edit,&ZPARM) NEWAPPL(ISR)

As two asides,
  1. yes, my command tables, even on z/OS 1.6, actually contain lowercase characters in the action field
  2. using a NEWAPPL(ISR) caters for those situations (aka SDSF) that don't recognize some ISPF commands, most notably RETRIEVE
Now, this week I finally decided that it would be nice to move all the JCL that is splattered throughout the PL/I end REXX libraries into a separate CNTL library.

Other than the fact that this took me a while, it wasn't not just a matter of moving the members, but I also had to update the $$$INDEX members in my PLI and REXX libs, the code that is responsible for making XMIT files with a built-in PC batchfile to set the last modified date of the PC-extracted file to that of the z/OS equivalent and some routines that automate the updating of members based on external events, a.k.a making another hitchhiking trip. icon_lol.gif

However, automatism's die hard, and if I enter accidentally enter "vr batch" rather than the new "vc batch" it would be a bit annoying to see

Code:
EDIT       PRINO.RAHP.EXEC(BATCH) - 01.00                  Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100                       ** Moved to CNTL library **
****** **************************** Bottom of Data ****************************

rather than
Code:
EDIT       PRINO.RAHP.CNTL(BATCH) - 01.00                  Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100 //PRINOISP JOB (PRINO),
000200 //             'ISPF BATCH',
000300 //             CLASS=A,
000400 //             MSGCLASS=H,
000500 //             MSGLEVEL=(2,0),
000600 //             NOTIFY=&SYSUID
000700 //*********************************************************************
000800 //         SET CNTL='PRINO.RAHP.CNTL'
000900 //         SET REXX='PRINO.RAHP.REXX'
001000 //*
001100 //         SET OUTC='*'
001200 //         SET OUTD='*'
001300 //*********************************************************************
001400 //PROCS JCLLIB ORDER=(&CNTL)
001500 //*********************************************************************
001600 //ISPFBAT EXEC PGM=IKJEFT01,
001700 //             REGION=0M,
001800 //             DYNAMNBR=50,
001900 //             PARM='%ISPFBAT B&SYSUID'
002000 //*
002100 //     INCLUDE MEMBER=ISPF@ICI
****** **************************** Bottom of Data ****************************

So what did I do to rectify the situation? Try to come up with something before scrolling down...














































Well, this was an excerpt of the old VBACKEND:

Code:
VIEW       PRINO.RAHP.EXEC(VBACKEND) - 01.00               Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 52 Line(s) not Displayed
005300 "ispexec lminit dataid(dsn) dataset('"getvar(type'RAHP')"') enq(shr)"
005400 "ispexec" mode "dataid("dsn") member("parm")"
005500 "ispexec lmfree dataid("dsn")"
005600 exit
****** **************************** Bottom of Data ****************************

NB: getvar is a routine I use to retrieve site-dependent data from one place, which allows very easy migration from site to site, as I only need to make changes in one single exec, rather than, in my case, 97!

This is what VBACKEND now looks like:

Code:
VIEW       PRINO.RAHP.EXEC(VBACKEND) - 01.00               Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 52 Line(s) not Displayed
005300 if mode = 'browse' then
005400   macro = ''
005500 else
005600   macro = 'macro(ecntl)'
005700
005800 "ispexec lminit dataid(dsn) dataset('"getvar(type'RAHP')"') enq(shr)"
005900 "ispexec" mode "dataid("dsn") member("parm")" macro
006000 "ispexec lmfree dataid("dsn")"
006100 exit
****** **************************** Bottom of Data ****************************

with ecntl containing:

Code:
VIEW       PRINO.RAHP.EXEC(ECNTL) - 01.00                  Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100 /* REXX edit macro to seamlessly access members in CNTL library       */
000200 "isredit macro"
000300 "isredit (N) = linenum .zl"
000400 if n = 0 then
000500   exit
000600
000700 "isredit (L) = line .zf"
000800 if strip(l) \= '** Moved to CNTL library **' then
000900   exit
001000
001100 "isredit (MEM) = member"
001200 "isredit (SES) = session"
001300
001400 if left(ses, 1) = 'V' then
001500   zcmd = ";vc" mem
001600 else
001700   zcmd = ";vce" mem
001800
001900 "isredit can"
002000
002100 "ispexec control nondispl end"
002200 "ispexec display panel(isr@prim)"
****** **************************** Bottom of Data ****************************

I guess it will be pretty easy to follow what's happening, but just in case:
  • @000300-000500: don't do anything when accessing an empty/new member
  • @000700-000900: don't do anything if this is not a stub
  • @001100-001700: build the command that should have been used
  • @001900: cancel the current session
  • @002000-002100: more or less z/OS version independent trick of actaully executing the required command
This works like a charm, and what's more, it even works when I enter "vp" or "vr" without a member name and am presented with a member-list. Selecting any of the "moved" members will automagically redirect me to the version in my CNTL library.

Finally, by putting "ECNTL" in the "Initial Macro" field on the Edit and View panels, it will also do a completely transparent redirection from these panels.

In all cases the macro (ECNTL) will be executed before any user (profile) defined initial macro.

Maybe this is useful, I'm interested in anything you might think about it.
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 Daylight Saving this Weekend Bill O'Boyle All Other Mainframe Topics 1 Fri Mar 11, 2016 8:40 pm
This topic is locked: you cannot edit posts or make replies. Jobs At HCL Technologies - Weekend Dr... mjadwani2785 Mainframe Jobs 0 Thu Feb 18, 2016 8:31 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Testing--- Weekend at Pune ... ashishgupta786 Mainframe Jobs 0 Thu Jun 27, 2013 12:14 am
No new posts Weekend stress buster Pandora-Box General Talk & Fun Stuff 4 Sat Feb 23, 2013 12:15 am
This topic is locked: you cannot edit posts or make replies. Weekend Walkin on 9th Feb, Pune, Acce... enikhilk Mainframe Jobs 0 Fri Feb 08, 2013 2:36 pm


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