Help make XEDIT and ISPF EDIT keystroke compatible (WAS: XEDIT Macro and Command Line Input)

2011-08-08 Thread Bob
Phil,
Thanks.  You are right.  I was trying too hard. Checking queued() was exactly
what I needed.

And yes, I am trying to get my VM and MVS environments to behave somewhat
alike.  Like you said fingers get trained. And, after 30+ years my fingers are
very well trained! The problem is that over the years I have spent time in both
camps so I have issues either way I go. My co-workers laugh because
my MVS world has always understood QQ  FILE. (And I always have
'autosave' turned off.)

Right now I'm starting to do more in the VM world and I find that by using
PF7/PF8 all I succeed in doing losing my place in my document.

Going the other way, I keep wanting to use X in ISPF 3.4 ... and my dataset
just disappears!

So, SCROLL is destined to be assigned to all the pf keys I expect to scroll
the screen and make it behave more like ISPF.

And I would be happy to collaborate on making this happen.

(And I know you suggested that I contact you off-list, but I'm betting we are
not the only ones that would like these capabilities.  And, we are probably
're-inventing the wheel' in many cases.  Perhaps, we will get some others
offering tools that they have already created.)

Bob


On Sat, Aug 6, 2011 at 7:23 AM, Phil Smith III li...@akphs.com wrote:
 Bob,

 You're actually trying too hard: your macro should just look at QUEUED() and
 see if there's something stacked.

 This is a crude example, because you probably want to do more than just a
 LOCATE * for a M (like EXTRACT /SCREEN and divide by 2, then make it
        'COMMAND * -'n
 or some such), but:

 /**/
 if queued()  0 then pull op
 else op = ''
 if abbrev('MAX', op, 1) then 'COMMAND LOCATE *'
 else 'COMMAND FORWARD' op

 BTW, are you trying to do an SPF-ish environment in XEDIT? If so, please
 contact me off-list -- I'd be interested in helping. Not that I think SPF is
 better*, but I understand that the fingers get trained (now that I'm doing
 z/OS, I find myself doing FIND instead of / in XEDIT and KEDIT sometimes!),
 and it's been something that folks have talked about for a long time.

 ...phsiii

 * Insert religious editor war here

 -Original Message-
 Bob mvs...@gmail.com
 Subject: XEDIT Macro and Command Line Input

 I'm struggling trying to write an XEDIT macro and hoping someone can help=
  me=20
 over a tiny stumbling block.

 I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

 And I want to be able to accept an *optional* command line parameter.

 If there is always a command line parameter I seem to be able to use
 READ CMDLINE to get it.  However, this does not seem to work=20
 when there is no command line parameter at all.  I just get hung
 at the READ CMDLINE until I hit enter. Also, when there is a
 parameter I not only what to read it, but I want to consume it so that
 it is no longer on the command line after my macro.

 Is there a way to do this?




Re: Help make XEDIT and ISPF EDIT keystroke compatible (WAS: XEDIT Macro and Command Line Input)

2011-08-08 Thread Les Koehler
Speaking of fingers being trained: I've always used an IBM 
101 keyboard ever since IBM started using pc's and my 
fingers *still* can't get used to where the arrow keys are 
on it! I think they remember a 3279-3x.


My first laptop, in 2009, gave me conniption fits until I 
modified a 101 keyboard to add footpads (for air 
circulation) and a PS/2 to USB adapter for it so it can 
bridge the laptop keyboard. A small fan to the right of my 
recliner adds some extra circulation and a usb driven 
portable fan goes with me when I'm traveling. So I have the 
same keyboard for both the laptop and desktop. With THE as 
my editor, in Xedit mode, it's just about like being back on VM!


Les

Bob wrote:

Phil,
Thanks.  You are right.  I was trying too hard. Checking queued() was exactly
what I needed.

And yes, I am trying to get my VM and MVS environments to behave somewhat
alike.  Like you said fingers get trained. And, after 30+ years my fingers are
very well trained! The problem is that over the years I have spent time in both
camps so I have issues either way I go. My co-workers laugh because
my MVS world has always understood QQ  FILE. (And I always have
'autosave' turned off.)

Right now I'm starting to do more in the VM world and I find that by using
PF7/PF8 all I succeed in doing losing my place in my document.

Going the other way, I keep wanting to use X in ISPF 3.4 ... and my dataset
just disappears!

So, SCROLL is destined to be assigned to all the pf keys I expect to scroll
the screen and make it behave more like ISPF.

And I would be happy to collaborate on making this happen.

(And I know you suggested that I contact you off-list, but I'm betting we are
not the only ones that would like these capabilities.  And, we are probably
're-inventing the wheel' in many cases.  Perhaps, we will get some others
offering tools that they have already created.)

Bob


On Sat, Aug 6, 2011 at 7:23 AM, Phil Smith III li...@akphs.com wrote:

Bob,

You're actually trying too hard: your macro should just look at QUEUED() and
see if there's something stacked.

This is a crude example, because you probably want to do more than just a
LOCATE * for a M (like EXTRACT /SCREEN and divide by 2, then make it
   'COMMAND * -'n
or some such), but:

/**/
if queued()  0 then pull op
else op = ''
if abbrev('MAX', op, 1) then 'COMMAND LOCATE *'
else 'COMMAND FORWARD' op

BTW, are you trying to do an SPF-ish environment in XEDIT? If so, please
contact me off-list -- I'd be interested in helping. Not that I think SPF is
better*, but I understand that the fingers get trained (now that I'm doing
z/OS, I find myself doing FIND instead of / in XEDIT and KEDIT sometimes!),
and it's been something that folks have talked about for a long time.

...phsiii

* Insert religious editor war here

-Original Message-
Bob mvs...@gmail.com
Subject: XEDIT Macro and Command Line Input

