Movex Spoolfiles (SPLF) and StreamFiles (STMF)
When Movex (M3 today) was introduced the Output files available was Spoolfiles, SPLF an data file stored in a database for later printout. It was created by the Movex RPG programs and the program name was using a prefix PF to the program that created the Output File,
e.g. the customer order invoice printer program in Movex was called OIS199PF. The program that created the Spoolfile, SPLF was OIS180 and that used a program called OIS199 to create the Spoolfile. The Spoolfiles can still be used in older versions of Movex/M3 (RPG and Java). The Spoolfiles was page orientated ASCII files, and difficult and costly to change since the pages where coded using IBM RPG programming language to code the files.
In Movex version 11.1 RPG (and converted to Java) a StreamFile was developed to replace the Spoolfiles, C program (CMNGSTMF). This made it possible to use files with Movex fields and data (tab separated in a file) created as a sequential ASCII file instead of the Spoolfiles (page oriented).
The Page oriented output was replaced with an ASCII file that included fields and data tab separated with some information about the attributes that was used creating the Output from M3. The files were created as single document files or batch files, depending on which program in Movex that created the file. There were about 800 programs that created files from over 4000 databases in Movex.
At that moment a software called StreamServe was sold together with Movex (a third-party solution). StreamServe had a Tool for receiving and decoding the StreamFiles using a Agent driver created for Movex files. This made it possible for the StreamServe Service, called Movex Output Server, MOS at that time, to decode the StreamFile and read in the file for further handling.
The StreamFile was a tab separated ASCII file with fieldname and data. There was no control of the integrity of the file or the data. The data was of three different types, Text fields, Numerical fields or Date fields, all of them were handled as Text fields without any content control or format settings. A Date field could contain any Date format without any explanation to wat it was. The content of the field was decided by the programmer that wrote the program in Movex / M3.
This made it difficult to handle the fields as a Date field since one Streamfile could have many different date formats in the same file, e.g. 0HOAORDT 2015-05-12 (order date from the customer order header (OOHEAD in M3) and then 0LOBDLDT /30/04/20/ (preliminary delivery date from OOLINE). This has resulted in many consultants all over the world has spent thousands of hours on writing scripts and functions in StreamServe trying to solve the problem).
The same problem occurred for Numerical values that could have many different thousand and decimal separators, e.g. 9.999,00 or 9 999,99 or even 000009999000000 which is the standard format for the fields in the database 15(6), 15 characters with 6 decimals.
There was also Movex variables (starting with an asterisk *) in the StreamFile and they could be used in StreamServe as variables (using $Mvx as a prefix to get the variable, i.e. the variable *DIVI was fetched using *Mvx_DIVI).
The Streamfiles is created the same way as the Spoolfiles in a logic sequential order, based on the same order that the java programs in M3 are creating the file, i.e. the same way that the Spoolfiles was created using the subroutines in the RPG code. It starts with an document header based on the document type that are being created, then the line headers are added, lines, sub totals, totals etc. until the end of the document in the program (EOF) and the StreamFile was ended, closed and saved in a directory. If it was a batch file, the next header was created in the same StreamFile until all the documents in the actual batch was created. The beginning of a new document in the StreamFille started with a BEGIN line, e.g. for a customer order invoice (OIS199PF), BEGINOIS199PF, which also meant a page break, create a new page, in StreamServe.
In M3 11.x and 13.x with Infor OS the Streamfiles are being replaced by M3 configurable Xml. These are Xml files that are created in the same order as the StreamFiles but with Xml attributes. The Xml has Numerical and Date values with format codes as attributes to make it possible to use it by document rendering software.
See separate blog about M3 xml for more information.
Peter Sandersnäs, Accure 2021
ABC Accure Cloud Suite ACS4M3 AOS AOS Cloud Suite API AS400 Career Cloud ERP HTTPS Infor Job LABEL M3 M3 CloudSuite M3 Cloud Suite M3adapter M3CE M3xml Movex Output management REST RPG Sales Spoolfile STMF StreamFile