Read flat file to custom table

Iam trying to open and read pipe delimiter flat file with .dat extension and then process it.
Can anyone guide me with opening a flat file and processing it with a fixed delimiter.

Regards,
 

eydeak

Reputable Poster
You've got a few options.

You could design a Table Conversion to read and process the file.

You could look at b4700240 to see if it would help. Or, use Object Browser to do a search on some key words like Import or Flat File to find some other business functions for reading and processing flat files.
 

RKUSA

Active Member
You can use this.

B76B0220 - Flat File I/O Functions

VA dd_PTH = [file location path dependent on the platform type]
VA dd_RECL = [maximum length of data]
VA dd_GENLNG = 0

Fetch Next Line from Flat File
VA dd_PTH -> szFlatFileName
VA dd_GENLNG <> idFilePtr
VA dd_APTA <- szFlatFileRecord
VA dd_RECL -> mnRecordLength

While VA sec_dd_GENLNG is not equal to "0"
Fetch Next Line from Flat File
VA dd_PTH -> szFlatFileName
VA dd_GENLNG <> idFilePtr
VA dd_APTA <- szFlatFileRecord
VA dd_RECL -> mnRecordLength
End While
 
Top