Macro name. QCHK | Edit macro QCHK | |
users. | HTML authors. Program coding. Anywhere where quotes must be matched. | Author: David McRitchie |
type. |
Edit Macro resides in
d:\spfmacro, (same coding should work on TSO) | |
QCHK | Quick Quote Check for finding unmatched single and double quotes on a per line basis. Also checked are PLI type comments (/* ... */). | |
Related | EDITOL (DCF lists), EDITPR (DCF pairs), FIXPI (DCF .pi), FIXQUOTE, HTMLOL (HTML lists), HTMLSYN (HTML syntax), NESTCHK (DO ... END), PERIOD, PINX (DCF .pi), PINXDOIT (DCF .pi), PIR (DCF .pi), PLICHK (PL/I), SHIFTNX. |
The perspective of QCHK is on a per card basis, making this process fast and not encumbered with rigorous syntax checking which may in fact work against identifying the line on which a simple mistake has been made. The purpose of QCHK is to find unmatched quotes, and comments on a per line basis. If a comment extends to multiple lines it is easy to identify the end as also unmatched. Uses REXX to count the Quotes on a line rather than using ISPF, SPF facilities.
ISREDIT | QCHK | (No options, no CC-range, no label-range) |
Example:
As an example the macro run on itself would appear
as in the following image. The NOTE
lines indicate the line numbers of unmatched
quotes (single/double), and comments (open/close).
SPF/PC(1) EDIT D:\SPFMACRO\QCHK.SPF --------------------------- COLUMNS 001 072 COMMAND ---> SCROLL ---> CSR ****** ********************************* TOP OF DATA ************************** ------ --------------------------- 15 LINE(S) NOT DISPLAYED ------------------- 000016 when x2='/*' then co=co+1 /* ' */ =NOTE= Unmatched on line 16 q=1, qq=0, co=2, cc=1 000017 when x2='*/' then cc=cc+1 /* */ =NOTE= Unmatched on line 17 q=0, qq=1, co=1, cc=2 ------ --------------------------- 11 LINE(S) NOT DISPLAYED ------------------- 000029 /* The perspective of QCHK is on a per card basis, making this process =NOTE= Unmatched on line 29 q=0, qq=0, co=1, cc=0 ------ --------------------------- 5 LINE(S) NOT DISPLAYED -------------------- 000035 Quotes on a line rather than using ISPF, SPF facilities. */ =NOTE= Unmatched on line 35 q=0, qq=0, co=0, cc=1 ****** ******************************** BOTTOM OF DATA ************************
Please send your comments concerning my pages or materials to: David using send email comments
Disclaimer and site usage: Material at The REXX Macros Toolbox is available without warranty of any kind. Redistribution of source, coding and documentation other than from this site is prohibited.
Copyright © 1995 - 2006, F. David McRitchie, All Rights Reserved