IBM Support

How to convert Panvalet ++INCLUDE

Troubleshooting


Problem

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



[{"Product":{"code":"SSJLGL","label":"COBOL and CICS\/VS Command Level Conversion Aid"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"2.1.0","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
03 August 2018

UID

swg21248961