I am writing one ISREDIT macro in REXX to comment code depending on the type (JCL/COBOL/ASM...).
To get the type of the source, i am trying to find the HILITE attribute that we get in PROFILE and accordingly comment it.
I went through the ISREDIT manual, and could not get any such command to retrieve it.
Below are the two approach i have followed -
- In view/edit session, enter the command PROF and then find the HILITE attribute through ZSCREENI variable.
- Tried below piece of code
zedpflg3=x2c(b2x(zedpflg3)) /* convert language byte to binary */
bits. = ''
bits.32 = 'COLOR'
bits.16 = 'DOLOGIC'
bits.8 = 'IFLOGIC'
bits.4 = 'PAREN'
bits.2 = 'FIND'
bits.1 = 'CURSOR'
status = ''
Do a=0 to 4
ln=c2d(bitand(zedpflg2,d2c(2**a))) /* convert each bit to a number*/
langs='OFF AUTO ASM PLI COBOL PASCAL C BOOK REXX PANEL SKEL JCL DTL OTHER DEFAULT PLX IDL'
ln=c2d(bitand(zedpflg3,'0F'x)) /* mask off high order bits */
If '00'x=bitand(zedpflg2,'20'x) Then ln=0
Say space(word(langs,ln+1) status)
Joined: 07 Feb 2009 Posts: 1095 Location: Oostende, Belgium
It will contain "HILITE AUTO", and it will not work in an initial macro.
In a grey past, on the long defunct mvsHelp site, Doug Nadel already mentioned that the "HILITE AUTO" setting dynamically determines the language. If you want to emulate this, read the help screens behind the HI function to determine how to do it.
You can try it yourself by adding a /* REXX */ comment to JCL, or a *process; statement to a COBOL program, the highlighting will change.