I'm struggling trying to write an XEDIT macro and hoping someone can help=
 me=20
over a tiny stumbling block.

I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

And I want to be able to accept an *optional* command line parameter.

If there is always a command line parameter I seem to be able to use
READ CMDLINE to get it.  However, this does not seem to work=20
when there is no command line parameter at all.  I just get hung
at the READ CMDLINE until I hit enter. Also, when there is a
parameter I not only what to read it, but I want to consume it so that
it is no longer on the command line after my macro.

Is there a way to do this?






Re: XEDIT Macro and Command Line Input

2011-08-07 Thread Phil Smith III
Les Koehler wrote:
Isn't there an SPF macro package in the VM Download Library? 
In the old days of IGS in Tampa we had a lot of folks that 
had the same problem you have and I know I saw it resolved 
more than once. But maybe none of those solutions found 
their way to the Library (sigh).

Yeah, doesn't look like it...

...phsiii

P.S. Their problem was that they had started working on z/OS instead of
z/VM? Yeah, that makes sense... :-)


Re: XEDIT Macro and Command Line Input

2011-08-06 Thread Phil Smith III
Bob,

You're actually trying too hard: your macro should just look at QUEUED() and
see if there's something stacked.

This is a crude example, because you probably want to do more than just a
LOCATE * for a M (like EXTRACT /SCREEN and divide by 2, then make it 
'COMMAND * -'n
or some such), but:

/**/
if queued()  0 then pull op
else op = ''
if abbrev('MAX', op, 1) then 'COMMAND LOCATE *'
else 'COMMAND FORWARD' op

BTW, are you trying to do an SPF-ish environment in XEDIT? If so, please
contact me off-list -- I'd be interested in helping. Not that I think SPF is
better*, but I understand that the fingers get trained (now that I'm doing
z/OS, I find myself doing FIND instead of / in XEDIT and KEDIT sometimes!),
and it's been something that folks have talked about for a long time.

...phsiii

* Insert religious editor war here

-Original Message-
Bob mvs...@gmail.com
Subject: XEDIT Macro and Command Line Input

I'm struggling trying to write an XEDIT macro and hoping someone can help=
 me=20
over a tiny stumbling block.

I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

And I want to be able to accept an *optional* command line parameter.

If there is always a command line parameter I seem to be able to use
READ CMDLINE to get it.  However, this does not seem to work=20
when there is no command line parameter at all.  I just get hung
at the READ CMDLINE until I hit enter. Also, when there is a
parameter I not only what to read it, but I want to consume it so that
it is no longer on the command line after my macro.

Is there a way to do this?


Re: XEDIT Macro and Command Line Input

2011-08-06 Thread Les Koehler

Phil,

Isn't there an SPF macro package in the VM Download Library? 
In the old days of IGS in Tampa we had a lot of folks that 
had the same problem you have and I know I saw it resolved 
more than once. But maybe none of those solutions found 
their way to the Library (sigh).


Les

Phil Smith III wrote:

Bob,

You're actually trying too hard: your macro should just look at QUEUED() and
see if there's something stacked.

This is a crude example, because you probably want to do more than just a
LOCATE * for a M (like EXTRACT /SCREEN and divide by 2, then make it 
	'COMMAND * -'n

or some such), but:

/**/
if queued()  0 then pull op
else op = ''
if abbrev('MAX', op, 1) then 'COMMAND LOCATE *'
else 'COMMAND FORWARD' op

BTW, are you trying to do an SPF-ish environment in XEDIT? If so, please
contact me off-list -- I'd be interested in helping. Not that I think SPF is
better*, but I understand that the fingers get trained (now that I'm doing
z/OS, I find myself doing FIND instead of / in XEDIT and KEDIT sometimes!),
and it's been something that folks have talked about for a long time.

...phsiii

* Insert religious editor war here

-Original Message-
Bob mvs...@gmail.com
Subject: XEDIT Macro and Command Line Input

I'm struggling trying to write an XEDIT macro and hoping someone can help=
 me=20
over a tiny stumbling block.

I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

And I want to be able to accept an *optional* command line parameter.

If there is always a command line parameter I seem to be able to use
READ CMDLINE to get it.  However, this does not seem to work=20
when there is no command line parameter at all.  I just get hung
at the READ CMDLINE until I hit enter. Also, when there is a
parameter I not only what to read it, but I want to consume it so that
it is no longer on the command line after my macro.

Is there a way to do this?



XEDIT Macro and Command Line Input

2011-08-05 Thread Bob
I'm struggling trying to write an XEDIT macro and hoping someone can help
 me 
over a tiny stumbling block.

I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

And I want to be able to accept an *optional* command line parameter.

If there is always a command line parameter I seem to be able to use
READ CMDLINE to get it.  However, this does not seem to work 
when there is no command line parameter at all.  I just get hung
at the READ CMDLINE until I hit enter. Also, when there is a
parameter I not only what to read it, but I want to consume it so that
it is no longer on the command line after my macro.

Is there a way to do this?

Thanks!
Bob


Re: XEDIT Macro and Command Line Input

2011-08-05 Thread Les Koehler
One idea (from my memory): Use EXTRACT /CURSOR/ to see if 
the cursor is past the first character of the cmdline. If so 
then READ CMDLINE should put the cmdline data on the stack 
so you can PARSE PULL it.


When in doubt about how something like READ actually works, 
use the HELP command.


A lot of the XEDIT details have faded from my memory, so you 
might have to experiment or wait for a post from a more 
active XEDIT user. These days I pretty much use it to 
compare THE on the pc against it.


Les

Bob wrote:

I'm struggling trying to write an XEDIT macro and hoping someone can help
 me 
over a tiny stumbling block.


