Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

NSHOW - Display remote file attributes

The macro CALL "NSHOW"... can be used to view the attributes of a file or directory in an FT partner system. The functionality corresponds to that of the command SHOW-REMOTE-FILE-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.

Macro

The function can be called as follows:

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

FT-NSHOW-LIST

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

COPY FTNSHOW OF linkname.

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

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

Before executing another NSHOW 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-NSHOW-LIST is defined as follows:

 01  FT-NSHOW-LIST.
*
   02 FILLER                   PIC X(4)  VALUE "1000".
*
   02 USER-PARAMETERS.
*
     05 PARTNER-NAME           PIC X(200).
*
     05 FILE-NAME              PIC X(512).
         88 NOT-SPECIFIED                 VALUE LOW-VALUE.
     05 DIRECTORY              PIC X(512).
         88 NOT-SPECIFIED                 VALUE LOW-VALUE.
*
     05 FILE-PASSWORD          PIC X(64).
         88 NONE                          VALUE LOW-VALUE.
     05 FILE-PASSWD-ATTR       PIC X(1).
         88 GRAPHIC                       VALUE LOW-VALUE.
         88 OCTET                         VALUE "O".
*
     05 USER-DEF-ADMISSION     PIC X(67).
         88 NONE                          VALUE LOW-VALUE.
     05 USER-DEF-ADM-ATTR      PIC X(1).
         88 GRAPHIC                       VALUE LOW-VALUE.
         88 OCTET                         VALUE "O".
     05 TRANSFER-ADMISSION.
         10 USER-ID            PIC X(67).
         10 ACCOUNT            PIC X(64).
             88 NONE                      VALUE LOW-VALUE.
         10 PASSWORD           PIC X(64).
             88 NONE                      VALUE LOW-VALUE.
     05 USER-PASSWD-ATTR       PIC X(1).
         88 GRAPHIC                       VALUE LOW-VALUE.
         88 OCTET                         VALUE "O".
*
     05 INFORMATION            PIC X(1).
         88 STD                           VALUE LOW-VALUE.
         88 ALL-ATTRIBUTES                VALUE "A".
         88 ONLY-NAMES                    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 NSHOW macro does not change any values in the structure FT-NSHOW-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 entered, the default values are generated as in the SHOW-REMOTE-FILE-ATTRIBUTES command.
All other values which should be set in quotation marks at the command interface do not have these quotation marks in the programming interface.
Passwords with integer values must be entered in binary form.
For the assignment of keywords, e.g. *NOT-SPECIFIED and *SYSLST, use the values which are set in the corresponding 88 step structure.

Description of the data fields

The parameters for FT-NSHOW-LIST have the same names and functions as the corresponding operands for the command SHOW-REMOTE-FILE-ATTRIBUTES. Please refer to the command description in the manual "openFT (BS2000) - Command Interface ".
The parameter USER-DEF-ADM-ATTR is used to determine how the entry for USER-DEF-ADMISSION is to be interpreted. With the value GRAPHIC, the entry for USER-DEF-ADMISSION is interpreted as a printable character and converted for transfer to a system which does not use EBCDIC. With the value OCTET, the entry for USER-DEF-ADMISSION is interpreted as binary information and not converted.

Example NSHOW

*******************************************************************
*  EXAMPLE:                                                       *
*  /SHOW-REMOTE-FILE-ATTRIBUTES -                                 *
*  /      PARTNER=VAR001,FILE-NAME=REMOTEFILE,-                   *
*  /      TRANS=(USID,ACCOUNT,'PASSWORD'),-                       *
*  /      INFORMATION=*ALL-ATTRIBUTES                             *
*  FROM A COBOL PROGRAM                                           *
*******************************************************************
 IDENTIFICATION DIVISION.
 PROGRAM-ID. TESTNSHOW.
*
 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 FTNSHOW OF FTLIB.
 COPY FTRETC OF FTLIB.
*
 PROCEDURE DIVISION.
 STEUER SECTION.
 ST-01.
*
*SPECIFY-PARAMETERS.
     MOVE LOW-VALUE TO USER-PARAMETERS.
     MOVE "VAR001" TO PARTNER-NAME.
     MOVE "REMOTEFILE" TO FILE-NAME.
     MOVE "USERID" TO USER-ID.
     MOVE "ACCOUNT" TO ACCOUNT.
     MOVE "'PASSWORD'" TO PASSWORD.
     SET ALL-ATTRIBUTES IN INFORMATION TO TRUE.
*
*NSHOW-CALLING.
     CALL "NSHOW" USING FT-NSHOW-LIST FT-RETURN-INFO.
*
*RESULT-HANDLING.
     IF OKAY IN MAIN-RETURN-CODE
     THEN
         DISPLAY "NSHOW OKAY" UPON TERM
     ELSE
         MOVE MAIN-RETURN-CODE TO MAIN-RCODE-STRING
         MOVE SUB-RETURN-CODE TO SUB-RCODE-STRING
         DISPLAY "NSHOW REJECTED" UPON TERM
         DISPLAY "MAIN-RETURN-CODE: " MAIN-RCODE-STRING
                 " SUB-RETURN-CODE: " SUB-RCODE-STRING
                 UPON TERM.
 ST-99.
     STOP RUN.