aftp_get_record_format_string

The aftp_get_record_format_string call gets a string that corresponds to the input AFTP record format value. This string is available to allow all users of the AFTP API to have consistent strings for each record format type. It is not necessary to create an AFTP connection object before issuing this call.

AFTP_ENTRY aftp_get_record_format_string(
IN AFTP_RECORD_FORMAT_TYPE
record_format,
OUT unsigned char AFTP_PTR
record_format_string,
IN AFTP_LENGTH_TYPE
record_format_size,
OUT AFTP_LENGTH_TYPE AFTP_PTR
returned_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

record_format
An AFTP record format value.
AFTP_DEFAULT_RECORD_FORMAT
Specifies that the system on which the file will be written should use its own default setting for record format. This is the initial setting.
AFTP_V
Variable length record, unblocked.
AFTP_VA
Variable length record, unblocked, ASA print-control characters.
AFTP_VB
Variable length record, blocked.
AFTP_VBA
Variable length record, blocked, ASA print-control characters.
AFTP_VBM
Variable length record, blocked, machine print-control codes.
AFTP_VBS
Variable length record, blocked, spanned.
AFTP_VBSA
Variable length record, blocked, spanned, ASA print-control characters.
AFTP_VBSM
Variable length record, blocked, spanned, machine print-control codes.
AFTP_VM
Variable length record, unblocked, machine print-control codes.
AFTP_VS
Variable length record, unblocked, spanned.
AFTP_VSA
Variable length record, unblocked, spanned, ASA print-control characters.
AFTP_VSM
Variable length record, unblocked, spanned, machine print-control codes.
AFTP_F
Fixed length record, unblocked.
AFTP_FA
Fixed length record, unblocked, ASA print-control characters.
AFTP_FB
Fixed length record, blocked.
AFTP_FBA
Fixed length record, blocked, ASA print-control characters.
AFTP_FBM
Fixed length record, blocked, machine print-control codes.
AFTP_FBS
Fixed length record, blocked, standard.
AFTP_FBSA
Fixed length record, blocked, standard, ASA print-control characters.
AFTP_FBSM
Fixed length record, blocked, standard, machine print-control codes.
AFTP_FM
Fixed length record, unblocked, machine print-control codes.
AFTP_U
Undefined length record.
AFTP_UA
Undefined length record, ASA print-control characters.
AFTP_UM
Undefined length record, machine print-control codes.
record_format_string
The buffer into which the record format string will be written.

Use the AFTP_RECORD_FORMAT_SIZE constant to define the length of this buffer. Add 1 to the size if you want to be able to add a null terminator to the text in the buffer.

record_format_size
The size of the buffer into which the record format string will be written.
returned_length
The actual length of the record_format_string parameter in bytes.
return_code
The return code issued for this function. See AFTP Return Codes for the list of possible return codes.

Example

{
    AFTP_RETURN_CODE_TYPE         aftp_rc;
    unsigned char                 recfm[AFTP_RECORD_FORMAT_SIZE+1];
    AFTP_LENGTH_TYPE              returned_length;

    /*
     * There are no prerequisite calls for this call.
     */

    /*
     * Get the record format string.
     */

    aftp_get_record_format_string(
        AFTP_F,
        recfm,
        (AFTP_LENGTH_TYPE)sizeof(recfm)-1,
        &returned_length,
        &aftp_rc);
}
 

Line Flows

None.