MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pass a string from edit macro to command line

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Mon Nov 08, 2021 11:05 am    Post subject: Pass a string from edit macro to command line Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Mon Nov 08, 2021 4:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Tue Nov 09, 2021 1:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Tue Nov 09, 2021 2:54 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Tue Nov 09, 2021 9:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Tue Nov 09, 2021 10:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Tue Nov 09, 2021 11:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group