Navigation:  Reference > Functions >

GetFieldFromDelimitedBuffer()

Print this Topic Previous pageReturn to chapter overviewNext page

 

GFLD(1,2,3,4)

 

PURPOSE

This function returns a field from a delimited file buffer previously read with the READ or FINDV (Find Record) command or the GET_REC() function.

 

PARTS

 

1 f/c/eThe field number in the delimited record.  The first value in the record is field 1.  Default is value 1.

 

2 f/c/eThe file_number/handle for the file that contains the delimited records.  You must provide a file_number/handle or provide a field or constant in part 4.

 

3 f/c/eThe delimiter between fields in the buffer.  The default value is a comma ','.

 

4 f/n/vA field to be used instead of a file.  You must provide a value here if you didn't specify a file in part 2.

 

RETURN TYPE - A

 

COMMENTS

The quotes surrounding A type fields in the delimited record are automatically removed before the value is returned.

 

If you specify a field name as part 4, the program will treat that field as a record buffer so that the overall process will remain the same as if you had specified a file_number.  If you use this option, be sure to put in a place-holding comma where the file_number would ordinarily go.  In the example below, the programmer has not specified a file_number and has used the default delimiter value:

 

EXAMPLE

define X type A size 100

x = glfd(5,,,field_holder)

 

 


Page url: http://www.cassoftware.com/tas/manual/getfieldfromdelimitedbuffer.htm