How to: |
MODIFY FIXFORM can load multiple text fields into a data source. The data source must have a Write data adapter that supports MODIFY, and the data source must support text fields. In the case of Relational data sources, long varchar fields are mapped as text fields in the Master File. Support for this feature with a relational data adapter is dependent on whether the specific relational engine supports multiple long varchar columns.
The text fields must be the last fields in the FIXFORM field list and may not be conditional transaction fields. In the file, each text field must be terminated by a %$ character combination on a line by itself.
If the data to be loaded is from a HOLD file, the text fields must also be the last fields in the HOLD file. However, the text fields can be loaded anywhere in the receiving data source.
FIXFORM field1/fmt1 ... fieldn/fmtntxtfld1/TX ... txtfldn/TX
where:
Are non-text fields.
Are the format specifications for the non-text fields.
Are text fields.
Is the format specification for the text fields.
FIXFORM FROM ddname
where:
Is the AS name used to create the HOLD file. If no AS phrase was specified in the HOLD command, the ddname is HOLD.
This example uses the COURSES data source, which contains a text field, to create a HOLD file with three text fields. It then uses this HOLD file to load data into the TEXT3 data source.
The following request creates the HOLD file:
SET ASNAMES=ON TABLE FILE COURSES PRINT COURSE_CODE DESCRIPTION AS 'DESCRIPTION1' DESCRIPTION/TX25 AS 'DESCRIPTION2' DESCRIPTION/TX100 AS 'DESCRIPTION3' ON TABLE HOLD FORMAT ALPHA END
The following is the Master File for the TEXT3 data source:
FILE=TEXT3 ,SUFFIX=FOC SEGNAME=SEG1,SEGTYPE=S1 FIELDNAME =COURSE_CODE ,CCODE ,A6 ,$ FIELDNAME =DESCRIPTION1 ,DESC1 ,TX50 ,$ FIELDNAME =DESCRIPTION2 ,DESC2 ,TX25 ,$ FIELDNAME =DESCRIPTION3 ,DESC3 ,TX100 ,$
The following procedure loads the TEXT3 data source:
CREATE FILE TEXT3 MODIFY FILE TEXT3 FIXFORM FROM CRSEHOLD DATA ON CRSEHOLD END
The following messages indicate that the data was loaded:
NEW FILE TEXT3 FOCUS A1 ON 06/04/2004 AT 16.02.18 > TEXT3 FOCUS A1 ON 06/04/2004 AT 16.02.18 TRANSACTIONS: TOTAL = 3 ACCEPTED= 3 REJECTED= 0 SEGMENTS: INPUT = 3 UPDATED = 0 DELETED = 0 >
The following request prints the second text field from the data source:
TABLE FILE TEXT3 PRINT DESCRIPTION2 BY COURSE_CODE ON COURSE_CODE SKIP-LINE END
The output is:
COURSE_CODE DESCRIPTION2 ----------- ------------ 101 This course provides the DP professional with the skills needed to create, maintain, and report from FOCUS databases. 200 Anyone responsible for designing FOCUS databases will benefit from this course, which provides the skills needed to design large, complex databases and tune existing ones. 201 This is a course in FOCUS efficiencies.
Information Builders |