XRef Considerations

All cross-reference (XRef) data stored in the Predict system file for a cataloged programming object can be processed with SYSMAIN.

The Predict system file is determined by the value assigned to the profile parameter FDIC (see FDIC - Predict System File in the Parameter Reference documentation) in the parameter file or at the start of the Natural Studio session.

You can override the current FDIC settings for the duration of the current SYSMAIN function by using the FSEC/FDIC button and changing the entries in the FDIC group boxes (see File Security in Remote Environments) or specifying the DIC keyword in a SYSMAIN command (see also where-clause in Using SYSMAIN with Subprogram).

The XREF check box in the Code group box or the XREF keyword in a SYSMAIN command indicates whether SYSMAIN should process XRef data.

If Predict has not been installed, you can clear the XREF check box (or set XREF to N) to not perform a validation of Predict files. This is the default setting.

The section below covers the following topics:


Processing of XRef Data

No XRef data is processed if the XREF check box is cleared or if the XREF keyword is set to N when using a SYSMAIN command.

XRef data is processed if the XREF check box is selected or if XREF is set to Y.

Regardless of what setting you choose, XRef data is always deleted when a programming object is deleted.

If XRef data is to be processed, the following actions are applied during SYSMAIN processing:

  • SYSMAIN checks whether XRef data exists in the Predict source system file for the specified programming object.

  • If a programming object is to be deleted from the target environment, XRef data is deleted from the Predict target system file.

  • If a programming object is copied to a new environment, the XRef data of the programming object is copied from the Predict source system file to the Predict target system file. The library name is changed accordingly and, in the case of the rename function, the object name is also changed.

  • If the move function is executed, the XRef data of the programming object is deleted from the Predict source system file.

XRef Processing Errors

If any of the following inconsistencies occur during SYSMAIN processing of XRef data, all processing for the object or function is terminated and an error message is displayed:

  • The value of the XREF option in Natural Security is set to Y and you cleared the XREF check box or set XREF to N respectively.

  • The XREF check box is selected (or XREF set to Y) and the FDIC file(s) being used are not valid Predict files.