Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

NLSHOW - Display local FT file attributes

The macro CALL "NLSHOW"... can be used to view the FTAM attributes of a file in the local system.

The functionality corresponds to that of the command SHOW-FILE-FT-ATTRIBUTES.

The user can select between three variants for the output of attributes:

  • display the filename,

  • display a default selection,

  • display all file attributes.

The information can be output on the screen or to a file.

In addition to the options offered by the openFT (BS2000) command interface, the files can also be addressed via their linkname.

Macro

The function can be called as follows:

CALL "NLSHOW" USING FT-NLSHOW-LIST FT-RETURN-INFO.

FT-NLSHOW-LIST

The range FT-NLSHOW-LIST describes the parameter list for the NLSHOW macro. FT-NLSHOW-LIST must be defined in the WORKING-STORAGE SECTION and can be copied to there with the statement

COPY FTNLSHOW OF linkname.

Before the first NLSHOW macro the parameter fields should be deleted with the statement

MOVE LOW-VALUE TO USER-PARAMETERS IN FT-NLSHOW-LIST.

Before executing another NLSHOW macro you must fill the desired fields. If a parameter is not specified or the default value is to be used, this field must be assigned the value LOW-VALUE.

FT-NLSHOW-LIST is defined as follows:

 01  FT-NLSHOW-LIST.
*
   02 FILLER                   PIC X(4)  VALUE "V500".
*
   02 USER-PARAMETERS.
*
     05 FILE-NAME              PIC X(54).
         88 NOT-SPECIFIED                 VALUE LOW-VALUE.
     05 LINK-NAME              PIC X(8).
         88 NOT-SPECIFIED                 VALUE LOW-VALUE.
*
     05 INFORMATION            PIC X(1).
         88 STD                           VALUE LOW-VALUE.
         88 ALL-ATTRIBUTES                VALUE "A".
         88 ONLY-NAME                     VALUE "O".
*
     05 OUTPUT-PAR             PIC X(1).
         88 SYSOUT                        VALUE LOW-VALUE.
88 SYSLST                        VALUE "L".
         88 SYSOUTCSV                     VALUE "O".
         88 SYSLSTCSV                     VALUE "C".

The version specification at the beginning of the structure FT-NCOPY-LIST serves to identify the COPY element and must not be overwritten.

The NLSHOW macro does not change any values in the structure FT-NLSHOW-LIST.

The fields are to be written with left-justified characters and filled with right-justified blanks (default for the COBOL-MOVE statement for character strings).

Fields which should not contain any specifications are to be assigned LOW-VALUE.

If a parameter is not specified, the default values are used as specified in the command SHOW-FILE-FT-ATTRIBUTES.

For the assignment of keywords, e.g. *ONLY-NAME and *SYSLST, use the values which are set in the corresponding 88 step structure.

Description of the data fields

The parameters for FT-NLSHOW-LIST have the same names and functions as the corresponding operands for the command SHOW-FILE-FT-ATTRIBUTES. Please refer to the command descriptions in the manual "openFT (BS2000) - Command Interface ".

In addition to the options offered at the command interface, the COBOL program allows you to address files and libraries by their linkname. This is done using the field LINK-NAME in the FT-NLMOD-LIST.

Only the link name or the filename/library name (not both) may be specified.

A link name which is not assigned at execution time leads to the message

FILE UNKNOWN.

Example NLSHOW

*******************************************************************
*  EXAMPLE:                                                       *
*  /SHOW-FILE-FT-ATTRIBUTES FILE-NAME=LOCALFILE,-                 *
*  /                        INFORMATION=*ALL-ATTRIBUTES           *
*  FROM A COBOL PROGRAM                                           *
*******************************************************************
 IDENTIFICATION DIVISION.
 PROGRAM-ID. TESTNLSHOW.
*
 ENVIRONMENT DIVISION.
*
 CONFIGURATION SECTION.
 SPECIAL-NAMES.
     TERMINAL IS TERM.
*
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 77 MAIN-RCODE-STRING                 PIC -ZZZZ9.
 77 SUB-RCODE-STRING                  PIC -ZZZZ9.
 COPY FTNLSHOW OF FTLIB.
 COPY FTRETC OF FTLIB.
*
 PROCEDURE DIVISION.
 STEUER SECTION.
 ST-01.
*
*SPECIFY-PARAMETERS.
     MOVE LOW-VALUE TO USER-PARAMETERS.
     MOVE "LOCALFILE" TO FILE-NAME.
     SET ALL-ATTRIBUTES IN INFORMATION TO TRUE.
*
*NLSHOW-CALLING.
     CALL "NLSHOW" USING FT-NLSHOW-LIST FT-RETURN-INFO.
*
*RESULT-HANDLING.
     IF OKAY IN MAIN-RETURN-CODE
     THEN
         DISPLAY "NLSHOW OKAY" UPON TERM
    ELSE
        MOVE MAIN-RETURN-CODE TO MAIN-RCODE-STRING
        MOVE SUB-RETURN-CODE TO SUB-RCODE-STRING
        DISPLAY "NLSHOW REJECTED" UPON TERM
        DISPLAY "MAIN-RETURN-CODE: " MAIN-RCODE-STRING
                " SUB-RETURN-CODE: " SUB-RCODE-STRING
                UPON TERM.
ST-99.
    STOP RUN.