EDITFST(1) |
RPN UTILITY |
EDITFST(1) |
editfst version 3.0 (March 92)
editfst2000 version 5.8+ (July 2001)
editfst [-s -d -sseq -dseq -i -l -e -v -vs -vd -c -nrecmin -k -m -n]
Utility used for editing and copying records from RPN standard files into a new or an existing RPN standard file. It can do a straight (complete) copy of the input file or it can copy records selectively as indicated from the standard input or from a file of directives named in the "-i" key.
Definitions of keys in the command line | |
key | description |
-s srcfile -s filea fileb filec | one or multiple (up to 35) names of the input files; For the rest of the documentation, "srcfiles" will be referred as the files defined in here. Source files can also be defined in the STDCOPI in the stdin directives |
-d dstfile | name of the destination (resulting/output) file; For the rest of the documentation, "dstfile" will be referred as the file defined in here. Destination files can also be defined in the STDCOPI in the stdin directives |
-sseq | indicates that the srcfiles is of type SEQuential |
-dseq | indicates that the dstfile is of type SEQuential |
-i 0 -i edit.dir |
(The directives given to the utility controls the selective copying from the source files to the destination file. These directives are documented in a table below.) |
-l listing | file given for the stdout listing |
-e | A 'RND' record will be over-written if its search descriptors NOM,TYPE,IP1,IP2, IP3,ETIKET (except DATE) are identical to the ones of the record to be copied |
-v | verbose mode, indicates which records are added to the dstfile like the format utility voir |
-vs | prints the table of contents of the srcfiles like the format utility voir |
-vd | prints the table of contents of the dstfile like the format utility voir |
-c 100 | maximum number of records to be copied to the dstfile |
-nrecmin 100 | minimum number of records expected to be copied to the dstfile. If the number of records copied are less than this value, a non-zero status code will be returned, otherwise, it will return "0" (normal status code) |
-k fatale | minimum error level to abort: 'fatale' or 'errors' |
-m inform | message level: either 'inform' or 'errors' or 'debugs' |
-n | Outputs no boxes around the message EXDB, EXFIN, at the beginning and at the end of the execution respectively. |
Description of Directives
| ||
Directives | Description and Usage | |
DESIRE | DESIRE(TYPVAR,NOMVAR,ETIKET,DATE,IP1, IP2,IP3) Copies (desires) the records that meet the 7 selection parameters: desire(-1,-1,-1,-1,-1,-1,-1) desire('A','TT','REGIONAL',100185000,12000,6,0) desire('P',['UU','VV'], -1 ,-1 ,[1000.,750.],[0,12,18,24],-1) desire(['A','P'],'PN',-1,[100185000,@,100685120,DELTA,6],-1,-1,-1) desire(-1,'TT','GLOBAL',COMMUNE,-1,0,0) desire(-1,-1,-1,-1,[1.0,SIGMA],-1,-1)
The selection parameters can be defined in these 3 forms.
(2) One value, integer or a character string surrounded by quotes (3) A list of up to 10 elements in this form [?,?,?] Examples for DATE:
MBAR (millibars) METERS(metres) OTHER HYBRID(values from 0.0 to 1.0)(revision 5.84 or higher) Examples:
NOTE: if both "DESIRE" and "EXCLURE" are not used, it will copy all srcfiles into the dstfile. The search of records to copy is done throughout the entire "random access" file or, from the current position of a "sequential" file. When there are fewer than 7 parameters defined, the last missing parameters are set to "-1". | |
EXCLURE | EXCLURE(TYPVAR,NOMVAR,ETIKET, DATE,IP1, IP2,IP3) Excludes the records that meet the 7 selection parameters. exclure(A,TT,'REGIONAL',299823200,12000,6,0) | |
CRITSUP | CRITSUP(NI,NJ,NK,GRTYP, IG1,IG2,IG3,IG4) 1 to 8 supplementary selection parameters that can be used with the DESIRE and EXCLURE directives.(This command only affects future calls to DESIRE/EXCLURE.) critsup(400,200,-1,'G',-1,-1,-1,-1) exclure('A',-1,-1,-1,-1,-1,-1) desire(-1,['UU','VV'],-1,-1,-1,-1,-1) critsup(-1) desire(-1,'TT',-1,-1,-1,-1,-1) The selection parameters can be defined in these 2 forms.
(2) One value, integer or for GRTYP, one character string surrounded by quotes | |
ZAP | ZAP(TYPVAR,NOMVAR,ETIKET,DATE, IP1,IP2,IP3) Modifies the record parameters during the copy by replacing with the values given in the arguments of this directive. desire(-1,'TT',-1,-1,-1,-1,-1) zap('A',-1,'GLBANAL',-1,-1,-1,-1) (The example above selects all 'TT' records and then replaces in each of these selected records, the typvar with 'A' and the etiket with 'GLBANAL'. zap (-1,-1,'HELLO' ,-1,-1,-1,-1) desire (-1,'UU',-1,-1,-1,-1,-1) stdcopi (-1) zap ('A',-1,'GOODBYE',-1,-1,-1,-1) desire (-1,'TT',-1,-1,-1,-1,-1) stdcopi (-1) (The example above selects all 'UU' records and then replaces in each of these selected records, the etiket with 'HELLO' and writes it out. Then it selects all the TT records and then writes them out and replaces the typvar with 'A' and the etiket with 'GOODBYE' at the same time.) NOTE: When some parameters are missing, the value of -1 is the default. | |
PERIODE | PERIODE(DN, ECART, DUREE, DELTA) Sets a common date or time period for the following DESIRE and EXCLURE directives when 'COMMUNE' is used in the argument of DATE. This should be called before DESIRE/EXCLURE. PERIODE('OPRUN',6,240,6) desire(-1,'TT','GLOBAL',COMMUNE,-1,0,0) PERIODE(9930000,6,24,1) desire(-1,'UU','GLOBAL',COMMUNE,-1,0,0) PERIODE(-299823200,0,12,3) desire(-1,'VV','GLOBAL',COMMUNE,-1,0,0) PERIODE(#, 0, 0, 1) desire(-1,'WW','GLOBAL',COMMUNE,-1,0,0) It may take one of the following forms:
YYJJJZZ - a positive number; year,julian day,zulu hr -CMCSTAMP - a negative integer; CMC date timestamp (-299823200). | |
DEBUG | DEBUG=OUI/NON [ NON ] OUI: Same meaning as the "-m debugs" key. NON: Cancels the effect of a "DEBUG=OUI" directive or of a "-m" key. | |
DIAG | DIAG=OUI/NON [ NON ] OUI: Same meaning as the "-m inform" key. NON: Cancels the effect of a "DIAG=OUI" directive of of the "-m" key. | |
ECR | ECR=OUI/NON[ NON ] OUI: Same meaning as the "-e" key. NON: Cancels the effect of a "ECR=OUI" directive or that of the "-e" key. | |
LIMITE | LIMITE = N [ -1 ] N > 0 Copy up to N number of records into the dstfile. N < 0 Copy unlimited number of records into the dstfile. Same as the "-c" key | |
VOIRD | VOIRD = OUI/NON [ NON ] OUI: Same meaning as the "-vd" key. NON: Cancels the effect of a "VOIRD=OUI" directive or of a "-vd" key. | |
VOIRS | VOIRS = OUI/NON [ NON ] OUI: Same meaning as the "-vs" key. NON: Cancels the effect of a "VOIRS=OUI" directive or of a "-vs" key. | |
FIXDATE | FIXDATE = OUI/NON [ NON ] OUI: Indicates that the date of the first record is valid for all the records in the srcfiles. NON: Indicates to check the date for each record in the srcfiles. | |
SAUVDES | SAUVDES = N [ O ]
Controls the validity of the directives DESIRE or EXCLURE after copy. | |
REWINDS | REWINDS(SFILE) [#]
REWINDS('SEQFILE') | |
STDCOPI | STDCOPI(SFILE,TYPS,DFILE,TYPD) [#, -1, -1, -1] STDCOPI('SX', 'RND', 'yyy', 'RND') STDCOPI('SY', 'SEQ') STDCOPI('SZ') NOTES:
b) The names and type of files don't change if: -they have an actual value of -1 -unspecified (argument list abbreviated) c)If the input file is sequential, the record search is done starting from its current position. d)If the output file is sequential, EDITFST writes to it from its current position. e)This command behaves correctly for editfst2000 from versions editfst_5.85 and up only. It is correct for editfst |
Nov 20th, 2002, by Vivian Lee