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
 

 

REXX Shortcuts

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

New User


Joined: 15 Nov 2014
Posts: 1
Location: Portugal

PostPosted: Tue Nov 18, 2014 4:39 pm    Post subject: REXX Shortcuts
Reply with quote

Hi everbody,

The previous bank that I worked for had 2 REXX shortcuts very handy:

1. shortcut: SSD
In the command line we type SSD and we go directly to job output instead of doing S;ST

2. COB
In our COBOL Source, we could compile directly by member with shortcut COB, that would call 2 jobs: compile & bind (the program name would be retrieved and the compilation job would be submitted).

Any expert on REXX that could help me ?

Many thanks.
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: Tue Nov 18, 2014 5:38 pm    Post subject:
Reply with quote

They sound like "In house" routines, so unless you cribbed a copy .......
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Nov 19, 2014 10:09 pm    Post subject: Reply to: REXX Shortcuts
Reply with quote

re: COB

You need an editor macro that:

1. issues SAVE (so the compile job gets your latest changes)
2. uses DATASET and MEMBER statements to determine what you are editing.
3. Build job to compile the member being edited.
4. submit the job.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Feb 15, 2016 4:00 pm    Post subject:
Reply with quote

Just saw this... a little late in response, perhaps it's still useful?

SSD:
Code:
/*REXX*/                                                           
ADDRESS ISPEXEC "SELECT PGM(ISFISP) NEWAPPL(ISF) NOCHECK PARM(ST)",
                       "SCRNAME(SSD) "

COB:
Needs a Compile&Link skeleton: COBCL
(you will probably need to tailor this ?)
Code:
//IGYCRCTL PROC MEMBER=,
//            SOURCE=,
//            LOAD=,
//            OPTS='QUOTE,NONUMBER,NOLIST,NOMAP',
//            WSPACE='CYL,(1,1)'
//COMPILE  EXEC PGM=IGYCRCTL,PARM=(&OPTS)
//STEPLIB  DD DSN=SYS1.COB2LIB,DISP=SHR
//SYSUT1   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT2   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT3   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT4   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT5   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT6   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSUT7   DD UNIT=VIO,SPACE=(&WSPACE)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DSN=&SOURCE(&MEMBER),DISP=SHR
//SYSLIN   DD DSN=&&OBJECT,DISP=(,PASS),
//            LRECL=80,BLKSIZE=3120,RECFM=FB,
//            SPACE=(&WSPACE)
//LKED     EXEC PGM=IEWL,REGION=1024K,
//            PARM='XREF,LIST,LET',COND=(4,LT,COMPILE)
//SYSPRINT DD SYSOUT=*
//SYSLIB   DD DISP=SHR,DSN=SYS1.COB2LIB
//         DD DISP=SHR,DSN=SYS1.SCEELKED
//         DD DISP=SHR,DSN=SYS1.SCEESAMP
//SYSLIN   DD DSN=&&OBJECT,DISP=(OLD,DELETE)
//SYSLMOD  DD DISP=SHR,DSN=&LOAD(&MEMBER)
//SYSUT1   DD UNIT=VIO,BLKSIZE=1024,SPACE=(CYL,(1,1))
//SYSTERM  DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//IGYCRCTL PEND
//*


And another little skeleton: COB:
Code:
//COMPILE  EXEC IGYCRCTL,     
//         MEMBER='&MBR',     
//         SOURCE='&LIB',     
//         LOAD='&LOAD'       


Then a Macro: COB
Code:
/*REXX*/ TRACE "O"                         
ADDRESS ISPEXEC "CONTROL ERRORS RETURN "   
ADDRESS ISREDIT                             
"MACRO NOPROCESS "                         
"(LIB) = DATASET "                         
"(MBR) = MEMBER "                           
load = LEFT(lib,LASTPOS(".",lib))"LOAD"     
ADDRESS ISPEXEC "FTOPEN TEMP "             
ADDRESS ISPEXEC "FTINCL ISRJSJC "           
ADDRESS ISPEXEC "FTINCL COBCL NOFT "       
ADDRESS ISPEXEC "FTINCL COB "               
ADDRESS ISPEXEC "FTCLOSE "                 
ADDRESS ISPEXEC "VGET (ZTEMPF) SHARED "     
ADDRESS TSO "SUBMIT '"ztempf"'"             
EXIT     


As you can see this reys on a standard name for the LOADLIB which is related to the source library.
I tried this on a little DUMMY program as the last 'real' COBOL program I wrote was punched on an IBM Model 27!

/Steve
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Feb 15, 2016 4:05 pm    Post subject:
Reply with quote

Oh yes, another assumption is you have a jobcard set up in ISPF Option 5.
It uses the standard skeleton ISRJSJC to pull this in.
/S icon_cool.gif
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 96
Location: Switzerland

PostPosted: Mon Feb 15, 2016 5:56 pm    Post subject:
Reply with quote

Re the SDSF thingie, for that you will need an ISPF command table entry. The ISPCMDU program in WWW.CBTTAPE.ORG file 349 lets you do that dynamically.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Feb 15, 2016 6:21 pm    Post subject: Reply to: REXX Shortcuts
Reply with quote

