IPWorks EDI 2020 Node.js Edition

Questions / Feedback?

OFTPConnectionVirtualFileFormat Property

The structure of the outgoing or incoming file.

Syntax

 oftpserver.getOFTPConnectionVirtualFileFormat(index, [callback])
 oftpserver.setOFTPConnectionVirtualFileFormat(index,  OFTPConnectionVirtualFileFormat, [callback])

Possible Values

  0 (ffUnstructured), 
  1 (ffText), 
  2 (ffFixed), 
  3 (ffVariable)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getOFTPConnectionVirtualFileFormat([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setOFTPConnectionVirtualFileFormat([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The structure of the outgoing or incoming file.

When sending files, set this property to specify the format to apply to outgoing files.

When receiving files, query this property to determine the structure of the file received from the client.

The following values are valid file formats for outgoing virtual files:

0 (Unstructured - default) The outgoing file is binary and has not structure. There are no records in this type of file.
1 (Text) The outgoing file is a text file that consists of lines containing no more than 2048 characters terminated by CRLF. This type contains no records.
2 (Fixed) The outgoing file is in fixed file format, which means all records are of the same length. For fixed files, the class expects the file to be in text format with each line containing the MaxRecordSize characters terminated by a CRLF.
3 (Variable) The outgoing file is a variable file format, meaning all records are of variable length and are no longer than MaxRecordSize. When using this format, the class will parse out each record as a line terminated by CRLF. Thus, this type of file must be a text file, and must contain lines with less than MaxRecordSize characters.

Note: When either OFTPConnectionVirtualFileSecurityLevel has been set to a value other than slNone or OFTPConnectionCompress has been set to true, all files become ffUnstructured except ffVariable files.

The index parameter specifies the index of the item in the array. The size of the array is controlled by the OFTPConnectionCount property.

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Node.js Edition - Version 20.0 [Build 8203]