How to convert Panvalet ++INCLUDE

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:

(0 users)Average rating

Add comments

Document information


More support for:

COBOL and CICS/VS Command Level Conversion Aid

Software version:

2.1.0

Operating system(s):

z/OS

Reference #:

1248961

Modified date:

2006-11-01

Translate my page

Machine Translation

Content navigation