View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 620 Topics: 173 Location: Stockholm, Sweden
|
Posted: Mon Nov 08, 2021 11:05 am Post subject: Pass a string from edit macro to command line |
|
|
Maybe I'm having a senior moment here, but I'm damned if I can think of how to do this.
What I would like to do would be to have a simple edit macro that analyzes the current code and generates a string such as
Quote: |
compare 'my.hlq.cobol(member)'
|
and places this on the command line without actually running the compare command (so the user could change the MY string to something else if they wanted to).
I tried the obvious of "exit 'my_string'" but edit doesn't like that.
I'm guessing there's a trivial way of doing this, but how ?
Alternatively ..... is there a way of defining a PFKEY such that it only returns the defined string rather than executing the actual command (ideally if it was doable, one could position the cursor to be placed in a particular column of the command line; in the example above, under the first m in member) _________________ Michael |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Mon Nov 08, 2021 4:11 pm Post subject: |
|
|
misi01,
If your intention is to generate a tso command then you can PUSH function to store the command into the TSO command stack. You can then PULL the command whenever you want it. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 620 Topics: 173 Location: Stockholm, Sweden
|
Posted: Tue Nov 09, 2021 1:57 am Post subject: |
|
|
How do you see that working ?
I'm editing a file in ISPF. From the command line, I run an edit macro that does (say)
Quote: |
push "compare 'xxx.yyyy.IKK.COBOL("ecele"x)'"
exit 1
|
but when I return to the edit screen, the stack still contains the compare command - that isn't read in by ISPF. Or am I misunderstanding your intention ? _________________ Michael |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 620 Topics: 173 Location: Stockholm, Sweden
|
Posted: Tue Nov 09, 2021 2:54 am Post subject: |
|
|
This is a follow-on explaining a bit more what I would like to do and what is happening as-is.
If I edit source code in "our" Endevor, I can enter the command
Quote: |
compare 'prod.code(same_member_as_being_edited)'
|
and compare will produce a "report" where differing lines are shown in blue/green with a label as shown below (.OAAAA is a line that differs from the prod code)
Quote: |
000015 * IAT473 211022 small bug when closing the current cursor
.OAAAA * IAT473 211109 IIV817 cursor needs to be closed deliberately
|
If I instead run a an edit macro that runs the following command
Quote: |
"compare 'IAT473.QERCVY06.RECOVERY' 'xxx.yyy.IKK.COBOL(IIV033)'"
|
I get a simple SYSOUT type of result (as if I'd run SUPERC from 3.13) along these lines
Quote: |
PAGE 0001 8:27:20 2021.313
VOL=SER=PRIA15 MEMBER= OLD DSN=IAT473.QERCVY06.RECOVERY
VOL=SER=MVS035 MEMBER=IIV033 NEW DSN=xxx.yyy.IKK.COBOL
-1- OLD--- * IAT473 211109 IIV817 cursor needs to be closed deliberat
---------------------------------------------------------------------
-1- OLD--- MOVE K-STANG-CURSOR TO IV81715-KD-DB-HANT
2- OLD--- CALL SUB-IIV817 USING IV81715-IV81715
3- OLD--- *
---------------------------------------------------------------------
2 BLOCKS OF COMPARE ERRORS DETECTED
|
I've run the command tso isrddn to see whether there's a "driver routine" for COMPARE, but "m compare" in ISRDDN says member not found.
I've tried googling to see whether there's a parameter I'm missing for COMPARE to produce such a result (the first), but I can't find anything.
I'm guessing it's all to do with the fact that I'm doing the compare via a macro rather than the command line (thereof my desire to "paste" the actual compare command onto the command line). _________________ Michael |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Tue Nov 09, 2021 9:18 am Post subject: |
|
|
Could you simply copy "compare 'my.hlq.cobol(member)' " to the clipboard, then paste the clipboard contents into your command line of the member you're editing? _________________ ....Terry |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 620 Topics: 173 Location: Stockholm, Sweden
|
Posted: Tue Nov 09, 2021 10:33 am Post subject: |
|
|
Indeed I could, but wouldn't it be neat if you could set a PF key that automatically picked up the name of the current member and did a compare on that vis-à-vis the corresponding production member.
Press PF key vs find the relevant notepad text, copy it, paste it, change the member name, press enter.
If it's doable, I know which I'd prefer. _________________ Michael |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 620 Topics: 173 Location: Stockholm, Sweden
|
Posted: Tue Nov 09, 2021 11:54 pm Post subject: |
|
|
It occurred to me just now. logically, what is the difference between what I'm trying to do and the default setting of PF12, the retrieve key.
Both fetch a string from somewhere and then place it on the command line, without actually executing the command?
The only question is, how does the retrieve key do that? _________________ Michael |
|
Back to top |
|
|
|
|