Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

file - Define file attributes on local host

&pagelevel(4)&pagelevel

The file command specifies - for a non-1:1 transfer - the file attributes of a file to be transferred from the local host. file is mapped to the BS2000 FILE command. If preceded by the quote site command, this command can also be issued at the FTP server (see "FTP servers in BS2000").

file

<local-file> <, file-operand-list>


<local-file>

Name of the local file whose attributes are to be specified. Either a fully-qualified file name permitted in the FILE command or the "*" character must be used.

<file-operand-list>

The possible operands are listed in the appropriate BS2000 manuals.
If a file name is specified for local-file, the file command applies only to the next get, mget, reget or recv command that references the file name. If "*" is specified for local-file, the file command applies only to the next get, recv, reget or mget command. The file attributes then apply to the local file name specified in the get, reget, recv or mget command.

If several file commands are entered, only the entries for the last file command apply.

If no file command is specified and if the file does not exist, the usual defaults apply, i.e.:

  • For transfer type ascii (see the type or ascii command), SAM files with a variable record length are generated.

  • For transfer type binary (see the type or binary command), PAM files are generated.

  • If the file already exists, the attributes are taken from the catalog entry, and the file is overwritten.

  • The LINK operand must not be included in the file-operand-list, since a link name is added automatically.

Restrictions

Only those file attributes also supported by C-RTS V2.0 for STREAM I/O (see the “C library functions for POSIX applications” manual) are supported here.

For ISAM files, only the settings KEYPOS=5 and KEYLEN=8 are supported for the key position and key length, respectively.

Record keys are not transmitted when ISAM files are transferred with the put command. The recform operand is ignored. Consequently, ISAM files can only be read.

How you transfer BS2000 disk files and retain their attributes is described in the section “1:1 transfer of BS2000 disk files”.

Example

  1. The transfer type is set to binary.

    type binary

    200 Type set to I.

  2. A file command is issued for file1.

    file file1,fcbtype=sam

  3. The file file1 is created as a SAM file.

    get file2 file1