Opening expanded source files

Use the Show Expanded Source menu item to open a COBOL or PL/I file in read-only mode with copybooks and include files expanded. This action works similarly for local and remote files.

Supported Editors:
  • COBOL Editor
  • PL/I Editor
  • z Systems® LPEX Editor

Before you begin

Associate a property group with the file. In the SYSLIB field of the property group, specify a search path for copybooks and include files.

About this task

The expanded file is opened in the same editor from which you requested the action. If, for example, the file was open in the COBOL Editor when you requested the Show Expanded Source action, then the expanded file is also opened in read-only mode in the COBOL Editor. While the expanded file is open, you can do any actions that are valid for files open in read-only mode.

Procedure

  1. Open a COBOL or PL/I source file.
  2. From the menu, select Source > Show Expanded Source or press Ctrl+Shift+E.

Results

The expanded source file is opened in read-only mode. Comments are added to the file to mark the beginning with commented out COPY or INCLUDE statement followed by the library location where the dependency was resolved from and then the actual copybooks or include file content.
See the following example for COBOL:
* COPY ABC.

* Copybook Location:
* MYSYSTEM\HLQ\HLQ.A001.COPYLIB1.COPYLIB\MYCOPY1.cpy

01  XYZ     PIC X
01  FIRST   PIC 9
See the following example for PL/I:
/*
  %INCLUDE MYINC1;
  * Include Location:
  * MYSYSTEM\HLQ\HLQ.A001.PLILIB1.INCLUDE\MYINC1.inc
*/

    dcl XMYINC1 CHAR(20) INIT('INSIDE MYINC1');
Note: This action adds an .expanded folder to the z/OS project. After all expanded files are closed, the folder is removed from the project. To hide this folder from the z/OS Projects view:
  1. In the z/OS Projects view toolbar, click View Menu View Menu > Filters.
  2. In the Navigator Filters window, select the .* check box, and then click OK:
    Navigator Filters