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

Customizing the ISPF HILITE Command


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

Global Moderator


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

PostPosted: Fri Mar 03, 2017 11:49 pm
Reply with quote

I will be speak at the SHARE conference next week in San Jose. Please attend my session:

Customizing the ISPF HILITE Command
Room: Room 213 Session Number: 20019
Monday, March 06, 2017: 3:15 PM - 4:15 PM

In this session, the speaker describes a programming technique that allows you to HILITE arbitrary text in the ISPF editor. The editor's normal highlighting can be extended to highlight additional text. For example, SQL can be highlighted, where language keywords are shown in a different color than punctuation, constants and names. Also covered is some background for the highlighting mechanism. (AD6) (ZOSP1)
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 767
Location: Whitby, ON, Canada

PostPosted: Sat Mar 04, 2017 2:04 am
Reply with quote

I'd love to be there, as this is a topic that I have looked into myself, but with only limited success. But my employer doesn't like sending "application" people to SHARE.

I look forward to seeing the presentation slides after the event.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Mar 07, 2017 11:11 pm
Reply with quote

I think anyone can join SHARE.ORG and download the presentation. However, they charge you to attend the conference.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 767
Location: Whitby, ON, Canada

PostPosted: Wed Mar 08, 2017 1:27 am
Reply with quote

Yes, my employer, like many others, has a corporate membership so there was no cost for me to join. I frequently troll through the vast repository of information found on SHARE.ORG.

But as you say, actually attending a SHARE conference costs money.
Back to top
View user's profile Send private message
Lynne

Active User


Joined: 15 Jan 2015
Posts: 107
Location: USA

PostPosted: Wed Nov 20, 2024 8:55 pm
Reply with quote

Pedro wrote:
I will be speak at the SHARE conference next week in San Jose. Please attend my session:

Customizing the ISPF HILITE Command
Room: Room 213 Session Number: 20019
Monday, March 06, 2017: 3:15 PM - 4:15 PM

In this session, the speaker describes a programming technique that allows you to HILITE arbitrary text in the ISPF editor. The editor's normal highlighting can be extended to highlight additional text. For example, SQL can be highlighted, where language keywords are shown in a different color than punctuation, constants and names. Also covered is some background for the highlighting mechanism. (AD6) (ZOSP1)


Pedro, do you have the presentation notes/pdf/powerpoint for this? I could not find it online.

I am trying to define a Hilite Color profile for a type of file not defined in standard hilite profiles.

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

Senior Member


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

PostPosted: Thu Nov 21, 2024 2:36 am
Reply with quote

Look for File # 967 CBT Usermods Collection for ISPF (CUCI) on the CBT tape website
Back to top
View user's profile Send private message
Lynne

Active User


Joined: 15 Jan 2015
Posts: 107
Location: USA

PostPosted: Thu Nov 21, 2024 8:09 pm
Reply with quote

I do not have the application to open an XMI file.

Don't they have something in a Word/powerpoint/pdf format? I've downloaded many SHARE presentations in these more common formats.

Thank you.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Thu Nov 21, 2024 8:28 pm
Reply with quote

Have fun Prino :-)

Always the same select few from my company that get to go...probably always will be
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Thu Nov 21, 2024 8:41 pm
Reply with quote

github.com/dmolony/Xmit - Java, runs everywhere

www.cbttape.org/xmitview.htm - a whole load more

www.cbttape.org/njw/index.html - Windoze

I personally occasionally use XMIT Manager, third in the list above, but most of the time www.cbttape.org/ftp/unxmit/RECV390.zip, which is command-line only, but can handle VB files.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10891
Location: italy

PostPosted: Thu Nov 21, 2024 9:51 pm
Reply with quote

find here the unxmitted file 967

drive.google.com/file/d/1yFJfI5Evvt_vDUsojlOFswX19bMDdETt
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10891
Location: italy

PostPosted: Thu Nov 21, 2024 10:05 pm
Reply with quote

I forgot that github provides the expanded cbttape files

github.com/CBTTape/CBT967
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Nov 22, 2024 6:29 am
Reply with quote

re: I am trying to define a Hilite Color profile

I am not sure my presentation covers 'profile' as you describe it. But you can create a custom EDIT/VIEW panel to do arbitrary highlighting.

Lynne, I sent you a private message asking for your email address.
Back to top
View user's profile Send private message
Lynne

Active User


Joined: 15 Jan 2015
Posts: 107
Location: USA

PostPosted: Sat Nov 23, 2024 4:19 am
Reply with quote

I think that would meet my needs.

It is a file that is much used, but not a standard format. It would just really be nice if people could view it with a colors. kind of a really basic color scheme (like no color scheme) that goes on for pages and pages.... when it really has sections and a format.. just hard to decipher the way it displays.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Nov 23, 2024 7:14 am
Reply with quote

Lynne, I sent you a PDF file.
Back to top
View user's profile Send private message
Lynne

Active User


Joined: 15 Jan 2015
Posts: 107
Location: USA

PostPosted: Thu Dec 12, 2024 4:02 am
Reply with quote

Thank you, Pedro. I appreciate it.

I was looking for a way to define a color profile for viewing a file, not a panel, if I am understanding your presentation. I just go to ispf VIEW command to view the file in my rexx. I was hoping to define a new HILITE profile to use for the files my ISPF application displays.

I looked up ISRPXASM, the ISPF user-customizable table, to see if I could add something there.. I figured out where it is on my system, but could find no instructions on how to define a new color profile.

but I will keep looking. Thanks anyway for taking the time to send me the pdf.
Back to top
View user's profile Send private message
WilliamDownie

New User


Joined: 01 Jul 2020
Posts: 23
Location: UK

