| Environments | EASI |
| Sections | Description Parameters Parameter Details Details Example Related |
Transfers a line of text held in a parameter to a text segment on a PCIDSK file.
TEXPUT is a tool for users writing EASI procedures. Its companion is TEXGET, which gets (reads) a line of text.
| Name | Prompt | Type | Length |
|---|---|---|---|
| FILE | Database file name | Char | 1 - 192 |
| TEXSEG | Database text segment | Int | 0 - 1 |
| DBSN | Database segment name | Char | 0 - 8 |
| DBSD | Database segment descriptor | Char | 0 - 64 |
| LINENUM | Line number to access | Int | 0 - 1 |
| LINETEXT | Line of text | Char | 0 - 64 |
| LASC | Last segment created | Int | 0 - 1 |
Specifies the name of the PCIDSK image file that contains the text segment.
EASI>FILE="filespec"
Specifies number of the text segment (type 140) to put (write) a line of text to.
EASI>TEXSEG=i | Use existing segment i EASI>TEXSEG= | Create a new segment
If a new segment is created then TEXSEG is assigned the number of this segment, after the program has finished executing.
Specifies a 1 to 8-character identifier that will be assigned to the output text segment. This string is displayed by ASL, and may be changed with MAS.
EASI>DBSN="seg name"
Specifies a 1 to 64-character descriptor that will be associated with the output segment. This string is displayed by ASL if parameter LTYP is set to "MEDIum" or "FULL", and may be changed with MAS.
EASI>DBSD="string describing contents or origin of data"
Lowest value: 1
Specifies the line number of the line of text to write.
EASI>LINENUM=n | write to nth line EASI>LINENUM= | append after last line
Line numbering starts at 1.
Contains the line of text to put (write) to the text segment. This can be 0 to 64 characters in length.
EASI>LINETEXT="text" | write "text" EASI>LINETEXT= | write a blank line
If a new segment is created, LASC is assigned the number for the new segment, after the program has finished executing. (This number is also assigned to parameter TEXSEG).
TEXPUT is used to write a line of text to a text segment on a PCIDSK file. The line can be written to a specific position (line number in the text) or appended to the end of the text in the segment. TEXPUT is intended for use by writers of EASI procedures who need to read and write lines of text.
TEXPUT writes a line of text (LINETEXT) to a specified line (LINENUM) in a text segment (TEXSEG) on a PCIDSK file (FILE). If the line already exists then it will be overwritten by contents of LINETEXT. If a new segment is created the parameters DBSN and DBSD are used to name and describe it.
The following should be noted:
1) Text segments can be up to 32767 characters long, after this data will be lost.
2) While lines of text in the segment can have any length, TEXPUT can only write lines of 0 to 64 characters due to the length limitations on parameter strings.
3) TEXGET reads a line of text from a text segment.
4) Normal text files on disk can be read into text segments using task TEXREAD. Text segments can be written to disk using TEXWRIT. Once in a text segment the contents of a text file can be accessed using TEXGET, TEXPUT in EASI.
5) In EASI, the following string manipulation functions can be used: +, string concatenation; f$extract, substring extraction; f$string, convert number to string; f$value, convert string to number.
PCI would like to thank Liz Wegenka at the USGS, Menlo Park, California, for suggesting this program.
An EASI user wishes to generate a report containing the lowest and highest gray level for the first five channels in file irvine.pix. The HIS function could be used but its output is not in the form required. HIS does, however, return this information in parameter IMSTAT where: IMSTAT(11)=lowest gray level; IMSTAT(12)=highest gray level.
The user wrote the following EASI procedure:
5 rem ---- SPECIAL MIN/MAX REPORT GENERATING PROCEDURE ---- 10 local #channel 20 file = "irvine.pix" 30 rem --------- CREATE THE TEXT SEGMENT WITH HEADERS ------- 40 texseg = \rem new segment 50 dbsn ="MyReport" \rem segment name 60 dbsd ="Temporary for report" 70 linenum = \rem append mode 80 linetext="Chan Lowest Highest" 90 run texput \rem create 210 rem SET UP FOR RUNNING HIS TO GET INFORMATION 230 nsam= \ trim= \ hisw= \ mask= 240 report="junk.jnk" \rem redirect HIS output 250 rem ------------ LOOP FOR THE 5 CHANNELS ---------------- 270 #channel = #channel + 1 \ DBIC=#channel 280 run his 310 rem ---- FORMAT CHAN, LOW, HIGH INTO 8 CHARACTER FIELDS --- 330 linetext=f$string(#channel) + " " 340 linetext=f$extract(linetext,1, 8)+f$string(IMSTAT(11))+" " 350 linetext=f$extract(linetext,1,16)+f$string(IMSTAT(12))+" " 360 run texput 370 if (#channel < 5) goto 270 410 rem - TRANSFER THE REPORT TO NORMAL DISK FILE AND CLEAN UP - 430 tfile="myreport.doc" 440 run texwrit \rem report to file 450 dbsl = texseg \ dasm = "DELETE" 460 run das \rem delete text segment 470 delete report \rem delete "junk.jnk" 480 report="TERMINAL" \rem restore reporting
Running this procedure yields the file "myreport.doc" containing:
Chan Lowest Highest
1 43 239
2 13 120
3 6 166
4 2 130
5 0 157
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.