CloseFlatFile

Flat File Operations

Minor Business Rule

Object Name: B34A1010

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function closes a flat (text) file that has been opened by Flat File Operations  Open 
File (in the same source). 


2.Technical Specifications


2.4Processing 

1.Retrieve the file pointer using jdeRetrieveDataPtr with the idFilePtr as input.
If the file pointer is null, set cErrorCode = '1' and szErrorMessageId to "3143".

2.Close the file

Close the file and call jdeRemoveDataPointer with the idFilePtr as input.

^

Data Structure

D34A1010C - Flat File Operations - Close File

Data Item    Data Structure Description    I/O    Required    Notes
SUPPS        cSuppressErrorMessage         I                  Input '1' if you don't want the 

business function to set any errors

ERRC         cErrorCode                    O                  '1' if there are errors, '0' otherwise

DTAI         szErrorMessageId              O                  Error code to be set, if any

GENLNG       idFilePtr                     I      Y           ID of the stored file pointer.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
cSuppressErrorMessageSUPPScharOPTINPUT

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

cErrorCodeERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIdDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

idFilePtrGENLNGIDREQINPUT

General purpose ID variable.

Related Functions

None

Related Tables

None
OpenFlatFile

OpenFlatFile

Flat File Operations

Minor Business Rule

Object Name: B34A1010

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function will open a flat (text) file and store the file pointer for subsequent use. 


1.2Setup Notes and Prerequisites

The flat file path name & filename must be valid  for the platform where this business function is to 

be run.


2.Technical Specifications


2.4Processing 

1.If the szFilePath is blank, set cErrorCode to '1' and szErrorMessageId to "3143".

2.Open the file

If cAppendMode is '1', open the text file with mode "a+", otherwise open with mode "w"
If the file pointer is not null, store it with jdeStoreDataPointer and return the id in idFilePtr.

If the file pointer is null, set cErrorCode to '1' and set szErrorMessageId to "078D".


Data Structure

D34A1010A - Flat File Operations - Open File

Data Item    Data Structure Description    I/O    Required    Notes
SUPPS        cSuppressErrorMessage         I                  Input '1' if you don't want the 

business function to set any errors

ERRC         cErrorCode                    O                  '1' if there are errors, '0' otherwise

DTAI         szErrorMessageId              O                  Error code to be set, if any

EV01         cAppendMode                   I                  '1' if the file is to be opened in 

append mode; otherwise, any existing file is overwritten.

GENLNG       idFilePtr                     O      Y           ID of the stored file pointer.

EFRM         szFilePath                    I      Y           Full pathname to the text file to be 

opened. 


^

Parameter NameData ItemData TypeReq/OptI/O/Both
cSuppressErrorMessageSUPPScharOPTINPUT

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

cErrorCodeERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIdDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cAppendModeEV01charOPTINPUT

An option that specifies the type of processing for an event.

idFilePtrGENLNGIDREQOUTPUT

General purpose ID variable.

szFilePathEFRMcharREQINPUT

A narrative explanation of what special processing logic will be performed.

Related Functions

None

Related Tables

None
WriteOneLine

WriteOneLine

Flat File Operations

Minor Business Rule

Object Name: B34A1010

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function writes one line of text to a flat file that was opened previously. 


1.2Setup Notes and Prerequisites

The file to be used must be opened with Flat File Operations - Open File (in the same source) before 

ths business function may be used.


2.Technical Specifications


2.4Processing 

1.Retrieve the file pointer using jdeRetrieveDataPtr with the idFilePtr as input.

If the file pointer is null, set cErrorCode = '1' and szErrorMessageId to "078D".

2.Check the input line
If szRecord is blank, set cErrorCode = '1' and szErrorMessageId to "3143".

3.Write the line to the text file

Data Structure

D34A1010B - Flat File Operations - Write One Line

Data Item    Data Structure Description    I/O    Required    Notes
SUPPS        cSuppressErrorMessage         I                  Input '1' if you don't want the 

business function to set any errors

ERRC         cErrorCode                    O                  '1' if there are errors, '0' otherwise

DTAI         szErrorMessageId              O                  Error code to be set, if any

GENLNG       idFilePtr                     I      Y           ID of the stored file pointer.

VAR1         szRecord                      I      Y           Line of text to be written.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
cSuppressErrorMessageSUPPScharOPTINPUT

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

cErrorCodeERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIdDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

idFilePtrGENLNGIDREQINPUT

General purpose ID variable.

szRecordVAR1charREQINPUT

Variable length field used in Univeral File Converter Export Utility.

Related Functions

None

Related Tables

None