Using COPYBOOK in RPG Source Code
search cancel

Using COPYBOOK in RPG Source Code

book

Article ID: 48634

calendar_today

Updated On:

Products

CA Plex

Issue/Introduction

Description:

Specifying a "/COPY" statement in an RPG source code object appears to be treated as a comment. Is there a way to include a COPYBOOK within an RPG source code object?

Solution:

Yes, directives such as "/COPY", "/FREE", "/END-FREE" are supported within Plex. However, when using these types of statements within a source code object, the Specification Type must be included so that the Generators can determine if the source statement is valid. To do this, prefix the "/COPY" statement with 5 leading spaces and a "D".

Example:


 	D/COPY QSYSINC/QRPGLESRC,QSYRUSRI 

Environment

Release:
Component: CPLEX