PostPosted: Tue Jan 21, 2025 5:08 pm
Reply with quote

@pedro, @Lynne, I read with interest your discussion on the ISPF Editor's HILITE feature. I use a proprietary scripting language that is similar to REXX in structure, with a few differences. The main one being it is not mandatory to end a comment with a '*/'. Also, comments cannot span more than one line as they can in REXX.

this is valid:
Code:
/*  comment comment         
/*  more comment more comment


this is valid:
Code:
/*  comment comment */
/*  more comment more comment */


this is not valid:
Code:
/*  comment comment
    more comment more comment */


So if I select REXX to highlight the script, and it starts with a '/*', but it has no closing '*/' the entire script is highlighted as a comment.


@pedro - I read through your presentation on using a panel exit to amend the ZSHADOW variable. From what I can see this can't be used to implement a new HILITE language, rather it can be used to adjust shadow attributes on an individual screen.

@pedro / @lynne - have you found if there a way for a user to implement highlighting an unsupported language, or is this something that is carried out by IBM ?
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Tue Jan 21, 2025 5:36 pm
Reply with quote

You obviously didn't bother to read earlier replies:

github.com/CBTTape/CBT967
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Jan 22, 2025 11:51 am
Reply with quote

re: adjust shadow attributes on an individual screen

I suppose I agree with you, but maybe you need to be more specific about your criticism. What do you mean by 'an individual screen'?

In my presentation, I provide an example that will:
1. highlight any SQL file you provide
2. any number of statements in the file
3. the shadow attributes are adjusted each time you scroll

That is, each screen presented is different and it will work; it is not an 'individual screen'.

The example was for highlighting of SQL keywords, but you should be able to modify it for your proprietary scripting language keywords.

It seems pretty flexible to me. The main drawback might be that you need to explicitly launch the whole thing.

Maybe what is needed is an initial macro that detects the language, allocates the right panels and exec and then seamlessly launches the editor again.

---
fyi. I retired several years ago and while I still try to be helpful, I am starting to forget stuff due to lack of not using it any more.
Back to top
View user's profile Send private message
WilliamDownie

New User


Joined: 01 Jul 2020
Posts: 23
Location: UK

PostPosted: Thu Jan 23, 2025 1:46 pm
Reply with quote

Hi Pedro,
Thank you for your response. Please don't think I was criticising your presentation, it's just that I don't understand how to add my own highlighting at the moment.

When I say 'an individual screen' I mean the panel exit references the ZDATA and ZSHADOW variables which represent the current screen. I thought I may need to know what has appeared on the previous screen. But after thinking more about it I don't think I do.

Would you suggest setting the 'Coloring' to 'Do not color the program'. I am presuming no highlighting will have been done and ZSHADOW will then be empty. The exit will then update ZSHADOW based on what is on ZDATA ?

I think using your SQL example and the PLI comments example (USRPLICM) I should be able to experiment with the panel exit.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jan 24, 2025 3:58 am
Reply with quote

I no longer have ability to experiment, so some of this is conjecture.

I think the panel definition always has the ability to highlight, and it should still work for FIND and cursor location (maybe others).

You are right to be concerned about what has occurred in the lines above what you can see. As you noted, comments and strings can span multiple lines and when you can only examine the visible lines then it might lead to unwanted highlights.

In my presentation example, I rely on highlighting being turned on. In the hilite settings panel, language=automatic and coloring=color program. You may wish to rely on a language that is already similar to yours. You will need to experiment.

In that way, the ISPF highlighting manages the comments and strings that span multiple lines. We will not know where a comment starts, but because those lines have a particular highlight, we know that it is on. In the example, it only highlights language keywords that are currently the default color.

I think 'D' is the default color attribute in the panel. In the panel exit, the attr. stem has what I want the current highlight to be and the colr. stem has the highlight that I will change it to.
Code:
 
/*                               Current                   New      */
/*     keyword                   Color                     Color    */
/*     --------                  --------                  ---------*/
 ky.1 =' AND '         ; attr.1 =' DDD'          ; colr.1 =' RRR'     
 ky.2 =' AS '          ; attr.2 =' DD '          ; colr.2 =' RR '   

...

/* Process each keyword                                              */
Do ix  = 1 To ky.0                                                     
  strt = 2                                                             
  offset  = 1                                                             
  /* Do until no more instances of this keyword are found            */
  Do While (offset > 0)                                                   
    offset  = Pos(ky.ix, zdata    ,strt)                                   
    If offset  > 0 Then                                                   
      Do                                                               
        /* Change highlight if not already highlighted               */
        If Substr(zshadow,offset,Length(attr.ix)) = attr.ix Then           
          zshadow  = Overlay(colr.ix, zshadow, offset, Length(colr.ix))   
        strt = offset + 1                                                 
      End                                                               
  End                                                                   
End     
 


note: I was blessed to have worked at IBM. I was able to convince my peer developers in QMF to provide an SQL editor in their product, using this method.
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Fri Jan 24, 2025 9:46 pm
Reply with quote

Pedro, and obviously all others in this thread,

Why don't you get Hercules and one of the many escaped-into-the-wild ADCD versions of z/OS, from 1.10, which I've been using since 2009, all the way up to 3.1, and you can try things at home. ;)

For what it's worth, your former colleague Doug Nadel produced something to highlight the SDSF panels, I'm not sure if I can post it here, and it would definitely require changes for newer, z/OS >= 2.1, versions of SDSF, but it could serve as a template to hilite non-ISPF supported languages. Decipher my signature, not that hard, to email me for a copy.
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts How to Login in to cics region and is... CICS 9
No new posts Passing containers on START command CICS 4
No new posts Preserve changes to ISPF Panel Variables TSO/ISPF 5
Search our Forums:

Back to Top