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

Same command as on commandline in REXX / Clist / ISREDIT / ?


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

New User


Joined: 17 Sep 2017
Posts: 6
Location: netherlands

PostPosted: Tue Aug 24, 2021 9:13 pm
Reply with quote

Dear all,

expat wrote:
You can use an ISPF edit macro to issue almost all of the commands that you use at the terminal.

That sounds very good. What is the syntax to use when you want to give the same command as in a pfkey or on a commandline. For example, the commands are:

L 0;F WORK 8;:.W;F PROC 8;:.P

Just setting labels .w and .p at certain positions in your cobol source. Can this also be done in one string in a ISREDIT or any other way as if it was the commandline?

Thanks!!!
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 24, 2021 9:49 pm
Reply with quote

You should become familiar with the "Edit and Edit Macros" manual.

Create a rexx program, starting with:
Code:
/* rexx */
Address ISREDIT
"MACRO"
"LOCATE 0"

Add a new statement for every editor command you want to execute.

Make sure to put your rexx program in your SYSPROC or SYSEXEC concatenation. To execute it, just type the member name in the primary command line and press Enter.
Back to top
View user's profile Send private message
ronald wouterosn

New User


Joined: 17 Sep 2017
Posts: 6
Location: netherlands

PostPosted: Tue Aug 24, 2021 10:13 pm
Reply with quote

ok, thanks. I understand that.

Is there also a way that you can just use the identical command text as in the example? So several short commands with the

;

as a delimiter? I ask this because I do exactly that with my mainframe look-alike SPFSE editor that can run macro's with a copy of the commandline and just executes them. It also runs almost endless commands concatenated.

I have a lot of them and some of them I want to use on the mainframe, but then it seems I have to do special commands like

"LABEL .ZCSR = .P"

Which is much longer and is a kind of translation.

I am looking for a kind of macro that is able to run the command just like we can enter in a PFKEY or on the commandline.

I am looking for that if it can be done.

For example, on the PC I can change a cobol listing into a cobol source with one LST2COB command. Only at my office, it is not allowed to use the SPFSE editor .... 😁 So I have to convert it into a ISREDIT macro or perhaps there exists a smart REXX ???

Thanks!!!
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1314
Location: Vilnius, Lithuania

PostPosted: Wed Aug 25, 2021 12:19 am
Reply with quote

z/OS ISPF is not SPFSE, what you're asking cannot be done, and this is the second answer that tells you so.

Don't ask again! z/OS' ISPF is not SPFSE, learn to live with it.
Back to top
View user's profile Send private message
ronald wouterosn

New User


Joined: 17 Sep 2017
Posts: 6
Location: netherlands

PostPosted: Wed Aug 25, 2021 12:41 am
Reply with quote

ok, thanks.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Aug 25, 2021 12:58 am
Reply with quote

If I understand your question, I was able to write an Edit Macro to process the string of commands as you show.

While in your Cobol code in Edit or View, type: smrexx and press enter.

It may need to be tweaked for you needs, but it is a start.

See here:

Code:
    MY.LIB.REXX(SMREXX) - 01.06
 ===>
***************************** Top of Data **
/* Rexx */

"ISREDIT MACRO"
cmd_line = 'L 0;F WORK 8;:.W;F PROC 8;:.P'

done = 0
do until done
  semi = pos(';',cmd_line)
  if semi = 0 then do
    done = 1
    cmd = substr(cmd_line,semi+1)
    call process_cmd
  end
  else do
    cmd = left(cmd_line,semi-1)
    call process_cmd
    cmd_line = substr(cmd_line,semi+1)
  end
end
exit

process_cmd: nop
select
  when left(cmd,1) = ':' then do
    isr_cmd = substr(cmd,2)
    "isredit label .zcsr =" isr_CMD " 0"
  end
  otherwise "isredit " cmd
end
exit_process_cmd: nop
return
Back to top
View user's profile Send private message
ronald wouterosn

New User


Joined: 17 Sep 2017
Posts: 6
Location: netherlands

PostPosted: Wed Aug 25, 2021 1:59 am
Reply with quote

Thanks daveporcelan! icon_biggrin.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 Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Starting a PROC with parameters from ... CLIST & REXX 6
No new posts Help needed in automation cics transa... CLIST & REXX 1
Search our Forums:

Back to Top