Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

6.5.6 BSRTFILE structure

The BSRTFILE structure specifies information in input file, output file, message file and temporary file.
When all file information to be specified in BSRTFILE structure is omitted, NULL is specified for the parameter file of the bsrtopen function. To specify file information, execute it after securing an area.

typedef struct {
    BSPTR_BSFILE        inpfile_tbl;
    BSPTR_UCHAR         outfile_addr;
    BSPTR_BSFILE        tmpfile_tbl;
    BSPTR_UCHAR         msgfile_addr;
    BSPTR_BSFSYS        inpfsys_tbl;
    unsigned char       outfsys;
    unsigned char       recovery;
    unsigned char       reserve[2];    /* reserved */
    BSPTR_BSIDX         idx_addr;
    BSPTR_BSFILE_EXT    outfile_tbl;
    BSPTR_VOID          reserve2;      /* reserved */
} BSRTFILE;

BSRTFILE structure member

In the following, it explains about the member of the BSRTFILE structure.

inpfile_tbl

To specify input file path name, set address of the BSFILE structure to which input file path name is set.
To input from the standard input or hand over the record from user application (bsrtput function or bsrtmrge function), set NULL.

outfile_addr

To specify output file path name, set the address of the file path name.
The file path name is a character string that ends with '\0'. To specify two or more output files, set them in outfile_tbl of BSRTFILE structure. To output to the standard output or return the record to user application (bsrtget function or bsrtmrge function) or specify two or more output files, set NULL.

tmpfile_tbl

To specify temporary file path name, set the address of BSFILE structure to which temporary file path name is set.
When temporary file path name is omitted, set NULL. In this case, PowerBSORT decides the directory that makes the temporary file according to the priority level. Refer to "Priority level of the directory that creates the temporary file" for the priority level.

msgfile_addr

To specify message file path name, set the address of the file path name.
The file path name is a character string that ends with '\0'. When message file path name is omitted, set NULL. In this case, the message is output to the specified file if BSORT_MSGFILE of startup file is specified.

inpfsys_tbl

This sets address of BSFSYS structure.

When the input file path name is not specified or when only the standard file system of the system is used, specification can be omitted.

outfsys

This sets file system of output file.
For information about the file system, refer to BSFSYS structure. When the output file path name is not specified or when the standard file system of the system is used, specification can be omitted.

recovery

This sets recovery processing when the output file abnormally terminates.
When the recovery processing is set, two or more output files are specified. The output processing ends without opening another output file if the output file abnormally terminates when this specification does not exist. The recovery processing can be specified at the following files.

When the recovery processing is specified, specify the following.

Define value

Meaning

BSRC_FILE

Recovery processing is executed.

idx_addr

This sets address of BSIDX structure.
It is effective for COBOL file system. It cannot be omitted for the indexed file of COBOL file system.

outfile_tbl

This sets address of BSFILE_EXT structure.
Information on the output file for the recovery processing is set.