I want a pfkey set to a macro.  ie. SET PF6 BEFORE MACRO SCROLL

And I want to be able to accept an *optional* command line parameter.

If there is always a command line parameter I seem to be able to use
READ CMDLINE to get it.  However, this does not seem to work 
when there is no command line parameter at all.  I just get hung

at the READ CMDLINE until I hit enter. Also, when there is a
parameter I not only what to read it, but I want to consume it so that
it is no longer on the command line after my macro.

Is there a way to do this?

Thanks!
Bob 



Re: XEDIT macro question

2009-05-13 Thread Phil Smith III
Huegel, Thomas wrote:
I have a simple question about a XEDIT  macro.

I have a macro that does a locate and select on some lines and then
displays the selected lines.

My question, is there a way to find the number of lines that have been
selected without counting them as I select them?
EXTRACT '/selectedlines/'  doesn't seem to exist..

As others have noted, extract /nbscope is the right answer. I've had a short 
macro called ALLSIZE for 25 years:

/*
   ALLSIZE XEDIT -- Show number of lines displayed after ALL and friends.

   No operands are needed or checked for.

*/
   'COMMAND EXTRACT/NBSCOPE'
   if nbscope.1 = 0 then nbscope.1 = 'No'
   if nbscope.1 = 1 then 'COMMAND MSG 1 line is currently displayed.'
   else 'COMMAND MSG' nbscope.1 'lines are currently displayed.'
-30-

I use this in conjunction with TALL (Toggle ALL), TN (go to next selected line, 
even when viewing entire file after TALL), TU, ALSO, et al. This is one of the 
many areas where XEDIT's power shines!

...phsiii


XEDIT macro question

2009-05-12 Thread Huegel, Thomas
I have a simple question about a XEDIT  macro.

I have a macro that does a locate and select on some lines and then displays 
the selected lines.

My question, is there a way to find the number of lines that have been selected 
without counting them as I select them?
EXTRACT '/selectedlines/'  doesn't seem to exist..

snipit:
 do until rc ¬= 0/* loop until locate fails (rc  
0)  */
   'command set select 1 1'/* set selection level 1   */
'command up 1' /* go back up one line   
*/
   'command locate /' machid '/'   /* look for the rest
*/
 end /* end of loop 
  */
 command set shadow off   /* turn shadow display off */
 command set display 1 1  /* display selected lines   */

Thanks





Re: XEDIT macro question

2009-05-12 Thread Roy, Bruce
Check out the SET SCOPE command (ie, SET SCOPE DISPLAY) and 'EXTRACT 
/NBSCOPE/'.  While many of the EXTRACT options can be QUERY'd, the NBSCOPE 
option can only be used through EXTRACT.  I assume the code below is part of 
some larger XEDIT macro since by itself it would have a few bugs.

Of course, if you wanted count the lines, let the DO construct do the work.  
That is, replace do until rc  \= 0 with do count=1 by 1 
until rc \= 0

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Huegel, Thomas
Sent: Tuesday, May 12, 2009 11:22 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: XEDIT macro question

I have a simple question about a XEDIT  macro.

I have a macro that does a locate and select on some lines and then displays 
the selected lines.

My question, is there a way to find the number of lines that have been selected 
without counting them as I select them?
EXTRACT '/selectedlines/'  doesn't seem to exist..

snipit:
 do until rc ¬= 0/* loop until locate fails (rc  
0)  */
   'command set select 1 1'/* set selection level 1   */
'command up 1' /* go back up one line   
*/
   'command locate /' machid '/'   /* look for the rest
*/
 end /* end of loop 
  */
 command set shadow off   /* turn shadow display off */
 command set display 1 1  /* display selected lines   */

Thanks





Re: XEDIT macro question

2009-05-12 Thread Huegel, Thomas
Thanks Bruce that worked.

