Natural

AWS Transform for mainframe refactor offers Natural language dependencies analysis as a standalone technology. It supports multiple files including NSD (DDM), NSG (Global Data Area), NSL (Local Data Area), NSA (Parameter Data Area), NST (Text), NSH (Helproutines), NSM (Map), NSN (Subprogram), NSS (Subroutine), SYSDICBE (Dictionary), NSP (Program) and NSC (Copycode).  Calls to files can be managed with or without quotes (‘FILE’ or FILE) following the statements listed below.

CALLNAT

The call on CALLNAT implies dependencies on an NSM, NSP, NSN, NSH, NSS, or NSC file.

  • CALLNAT PROGRAM_NAME

MAP

The call on MAP implies dependencies on an NSM file.

  • MAP MAP_NAME

FORM

The call on FORM implies dependencies on an NSM file.

  • FORM MAP_NAME

PERFORM

The call on PERFORM implies dependencies on an NSM, NSP, NSN, REPORT, NSH, NSS, or NSC file.

  • PERFORM PROGRAM_NAME
  • PERFORM PROGRAM_NAME 'ARG1' ARG2 

INCLUDE

The call on INCLUDE implies dependencies on an NSC file.

  • INCLUDE COPYCODE_NAME

FETCH

The call on FETCH implies dependencies on an NSM, NSP, NSN, NSH, NSS, or NSC file.

  • FETCH PROGRAM_NAME 
  • FETCH RETURN PROGRAM_NAME  
  • FETCH REPEAT DDM_NAME

HE

The call on HE implies dependencies on an NSH file.

  • HE=HELPROUTINE_NAME

DEFINE DATA

In a Define Data block, we may have an NSG, NSL, or NSA file. The section keyword and its USING clause may appear on the same line or on two separate lines; both forms produce the same data-area dependency.

  • LOCAL USING DATA_AREA_NAME
  • CONTEXT USING DATA_AREA_NAME
  • PARAMETER USING DATA_AREA_NAME
  • GLOBAL USING DATA_AREA_NAME
  • OBJECT USING DATA_AREA_NAME

Or an NSD file :

  • LOCAL VIEW DDM_NAME
  • OBJECT VIEW DDM_NAME

READ, FIND and GET

The calls on READ, FIND and GET imply a Read file dependency on an NSD file.

  • READ DDM_NAME
  • FIND DDM_NAME
  • GET DDM_NAME

STORE

The call on STORE implies a Store file dependency on an NSD file.

  • STORE DDM_NAME

HISTOGRAM

The call on HISTOGRAM implies a Histogram file dependency on an NSD file.

  • HISTOGRAM DDM_NAME

UPDATE and DELETE

The calls on UPDATE and DELETE imply an Update file or Delete file dependency on the NSD file of the enclosing loop.

  • UPDATE
  • DELETE

WORK FILE

The calls on READ WORK FILE and WRITE WORK FILE imply a Read work file or Write work file dependency on the work file bound to that number by DEFINE WORK FILE.

In batch, a NATURAL step is attributed to the NATURAL program it launches, so the step's own DD bindings (including CMWKFnn work-file DDs) reach that program.

  • READ WORK FILE WORK_FILE_NUMBER
  • WRITE WORK FILE WORK_FILE_NUMBER
  • DEFINE WORK FILE WORK_FILE_NUMBER OPERAND

STACK

The call on STACK [TOP] COMMAND implies a program dependency on the program named by its command operand. The dependency is emitted on the first token of the operand only; any stacked parameters that follow are input data and are ignored. The operand must be a quoted literal. An unquoted operand is a variable resolved at runtime and produces no dependency. No dependency is emitted when the first token is a NATURAL system command (LOGON, FIN, MENU, CATALL, …).

NSD (DDM)

A DDM implies an Adabas file dependency on the ADABAS file named in its header, and can also be referenced by that name. A nn VIEW_NAME VIEW OF DDM_NAME declaration implies a View dependency on the DDM named after VIEW OF (targeting the DDM, not the view alias, so a renamed view resolves to its underlying DDM). It is recognised for every data-area storage format: internal (catalogued) format, source format (DEFINE DATA, with or without line numbers), and editor-listing format. The compressed **D format is not yet covered.

  • DB: 000 FILE: 011 - ADABAS_FILE_NAME
  • LOCAL VIEW DDM_NAME
  • OBJECT VIEW DDM_NAME
  • nn VIEW_NAME VIEW OF DDM_NAME