View previous topic :: View next topic
|
Author |
Message |
ronald wouterosn
New User
Joined: 17 Sep 2017 Posts: 6 Location: netherlands
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
ronald wouterosn
New User
Joined: 17 Sep 2017 Posts: 6 Location: netherlands
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
ronald wouterosn
New User
Joined: 17 Sep 2017 Posts: 6 Location: netherlands
|
|
|
|
ok, thanks. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
ronald wouterosn
New User
Joined: 17 Sep 2017 Posts: 6 Location: netherlands
|
|
|
|
Thanks daveporcelan! |
|
Back to top |
|
|
|