I found I had Kris Buelens GD-XEDIT package (some pretty cool stuff) so now my 
routine looks like this:

 'macro   all /' machid '/'  /* find all matches
  */
 command extract '/lastmsg/'  /* get the selected count*/
 dsize = strip(word(lastmsg.1,1),b,')/* get the number of found lines */
 command set shadow off   /* turn shadow display off   */




From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Roy, Bruce
Sent: Tuesday, May 12, 2009 12:35 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: XEDIT macro question



Check out the SET SCOPE command (ie, SET SCOPE DISPLAY) and 'EXTRACT 
/NBSCOPE/'.  While many of the EXTRACT options can be QUERY'd, the NBSCOPE 
option can only be used through EXTRACT.  I assume the code below is part of 
some larger XEDIT macro since by itself it would have a few bugs.



Of course, if you wanted count the lines, let the DO construct do the work.  
That is, replace do until rc  \= 0 with do count=1 by 1 
until rc \= 0



From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Huegel, Thomas
Sent: Tuesday, May 12, 2009 11:22 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: XEDIT macro question



I have a simple question about a XEDIT  macro.



I have a macro that does a locate and select on some lines and then displays 
the selected lines.



My question, is there a way to find the number of lines that have been selected 
without counting them as I select them?

EXTRACT '/selectedlines/'  doesn't seem to exist..



snipit:

 do until rc ¬= 0/* loop until locate fails (rc  
0)  */
   'command set select 1 1'/* set selection level 1   */
'command up 1' /* go back up one line   
*/
   'command locate /' machid '/'   /* look for the rest
*/
 end /* end of loop 
  */
 command set shadow off   /* turn shadow display off */
 command set display 1 1  /* display selected lines   */



Thanks








Re: XEDIT Macro

2009-03-19 Thread Kris Buelens
I think it would stil be wise to precede a READ by
   address command 'CONWAIT';  address command 'DESBUF'
This assures that the terminal input buffer is emptied, with PARSE
PULL one only empties the program stack.
Alternatively: codedo queued()+externals() ; parse pull   ; end

2009/3/19 Rob van der Heij rvdh...@gmail.com:
 On Thu, Mar 19, 2009 at 12:48 AM, Schuh, Richard rsc...@visa.com wrote:
 No. I have not figured out how to use READ to do what I want. So far, I
 have succeeded only in getting the command line stacked; none of the
 file lines, changed or not. So how is it done?

 When you issue the READ you get control back when the user hits an AID
 key. At that point there's one line stacked for each change on the
 screen. You can decide whether XEDIT should update the file being
 edited or not. When you have processed the stacked lines, you issue
 another READ until you have seen the signal to terminate (eg PFK 3).

 Try something like this to see what happens:
 /* */
 'READ ALL NUMBER TAG'
 address command 'PIPE stack | cons'

 Rob

 Warning: READ used to be a NOP when there is a line stacked when it is
 invoked. I don't see it mentioned anymore in the notes, so it may have
 been fixed. It was a very popular cause for such applications to get
 into a loop.




-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: XEDIT Macro

2009-03-19 Thread Brian Nielsen
The sample I previously sent demonstratng the use of EXTRACT PENDING is 

the way to go.

Brian Nielsen


On Wed, 18 Mar 2009 16:10:18 -0700, Schuh, Richard rsc...@visa.com wrot
e:

Do not assume that normal defaults are in effect. I am an abnormal sort.

This is not a normal XEDIT session. Items are being displayed in XEDIT
and the viewer specifies the disposition of individual items by entries
in the prefix area which has been set to NULLS by the profile.

Regards, 
Richard Schuh 

 

 -Original Message-
 From: The IBM z/VM Operating System 
 [mailto:ib...@listserv.uark.edu] On Behalf Of Kris Buelens
 Sent: Wednesday, March 18, 2009 3:22 PM
 To: IBMVM@LISTSERV.UARK.EDU
 Subject: Re: XEDIT Macro
 
 By default, the values in the prefix areas are the line numbers, no?
 Or, if you'd ask the user to type various strings in the 
 prefix, then EXTRACT PENDING is the way to go
 
 2009/3/18 Schuh, Richard rsc...@visa.com:
  Does it really matter to you?
 
  When a specific PFK is pressed, I want to process according to the 

  values in the prefix areas of all lines in the file.
 
 
  Regards,
  Richard Schuh
 
 
 
 
 
  
  From: The IBM z/VM Operating System 
 [mailto:ib...@listserv.uark.edu] 
  On Behalf Of Rich Smrcina
  Sent: Wednesday, March 18, 2009 1:48 PM
  To: IBMVM@LISTSERV.UARK.EDU
  Subject: Re: XEDIT Macro
 
  Schuh, Richard wrote:
 
  Is there any way to access the prefix area of a line from an XEDIT 

  Macro? I see nothing in the EXTRACT command. Am I missing something 

  there? Is there some other way to access it?
 
  Regards,
  Richard Schuh
 
  That begs a question:  What do you want to do with the prefix area 

  that you can't do with an Xedit command?
 
  --
  Rich Smrcina
  Phone: 414-491-6001
  http://www.linkedin.com/in/richsmrcina
 
  Catch the WAVV!
  http://www.wavv.org
  WAVV 2009 - Orlando, FL - May 15-19, 2009
 
 
 
 --
 Kris Buelens,
 IBM Belgium, VM customer support
 

=
===


Re: XEDIT Macro

2009-03-19 Thread Phil Smith III
Rob van der Heij wrote:
When you issue the READ you get control back when the user hits an AID
key. At that point there's one line stacked for each change on the
screen. You can decide whether XEDIT should update the file being
edited or not. When you have processed the stacked lines, you issue
another READ until you have seen the signal to terminate (eg PFK 3).

From your earlier posts, Richard, I think you've been doing READ not READ ALL. 
As Rob's example below shows, READ ALL is different.

Try something like this to see what happens:
/* */
'READ ALL NUMBER TAG'
address command 'PIPE stack | cons'

Warning: READ used to be a NOP when there is a line stacked when it is
invoked. I don't see it mentioned anymore in the notes, so it may have
been fixed. It was a very popular cause for such applications to get
into a loop.

Still true. Gotta be careful to drain the stack before a READ.

Also note that READ NOCHANGE TAG gets you not only everything changed (despite 
the lack of ALL), but doesn't allow actual screen changes, *AND* interprets 
CTLCHARs.  You can use this for a QD (very D!) display manager. HELP uses it 
-- it's undocumented but not going away. A very useful idiom. It might well be 
easier for you to format the entire screen and read your prefix areas thus, 
rather than using the actual prefix area.

...phsiii


Re: XEDIT Macro

2009-03-19 Thread Romanowski, John (OFT)
the XEDIT User's Guide might help you; it has examples and guidance on 
writing prefix macros and using READ

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Schuh, Richard
Sent: Wednesday, March 18, 2009 4:45 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: XEDIT Macro


Is there any way to access the prefix area of a line from an XEDIT Macro? I see 
nothing in the EXTRACT command. Am I missing something there? Is there some 
other way to access it?

Regards,
Richard Schuh



This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments. Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.


Re: XEDIT Macro

2009-03-19 Thread Schuh, Richard
Problem solved. Thanks to all who replied.
 
Regards, 
Richard Schuh 

 

 




From: The IBM z/VM Operating System
[mailto:ib...@listserv.uark.edu] On Behalf Of Romanowski, John (OFT)
Sent: Thursday, March 19, 2009 7:37 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: XEDIT Macro



the XEDIT User's Guide might help you; it has examples and
guidance on writing prefix macros and using READ

 

From: The IBM z/VM Operating System
[mailto:ib...@listserv.uark.edu] On Behalf Of Schuh, Richard
Sent: Wednesday, March 18, 2009 4:45 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: XEDIT Macro

 

Is there any way to access the prefix area of a line from an
XEDIT Macro? I see nothing in the EXTRACT command. Am I missing
something there? Is there some other way to access it?

Regards,
Richard Schuh 

 




This e-mail, including any attachments, may be confidential,
privileged or otherwise legally protected. It is intended only for the
addressee. If you received this e-mail in error or from someone who was
not authorized to send it to you, do not disseminate, copy or otherwise
use this e-mail or its attachments. Please notify the sender immediately
by reply e-mail and delete the e-mail from your system.




Re: XEDIT Macro

2009-03-19 Thread Nick Laflamme

On 3/19/2009 12:54 PM, Schuh, Richard wrote:

Problem solved. Thanks to all who replied.
You think you're going to get off that easy? A few of us are curious 
about what worked or what had to change for anything to work. After all, 
you were rather detailed about what didn't work, we can't help but be 
curious.


Re: XEDIT Macro

2009-03-19 Thread Schuh, Richard
That will cost extra.
 
 
rest.0 = 0
line = 0
do until pending.0 = 0

'EXTRACT /PENDING R :'line+1'/'
if pending.0 ¬= 0 then do

i = rest.0 + 1 
rest.i = translate(strip(pending.1 pending.2))
rest.0 = i 
end 

line = pending.1
end 

That gives a list of line numbers and prefix areas for the changed lines.  
 
 
Regards, 
Richard Schuh 

 

 




From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On 
Behalf Of Nick Laflamme
Sent: Thursday, March 19, 2009 11:10 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: XEDIT Macro


On 3/19/2009 12:54 PM, Schuh, Richard wrote: 

Problem solved. Thanks to all who replied.


You think you're going to get off that easy? A few of us are curious 
about what worked or what had to change for anything to work. After all, you 
were rather detailed about what didn't work, we can't help but be curious.




Re: XEDIT Macro

2009-03-19 Thread Rob van der Heij
On Thu, Mar 19, 2009 at 7:41 PM, Schuh, Richard rsc...@visa.com wrote:

 That gives a list of line numbers and prefix areas for the changed lines.

But only for the ones that don't have a meaning or are not complete
yet, right? So using an i in the prefix area would be executed and
not returned to you as a pending prefix command. Fine if it does the
job for you.

Rob


Re: XEDIT Macro

2009-03-19 Thread Schuh, Richard
No, because the following code handles all prefix entries, including ones that 
it doesn't like, and then does a QQUIT. This is for a very simple and limited 
application.

Regards, 
Richard Schuh 

 

 -Original Message-
 From: The IBM z/VM Operating System 
 [mailto:ib...@listserv.uark.edu] On Behalf Of Rob van der Heij
 Sent: Thursday, March 19, 2009 1:46 PM
 To: IBMVM@LISTSERV.UARK.EDU
 Subject: Re: XEDIT Macro
 
 On Thu, Mar 19, 2009 at 7:41 PM, Schuh, Richard 
 rsc...@visa.com wrote:
 
  That gives a list of line numbers and prefix areas for the 
 changed lines.
 
 But only for the ones that don't have a meaning or are not 
 complete yet, right? So using an i in the prefix area would 
 be executed and not returned to you as a pending prefix 
 command. Fine if it does the job for you.
 
 Rob
 


XEDIT Macro

2009-03-18 Thread Schuh, Richard
Is there any way to access the prefix area of a line from an XEDIT
Macro? I see nothing in the EXTRACT command. Am I missing something
there? Is there some other way to access it?

Regards, 
Richard Schuh 




Re: XEDIT Macro

2009-03-18 Thread Rich Smrcina
Title: XEDIT Macro




Schuh, Richard wrote:

  
  
  

  Is there any way to access the prefix
area of a line from an XEDIT Macro? I see nothing in the EXTRACT
command. Am I missing something there? Is there some other way to
access it?
  Regards,
Richard Schuh 
  
  

That begs a question: What do you want to do with the prefix area that
you can't do with an Xedit command?

-- 
Rich Smrcina

Phone: 414-491-6001

http://www.linkedin.com/in/richsmrcina


Catch the WAVV! 
http://www.wavv.org

WAVV 2009 - Orlando, FL - May 15-19, 2009





Re: XEDIT Macro

2009-03-18 Thread Tom Duerbusch
If you are talking about writing your own prefix commands, the following
is an example:

PREFIXCD XEDIT Y2

/* CCD - COPY BLOCK OF LINES TO AN EXTERNAL CMS FILE */ 
/*   THEY CAN THEN BE BROUGHT IN TO THE SAME OR  */ 
/*   OTHER XEDIT FILES AT A LATER TIME   */ 
/*  */  
/*   TOM DUERBUSCH - THD CONSULTING */  
/*   6/18/93*/  
/*  */  
ARG PREFIX OPERAND PLINE OP REST
PARSE SOURCE . . . . . NAME .   
PRF=NAME||SPACE(OP REST)
'COMMAND PRESERVE'  
'COMMAND SET STAY ON'   
'SET CMSTYPE HT'
'COMMAND ERASE STACK XEDIT A'   
'SET CMSTYPE RT'
SELECT  
   WHEN LENGTH(NAME) = 2 THEN  /* NO BLOCK GROUP */ 
  DO
 'COMMAND EXTRACT /LINE/'   
 ':'PLINE   
 'PUT 1 STACK XEDIT A'  
  END   
   WHEN LENGTH(NAME) = 3 THEN /* BLOCK GROUP */
   
  DO   
   
 /* LOOK FOR THIS PREFIX COMMAND PRIOR TO THIS ONE */  
   
 DO FSD = 0 TO PLINE UNTIL RC ¬= 2 
   
'COMMAND EXTRACT /PENDING BLOCK' NAME ':'FSD ':'PLINE '/'  
   
 END   
   
 SELECT
   
WHEN PENDING.0 ¬= 0 THEN /* WE HAVE ENDED THE PREFIX BLOCK
*   
   DO  
   
  'COMMAND :'PENDING.1 'COMMAND SET PENDING OFF'   
   
  RANGE = PLINE - PENDING.1
   
  SELECT   
   
 WHEN RANGE  0 THEN RANGE = RANGE +1  
   
 WHEN RANGE  0 THEN RANGE = RANGE -1  
   
 OTHERWISE NOP 
   
  END  
   
  'COMMAND LOCATE :'PENDING.1  
   
  'PUT ' RANGE ' STACK XEDIT A'
   
   END 
   
OTHERWISE  /* THIS IS A START OF A PREFIX BLOCK */ 
   
   DO  
   
  'COMMAND :'PLINE 
   
  'COMMAND SET PENDING BLOCK' LEFT(PRF,5)  
   END 
   
  END  
   OTHERWISE NOP   
END
'COMMAND RESTORE'  
RETURN 


and then add to the profile xedit:

/* FOLLOWING ARE THD CREATED PREFIX COMMANDS  */  
  
SET 'PREFIX SYNONYM CD  PREFIXCD' 
SET 'PREFIX SYNONYM CCD PREFIXCD' 
SET 'PREFIX SYNONYM MD  PREFIXMD' 
SET 'PREFIX SYNONYM MMD PREFIXMD' 
SET 'PREFIX SYNONYM G   PREFIXG'  


Tom Duerbusch
THD Consulting

 Schuh, Richard rsc...@visa.com 3/18/2009 3:45 PM 
Is there any way to access the prefix area of a line from an XEDIT
Macro? I see nothing in the EXTRACT command. Am I missing something
there? Is there some other way to access it?

Regards, 
Richard Schuh 


Re: XEDIT Macro

2009-03-18 Thread Brian Nielsen
On Wed, 18 Mar 2009 13:45:05 -0700, Schuh, Richard rsc...@visa.com wrot
e:

Is there any way to access the prefix area of a line from an XEDIT
Macro? I see nothing in the EXTRACT command. Am I missing something
there? Is there some other way to access it?

If you are looking to see what commands are in the prefix areas, perhaps 

you will find this useful:

   'EXTRACT /PENDING */'


There are various sub-options to PENDING that may or may not be useful to
 
you depending on the particulars of what you want.

Brian Nielsen


Re: XEDIT Macro

2009-03-18 Thread Brian Nielsen
On Wed, 18 Mar 2009 13:45:05 -0700, Schuh, Richard rsc...@visa.com wrot
e:

Is there any way to access the prefix area of a line from an XEDIT
Macro? I see nothing in the EXTRACT command. Am I missing something
there? Is there some other way to access it?

Here is a more complete example which shows all commands in the prefix 

areas:

/* */
line=0
DO UNTIL PENDING.0=0
   'EXTRACT /PENDING * :'line+1'/'
   DO i=0 TO pending.0
  say format(i,3) pending.i
   END
   line=pending.1
END



Brian Nielsen


Re: XEDIT Macro

2009-03-18 Thread Schuh, Richard
Does it really matter to you?
 
When a specific PFK is pressed, I want to process according to the
values in the prefix areas of all lines in the file.
 

Regards, 
Richard Schuh 

 

 




From: The IBM z/VM Operating System
[mailto:ib...@listserv.uark.edu] On Behalf Of Rich Smrcina
Sent: Wednesday, March 18, 2009 1:48 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: XEDIT Macro


Schuh, Richard wrote: 

Is there any way to access the prefix area of a line
from an XEDIT Macro? I see nothing in the EXTRACT command. Am I missing
something there? Is there some other way to access it?

Regards,
Richard Schuh 


That begs a question:  What do you want to do with the prefix
area that you can't do with an Xedit command?


-- 
Rich Smrcina 
Phone: 414-491-6001 
http://www.linkedin.com/in/richsmrcina 

Catch the WAVV! 
http://www.wavv.org 
WAVV 2009 - Orlando, FL - May 15-19, 2009 



Re: XEDIT Macro

2009-03-18 Thread Kris Buelens
By default, the values in the prefix areas are the line numbers, no?
Or, if you'd ask the user to type various strings in the prefix, then
EXTRACT PENDING is the way to go

2009/3/18 Schuh, Richard rsc...@visa.com:
 Does it really matter to you?

 When a specific PFK is pressed, I want to process according to the values in
 the prefix areas of all lines in the file.


 Regards,
 Richard Schuh





 
 From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
 Behalf Of Rich Smrcina
 Sent: Wednesday, March 18, 2009 1:48 PM
 To: IBMVM@LISTSERV.UARK.EDU
 Subject: Re: XEDIT Macro

 Schuh, Richard wrote:

 Is there any way to access the prefix area of a line from an XEDIT Macro? I
 see nothing in the EXTRACT command. Am I missing something there? Is there
 some other way to access it?

 Regards,
 Richard Schuh

 That begs a question:  What do you want to do with the prefix area that you
 can't do with an Xedit command?

 --
 Rich Smrcina
 Phone: 414-491-6001
 http://www.linkedin.com/in/richsmrcina

 Catch the WAVV!
 http://www.wavv.org
 WAVV 2009 - Orlando, FL - May 15-19, 2009



-- 
Kris Buelens,
IBM Belgium, VM customer support


Re: XEDIT Macro

2009-03-18 Thread Schuh, Richard
Do not assume that normal defaults are in effect. I am an abnormal sort.
This is not a normal XEDIT session. Items are being displayed in XEDIT
and the viewer specifies the disposition of individual items by entries
in the prefix area which has been set to NULLS by the profile.

Regards, 
Richard Schuh 

 

 -Original Message-
 From: The IBM z/VM Operating System 
 [mailto:ib...@listserv.uark.edu] On Behalf Of Kris Buelens
 Sent: Wednesday, March 18, 2009 3:22 PM
 To: IBMVM@LISTSERV.UARK.EDU
 Subject: Re: XEDIT Macro
 
 By default, the values in the prefix areas are the line numbers, no?
 Or, if you'd ask the user to type various strings in the 
 prefix, then EXTRACT PENDING is the way to go
 
 2009/3/18 Schuh, Richard rsc...@visa.com:
  Does it really matter to you?
 
  When a specific PFK is pressed, I want to process according to the 
  values in the prefix areas of all lines in the file.
 
 
  Regards,
  Richard Schuh
 
 
 
 
 
  
  From: The IBM z/VM Operating System 
 [mailto:ib...@listserv.uark.edu] 
  On Behalf Of Rich Smrcina
  Sent: Wednesday, March 18, 2009 1:48 PM
  To: IBMVM@LISTSERV.UARK.EDU
  Subject: Re: XEDIT Macro
 
  Schuh, Richard wrote:
 
  Is there any way to access the prefix area of a line from an XEDIT 
  Macro? I see nothing in the EXTRACT command. Am I missing something 
  there? Is there some other way to access it?
 
  Regards,
  Richard Schuh
 
  That begs a question:  What do you want to do with the prefix area 
  that you can't do with an Xedit command?
 
  --
  Rich Smrcina
  Phone: 414-491-6001
  http://www.linkedin.com/in/richsmrcina
 
  Catch the WAVV!
  http://www.wavv.org
  WAVV 2009 - Orlando, FL - May 15-19, 2009
 
 
 
 --
 Kris Buelens,
 IBM Belgium, VM customer support
 


Re: XEDIT Macro

2009-03-18 Thread Rob van der Heij
On Thu, Mar 19, 2009 at 12:10 AM, Schuh, Richard rsc...@visa.com wrote:
 Do not assume that normal defaults are in effect. I am an abnormal sort.
 This is not a normal XEDIT session. Items are being displayed in XEDIT
 and the viewer specifies the disposition of individual items by entries
 in the prefix area which has been set to NULLS by the profile.

And you don't control the entire navigation with an XEDIT macro using
the READ subcommand?
If you can do that, you get the entries back tagged with a PRF

Rob


Re: XEDIT Macro

2009-03-18 Thread Rob van der Heij
On Thu, Mar 19, 2009 at 12:48 AM, Schuh, Richard rsc...@visa.com wrote:
 No. I have not figured out how to use READ to do what I want. So far, I
 have succeeded only in getting the command line stacked; none of the
 file lines, changed or not. So how is it done?

When you issue the READ you get control back when the user hits an AID
key. At that point there's one line stacked for each change on the
screen. You can decide whether XEDIT should update the file being
edited or not. When you have processed the stacked lines, you issue
another READ until you have seen the signal to terminate (eg PFK 3).

Try something like this to see what happens:
/* */
'READ ALL NUMBER TAG'
address command 'PIPE stack | cons'

Rob

Warning: READ used to be a NOP when there is a line stacked when it is
invoked. I don't see it mentioned anymore in the notes, so it may have
been fixed. It was a very popular cause for such applications to get
into a loop.


Re: comment xedit macro ?

2008-04-16 Thread Rob van der Heij
Oh, and shipped on the CMS disks, as far as I recall, is SCM XEDIT
that aligns the comment in REXX code.
You may find a slightly more recent SC XEDIT on the CMS Pipelines
homepage (along with the left-handed FMTP which is is huge help).

Rob


Re: comment xedit macro ?

2008-04-16 Thread Lionel B. Dyck
Thanks to everyone - the Box macro from Fran is the closest to what I'm 
looking for.  I'll take that and adjust for my purposes.

Thanks again - as usual this list is very helpful

Lionel B. Dyck, Consultant/Specialist 

Enterprise Platform Services, Mainframe Engineering 
KP-IT Enterprise Engineering 
925-926-5332 (8-473-5332) | E-Mail: [EMAIL PROTECTED] 
AIM: lbdyck | Yahoo IM: lbdyck 
Kaiser Service Credo: Our cause is health. Our passion is service. We're 
here to make lives better. 

I never guess. It is a capital mistake to theorize before one has data. 
Insensibly one begins to twist facts to suit theories, instead of theories 
to suit facts. 
- Sir Arthur Conan Doyle 

NOTICE TO RECIPIENT: If you are not the intended recipient of this e-mail, 
you are prohibited from sharing, copying, or otherwise using or disclosing 
its contents. If you have received this e-mail in error, please notify the 
sender immediately by reply e-mail and permanently delete this e-mail and 
any attachments without reading, forwarding or saving them. Thank you. image/gif

comment xedit macro ?

2008-04-15 Thread Lionel B. Dyck
Has anyone developed a xedit command similar to the comment z/os ispf 
command (from the cbt tape) that they would be willing to share?

The ISPF Comment command syntax is something like this:

Comment comment-text

with an A (for after) or B (for before) on the desired line within the 
ISPF edit text.

It will build a REXX comment box with the comment-text within it

Thanks

Lionel B. Dyck, Consultant/Specialist 

Enterprise Platform Services, Mainframe Engineering 
KP-IT Enterprise Engineering 
925-926-5332 (8-473-5332) | E-Mail: [EMAIL PROTECTED] 
AIM: lbdyck | Yahoo IM: lbdyck 
Kaiser Service Credo: Our cause is health. Our passion is service. We're 
here to make lives better. 

I never guess. It is a capital mistake to theorize before one has data. 
Insensibly one begins to twist facts to suit theories, instead of theories 
to suit facts. 
- Sir Arthur Conan Doyle 

NOTICE TO RECIPIENT: If you are not the intended recipient of this e-mail, 
you are prohibited from sharing, copying, or otherwise using or disclosing 
its contents. If you have received this e-mail in error, please notify the 
sender immediately by reply e-mail and permanently delete this e-mail and 
any attachments without reading, forwarding or saving them. Thank you. image/gif

Re: comment xedit macro ?

2008-04-15 Thread Shimon Lebowitz
I don't know about what anyone did, the best I 
can offer is my change all of these lines to comments
macro.

Shimon

 Original message 
Date:   Tue, 15 Apr 2008 13:57:46 -0700
From:   Lionel B. Dyck [EMAIL PROTECTED]  
Subject:   comment xedit macro ?  
To:   IBMVM@LISTSERV.UARK.EDU

   Has anyone developed a xedit command similar to the
   comment z/os ispf command (from the cbt tape) that
   they would be willing to share?

   The ISPF Comment command syntax is something like
   this:

   Comment comment-text

   with an A (for after) or B (for before) on the
   desired line within the ISPF edit text.

   It will build a REXX comment box with the
   comment-text within it

   Thanks

 

   Lionel B. Dyck, Consultant/Specialist
   Enterprise Platform Services, Mainframe Engineering
   KP-IT Enterprise Engineering
   925-926-5332 (8-473-5332) | E-Mail:
   [EMAIL PROTECTED]
   AIM: lbdyck | Yahoo IM: lbdyck
   Kaiser Service Credo: Our cause is health. Our
   passion is service. We're here to make lives
   better.
   I never guess. It is a capital mistake to theorize
   before one has data. Insensibly one begins to twist
   facts to suit theories, instead of theories to suit
   facts.
   - Sir Arthur Conan Doyle
   NOTICE TO RECIPIENT: If you are not the intended
   recipient of this e-mail, you are prohibited from
   sharing, copying, or otherwise using or disclosing
   its contents. If you have received this e-mail in
   error, please notify the sender immediately by reply
   e-mail and permanently delete this e-mail and any
   attachments without reading, forwarding or saving
   them. Thank you.


Re: comment xedit macro ?

2008-04-15 Thread Schuh, Richard
I have an XEDIT macro that operates as a prefix command. It turns specified 
lines into comments. It has the ability to turn blocks of lines into comments, 
as well. Here is an example using a snippet of code from SMTPNOTE EXEC:

Before - note the asterisks in the prefix area. That is the synonym I use.

00059 imp =''  
*0060 fix =''  
00061 enrich=''
0*062 nofill=''
00063 su = ''  
00**  da = ''  
00065 debug = 0
00066 batch = ''   
00067 parms = translate(parms,'7C'x,'õ'); /* transl. at sign98/11/10 RT */ 
00068 i = 1 /* get number of parms.  */
**069 j = words(parms)  /* get number of parms.  */


After

00059 imp =''   
 
00060 /*fix ='' */  
 
00061 enrich='' 
 
00062 /*nofill='' */
 
00063 su = ''   
 
00064 /*da = '' */  
 
00065 /*debug = 0 */
 
00066 /*batch = '' */   
 
00067 /*parms = translate(parms,'7C'x,'õ'); /* transl. at sign98/11/10 RT 
*/ */  
00068 /*i = 1 /* get number of parms.  */ 
*/ 
00069 /*j = words(parms)  /* get number of parms.  */ 
*/ 

Is this thee type of macro you seek? 

Regards, 
Richard Schuh 

 

 -Original Message-
 From: The IBM z/VM Operating System 
 [mailto:[EMAIL PROTECTED] On Behalf Of Shimon Lebowitz
 Sent: Tuesday, April 15, 2008 3:01 PM
 To: IBMVM@LISTSERV.UARK.EDU
 Subject: Re: comment xedit macro ?
 
 I don't know about what anyone did, the best I can offer is 
 my change all of these lines to comments
 macro.
 
 Shimon
 
  Original message 
 Date:   Tue, 15 Apr 2008 13:57:46 -0700
 From:   Lionel B. Dyck [EMAIL PROTECTED]  
 Subject:   comment xedit macro ?  
 To:   IBMVM@LISTSERV.UARK.EDU
 
Has anyone developed a xedit command similar to the
comment z/os ispf command (from the cbt tape) that
they would be willing to share?
 
The ISPF Comment command syntax is something like
this:
 
Comment comment-text
 
with an A (for after) or B (for before) on the
desired line within the ISPF edit text.
 
It will build a REXX comment box with the
comment-text within it
 
Thanks
 
  
 
Lionel B. Dyck, Consultant/Specialist
Enterprise Platform Services, Mainframe Engineering
KP-IT Enterprise Engineering
925-926-5332 (8-473-5332) | E-Mail:
[EMAIL PROTECTED]
AIM: lbdyck | Yahoo IM: lbdyck
Kaiser Service Credo: Our cause is health. Our
passion is service. We're here to make lives
better.
I never guess. It is a capital mistake to theorize
before one has data. Insensibly one begins to twist
facts to suit theories, instead of theories to suit
facts.
- Sir Arthur Conan Doyle
NOTICE TO RECIPIENT: If you are not the intended
recipient of this e-mail, you are prohibited from
sharing, copying, or otherwise using or disclosing
its contents. If you have received this e-mail in
error, please notify the sender immediately by reply
e-mail and permanently delete this e-mail and any
attachments without reading, forwarding or saving
them. Thank you.