View previous topic :: View next topic
|
Author |
Message |
PANIGRAHI,DEVA
New User
Joined: 20 Aug 2012 Posts: 3 Location: India
|
|
|
|
Hi All,
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
address ispexec
"isredit macro"
"vget (ZAPPLID)"
"TBGET "zapplid"EDIT"
zedpflg2=x2c(b2x(zedpflg2))
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*/
status=status bits.ln
End
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)
But this is not working, when we do HI AUTO.
Please suggest |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
It's not possible, the HI AUTO language is not stored anywhere. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
- In view/edit session, enter the command PROF and then find the HILITE attribute through ZSCREENI variable. |
What were the results for this effort? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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. |
|
Back to top |
|
|
|