see here for CTBADD and CTBSTO snippets
http://ibmmainframes.com/viewtopic.php?t=56254&highlight=ctbadd
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Tue Feb 16, 2016 3:59 pm    Post subject:
Reply with quote

One can do it the "clumsy" way too.
► 3.3 copy 'ISPPROF' (mine's called ISPF.ISPPROF here) member ISRCMDS to XXXCMDS
► 3.9 Add your SSD command: as SELECT CMD(SSD)
(I close all other screens at this point, just in case I screw something up somehow)
► 3.3 copy 'ISPPROF' member XXXCMDS to ISRCMDS (or use TSO COPY or SMCOPY in native if you are extra paranoid)
► Restart ISPF (not sure this is essential but I do it)
/Steve
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Tue Feb 16, 2016 5:06 pm    Post subject:
Reply with quote

Or you can do it with a little exec:

Code:
/* REXX exec to update my command tables                              */
/*** trace ?r ***************************************************** \| *
*               (C) Copyright Robert AH Prins, 2009-2016               *
************************************************************************
*  ------------------------------------------------------------------  *
* | Date       | By   | Remarks                                      | *
* |------------+------+----------------------------------------------| *
* |            |      |                                              | *
* |------------+------+----------------------------------------------| *
* | 2010-05-13 | RAHP | Use ISPTABL, not ISPPROF                     | *
* |------------+------+----------------------------------------------| *
* | 2009-04-16 | RAHP | Now RAHP- and HERECMDS                       | *
* |------------+------+----------------------------------------------| *
* | 2009-04-08 | RAHP | Initial version                              | *
* |------------+------+----------------------------------------------| *
************************************************************************
* UCMDS is a REXX exec to update my site-independent (RAHPCMDS) and    *
* site-specific (HERECMDS) tables. Because it is not possible to       *
* update an open ISPF command table, this exec copies it to $$$$CMDS,  *
* invokes ISPUCM (the command table update program) with a parameter   *
* of $$$$ and then copies the updated table back to USERCMDS. Note     *
* that is necessary to restart ISPF to enable any new commands.        *
*                                                                      *
* Copies of the new command tables are saved to my exec library.       *
************************************************************************
* Send questions, suggestions and/or bug reports to:                   *
*                                                                      *
* robert@prino.org / robert.ah.prins@gmail.com                         *
*                                                                      *
* Robert AH Prins                                                      *
* Taboralaan 46                                                        *
* 8400 Oostende                                                        *
* Belgium                                                              *
************************************************************************
* This program is free software: you can redistribute it and/or        *
* modify it under the terms of the GNU General Public License as       *
* published by the Free Software Foundation, either version 3 of       *
* the License, or (at your option) any later version.                  *
*                                                                      *
* This program is distributed in the hope that it will be useful,      *
* but WITHOUT ANY WARRANTY; without even the implied warranty of       *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the         *
* GNU General Public License for more details.                         *
*                                                                      *
* You should have received a copy of the GNU General Public License    *
* along with this program. If not, see <http://www.gnu.org/licenses/>  *
***********************************************************************/
parse source source
parse value source with . . moi .

user.1 = 'RAHP'
user.2 = 'HERE'
user.0 = 2

"ispexec vget (ucmds) shared"

if rc = 0 then
  do
    "ispexec verase (ucmds) shared"

    temp = copies('$', length(ucmds))

    "isredit macro"
    "isredit (MEM) = member"

    now = date('S')
    now = substr(now, 1, 4) || '/' ||,
          substr(now, 5, 2) || '/' ||,
          substr(now, 7, 2)

    select
      when mem = temp'CMDS' then
        "isredit c '"temp"CMDS' '"ucmds"CMDS' first"

      otherwise
    end

    "isredit end"

    exit
  end

!tabl = getvar('ispTABL')

drop isptabl
drop exec

"ispexec lminit dataid("isptabl") ddname(isptabl) enq(shrw)"
"ispexec lminit dataid("exec")",
               "dataset('"getvar('execRAHP')"') enq(shrw)"

do u = 1 to user.0
  temp  = copies('$', length(user.u))
  ucmds = user.u

  "alloc f(i) da('"!tabl"("user.u"cmds)') shr reu"
  "alloc f(o) da('"!tabl"("temp"cmds)') shr reu"

  "execio * diskr i (finis"
  "execio" queued() "diskw o (finis"

  "ispexec select pgm(ispucm) parm("temp")"

  "ispexec vput (ucmds) shared"
  "ispexec edit   dataid("isptabl") member("temp"cmds) macro("moi")"

  "execio * diskr o (finis"
  "execio" queued() "diskw i (finis"

  "free f(i)"
  "free f(o)"

  "ispexec lmcopy fromid("isptabl")   todataid("exec")",
                 "frommem("temp"cmds) tomem("user.u"cmds) replace"
end

"ispexec lmfree dataid("exec")"
"ispexec lmfree dataid("isptabl")"
exit


Note: "getvar" is my routine to retrieve all kinds of data from one location, making it easy to port my exec library from one location to another, I only have to change one single member! For those interested, it's on "that" system ask me and I'll give you RACF READ access.
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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