QUOTER utility
- Last Updated: January 17, 2024
- 4 minute read
- OpenEdge
- Version 12.8
- Documentation
The QUOTER utility formats character
data in a file to the standard format so it can be used by an ABL
(Advanced Business Language) procedure. By default, QUOTER does
the following:
- Takes the name of a file as an argument
- Reads input from that file
- Places quotes (") at the beginning and end of each line in the file
- Replaces any already existing quotes (") in the data with two quotes (" ")
You can use the QUOTER utility directly from
the operating system using the operating system statement, as appropriate,
to reformat data from a file that is not in the standard ABL input
format:
| Operating system | Syntax |
|---|---|
| UNIX Windows |
|
- input-file-name
- Specifies the file you are using.
- > output-file-name
- Specifies the file where you want to send the output.
-
-dcharacter - Identifies a field delimiter. You can specify any punctuation character.
-
-cstartcol-stopcol - Specifies the ranges of column numbers to be read as fields. Do not use any spaces in the range list.
Suppose your data file looks like i-datf12.d.
i-datf12.d
|
You use QUOTER to put this file into standard
format. Use commands shown in the following table to run QUOTER from
the Procedure Editor.
| Operating system | Using QUOTER—Examples |
|---|---|
| Windows | DOS quoter i-dat12.d >i-dat12.q |
| UNIX | UNIX quoter i-datf12.d >i-datf12.q |
In the following figure, i-datfl2.d is the
name of the data file you supply to QUOTER while i-datfl2.q is
the name of the file in which you want to store QUOTER's
output.

The i-datfl2.q file contains the QUOTER output.
i-datf12.q
|
Now this file is in the appropriate format to be used as input to an ABL procedure.
What if each of the field values in your data file is not on a separate line (unlike i-datfl2.d) and without quotes (unlike i-datf1.d)? That is, your data file looks like i-datfl3.d.
i-datf13.d
|
Suppose you wanted to use this file as the input source to create
customer records for customers 90, 91,
and 92. You need to make each line of the file
into a character string and then assign a substring of this value
to each field. The procedure i-chgin3.p does
that.
i-chgin3.p
|
The numbers to the left of the procedure correspond to the following step-by-step descriptions:
- The
QUOTERutility takes the data from the i-datfl3.d file and produces data that looks like the i-datf13.q example.i-datf13.q
"90 Wind Chill Hockey BBB" "91 Low Key Checkers DKP" "92 Bing's Ping Pong SLS" - The
INPUT FROMstatement redirects the input stream to get input from the i-datfl3.q file. - The
CREATEstatement creates an empty customer record. - The
SETstatement uses the first quoted line in the i-datfl3.q file as input and puts that line in the data variable. Once that line of data is in the line variable, the next statements break it up into pieces that get stored in individual customer fields. - The
SUBSTRINGfunctions take the appropriate pieces of the data in the line variable and store the data in thecust–num,name, andsales–repfields, as shown in the following figure.Figure 2. Extracting QUOTER input with SUBSTRING 
Because ABL assumes that all the data in the i-datfl3.q file is character data, you must use the
INTEGERfunction to convert thecust–numdata to an integer value. - The
INPUT CLOSEstatement closes the input stream coming from the i-datfl3.q file and redirects the input stream to the terminal.Note: With this method, all trailing blanks are stored in the database. To avoid this problem, use the–cor–doption ofQUOTER.
You can use QUOTER to prepare files formatted
in other ways as well. For example, suppose the field values in
your data file are separated by a specific character, such as a
comma (,), as in i-datfl4.d.
i-datf14.d
|
You can use a special option, -d, (on UNIX)
to tell QUOTER what character separates fields.
The procedure i-chgin4.p reads the comma-separated
data from i-datfl4.d.
i-chgin4.p
|
Here, the -d option or the DELIMITER qualifier
tells QUOTER that a comma (,) is the delimiter
between each field in the data file. The output of QUOTER is
shown in i-datfl4.q.
i-datf14.q
|
This data file is in the standard blank-delimited ABL format.
If your data file does not use a special field delimiter that you
can specify with the –d QUOTER option or the /DELIMITER qualifier,
but does have each data item in a fixed column position, you can
use another special option, –c, on Windows and
UNIX.
You use the –c option or /COLUMNS to
identify the columns in which fields begin and end. For example,
suppose your file looks like i-datfl5.d.
i-datf15.d
|
The procedure i-chgin5.p uses this data file to create customer records.
i-chgin5.p
|
Because you used the –c option, this procedure produces
a data file without trailing blanks.
You can also use QUOTER interactively to reformat your
data. You can access QUOTER interactively through the
Administration Tool or, in character interfaces, the Data Dictionary.
From the main menu, choose Utilities.