contents.gifindex.gif

Generic_Cust_Feed_File

Purpose

Takes up to three SQL strings as parameters and combines their output into a single output file.

Arguments

Generic_Cust_Feed_File (

<sql_1>
An optional SQL string which, if present, must have an output column labeled Print_Line. This column is used as the source of data to be put in the resulting file. The three SQL strings may be used for file header, detail, and footer sections.
, <sql_2>
An optional SQL string as described above.
, <sql_3>
An optional SQL string as described above.
, <File_Grp>
The name of a File Group as described in the FILE_GRPS table. This entry is used to determine the directory that the generated file is to be put into. A value of AP Feeds has been used for several customers.
, <FileName>
The name of the file to be generated. This may be a literal constant, or an expression such as New_AP_Feed_FileName("200-0200") & ".APF". (Note that New_AP_Feed_FileName is a function which will return a non-repeating system generated file name based on the date and a counter)
, <Fixed_Length>
An integer, of Null. Null implies that records are variable length as set by the Print_Line values from the SQL recordsource. An integer value indicates the number of meaningful characters output on a single line. If the Print_Line values are shorter, they will be padded with spaces. If they are longer, they will be wrapped onto multiple lines, with the last being padded with spaces such that all are of equal length.
, <Line_Separator>
A string of zero or more characters which separate each line from the next. No separator is present after the last line of the file.
, <Line_Terminator>
A string of zero or more characters which terminate line, including the last line. Typically, one of <Line_Separator> or <Line_Terminator> will be empty. A common value is CRLF(), which yields a Carriage Return and Line Feed.
, <File_Terminator>
A string of zero of more characters which terminate a file. Typically, this will be empty; however, some systems expect a CTRL-Z as a file terminator.
, <Upper_Case_Flag>
A Boolean indicating whether all file output should be forced to uppercase.
)