Technote (troubleshooting)
Problem(Abstract)
The CCCA product cannot handle source lines such as
++INCLUDE XYZ
Cause
CCCA/MVS 2.1 does not support the conversion of source included in PANVALET libraries. You will need to convert the INCLUDE statements to COPY statements before the source can be converted.
Environment
z/OS
Resolving the problem
The idea is to convert lines such as ++INCLUDE XYZ to
COPY XYZ.
Sample REXX EXECs follow.
Note: These samples are supplied without guarantee or support by IBM and the customer is totally responsible for their use.
/* REXX EXEC to replace PANVALET INCLUDE statements in program */ 'ISREDIT MACRO' trace 'o' cnt = 0 'ISREDIT F "DATA DIVISION" FIRST' 'ISREDIT F "++INCLUDE" FIRST' do while (rc = 0) 'ISREDIT (LIN,COL) = CURSOR' 'ISREDIT (TXT) = LINE' lin queue substr(txt,7) parse pull comment . if substr(comment,1,1) ^= '*' then do lin0 = lin - 1 lin1 = lin + 1 'ISREDIT (TXT0) = LINE' lin0 'ISREDIT (TXT1) = LINE' lin1 queue substr(txt,8) parse pull include cpy . if include = '++INCLUDE' , then do cnt = cnt + 1 pcnt = substr('000'||cnt,length('000'||cnt)-2,3) txt2 = 'IBM'||pcnt||' COPY '||cpy||'.' 'ISREDIT CURSOR = ' lin '1' 'ISREDIT C "'||substr(txt,1,7)||'" "'||substr(txt,1,6), ||'*IBM" 1' 'ISREDIT LINE_AFTER' lin '= DATALINE (TXT2)' lin = lin + 1 'ISREDIT CURSOR = ' lin '1' end end 'ISREDIT F "++INCLUDE" WORD' end exit 0 ====================================================================== /*** REXX EXEC to replace commented out PANVALET INCLUDE statements */ 'ISREDIT MACRO' trace 'o' cnt = 0 'ISREDIT F "DATA DIVISION" FIRST' 'ISREDIT F "COPY" 8 FIRST' do while (rc = 0) 'ISREDIT (LIN,COL) = CURSOR' 'ISREDIT DELETE ' lin 'ISREDIT F "COPY" 8' end 'ISREDIT F "*IBM" 7 FIRST' do while (rc = 0) 'ISREDIT (LIN,COL) = CURSOR' 'ISREDIT CURSOR = ' lin '1' 'ISREDIT C "*IBM++INCLUDE", " ++INCLUDE" 7' 'ISREDIT F "*IBM" 7 ' end exit 0 |
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.