LQL COMMANDS: I. SELECT, UPDATE, COPY, SCREEN II. INIT, CLEAR, SHOW, LIST III. FILE, DUMP, SORT, DISPLAY, PAGE IV. START, RUN, EXIT V. WHERE I. Selection Commands: SELECT field-name[,field-name...] or * SELECTs the named Fields or all Fields for Retrieval of Data. * selects all Fields defined in the database. Database Field Names: USER_IDENT LAST_NAME FRST_NAME MIDDLE_INIT NAME_TITLE INSTITUTION MAIL_STOP STREET_ADR_1 STREET_ADR_2 CITY_NAME STATE COUNTRY ZIP_CODE AREA_CODE PHONE_NMBR SHORT_INSTITUTE TIME_ZONE NETWORK_ID NODE_ID REMOTE_USER DOMAIN_ID FAX_INFO OTHER_NET OTHER_NODE OTHER_USER OTHER_DOMAIN ACCESS_CONTROL COMMENTS LIFE_USAGE NOTIFY AUTO_INFO PRIM_WORK SEC_WORK PRIM_ACTIVITY SEC_ACTIVITY PRIN_EMPLOYER LOCATION DEPARTMENT UPDATE field-name="new-value" UPDATES the field-name with the new-value specified. The USER_IDENT field cannot be changed, see COPY. Multiple updates can be issued for the same WHERE clause, MAX=18. COPY new-user-id Allows for copy of a single database to a new record defined by the new-user-id parameter. Requires a WHERE clause defining the unique record to be copied. SCREEN Pre-Selects Fields for output in LLUD program format. Last_Name, First_Name, MIddle_Init, Institution, UserID. Even if additional fields are defined, the only output will be the indicated fields. II. Setup Commands: INIT Clears all Retrieval Settings. (Issues a CLEAR ALL) CLEAR ALL, SELECT, UPDATE, WHERE, SORT, DUMP, FILE Clears all Retrieval Settings, or only the setting specified. Only one setting may be specified at a time. You must issue one of the above setting types. SELECT and UPDATE are functionally identical. SHOW Shows the Current Retrieval Settings on the terminal Screen. LIST [script-file-name] Writes the Current Retrieval Settings to a script file. Default script file is: LOC_SCR:SCRIPT.FILE III. Output Commands: FILE output-file-name Writes the output of the retrieval to the named file. For UPDATE operations turns on journaling to write previous value of Fields to a DUMP style output file. This allows for recovery of the Database Entries. DUMP Modifies the FILE write format to use standard USRDB update format. This is a toggled command, reissuing the command changes it to the opposite state. SORT field-name[ .BL. "string"] If only field-name is specified, then the Retrieval will sort on that database indexed field. Only the 12 database indexed fields may be specified. The sort will be based upon all strings greater/equal a blank string. Sortable Fields: USER_IDENT LAST_NAME PRIM_WORK CITY_NAME STATE COUNTRY INSTITUTION ZIP_CODE AREA_CODE NETWORK_ID PRIM_ACTIVITY SEC_ACTIVITY PRIN_EMPLOYER Optionally a Boolean operator and a specific string may also be specified for the sort operation. The Boolean operators are as follows: .EQ., .GE., .GT., .LE., .LT. To specify a null string issued two double-quotes, "". Otherwise specify the string desired between double-quotes. No wild characters should be used. (* or %) Only one SORT field is allowed per RUN of the script. To limit the selection of database records further, utilize the WHERE statements. If no SORT is specified the LQL program will attempt to select a SORT criteria based upon the WHERE clauses defined. The WHERE clause must only contain the boolean operation .EQ. and the associated string must be of "string", "string*", or "string%%%" type. The following priorities are used in generating the SORT criteria should the above conditions be true. Sort Field Priorities: PRIM_WORK (1) PRIM_ACTIVITY (2) PRIN_EMPLOYER (3) SEC_ACTIVITY (4) CITY_NAME (5) ZIP_CODE (6) AREA_CODE (7) STATE (8) COUNTRY (9) NETWORK_ID (10) INSTITUTION (11) LAST_NAME (12) USER_IDENT (13) III. Output Commands: (Continued) DISPLAY Toggle switch, allows output to screen of data being written to a file. Used with the FILE and/or the DUMP commands. PAGE Screen output is stopped every 20+ lines of output. IV. Activation Commands: START [script-file-name] While in interactive mode, this command tells the program to begin the Retrieval of the data, and to write the data to the specified location (data file or screen). The command allows for an optional script-file to be used instead of issuing the commands at the prompt. If issued from within a script file it executes the commands entered up to that point. Should additional commands follow the START, the program clears the command buffer (INIT), and reads the next set of commands until the next START command or the End-Of-File is found. When in script mode, the START (or RUN) command cannot include the script-file-name. Inclusion of a script-file-name will cause the lose of the original script-file. RUN [script-file-name] Same as START. EXIT Exits program. V. Qualification Commands: WHERE CLAUSE COMMANDS: WHERE, AND, OR, EQV, NEQV, EOR, EEQV, ENEQ, FINISH The WHERE CLAUSE environment can be simple or difficult. The capability is available for both situations. WHERE field-name .BL. "string" Must begin all WHERE Clauses with this statement. The allowed Boolean operations (.BL.) are .EQ. and .NE. at present. (A possible future improvement will allow for .GE. and .LE. operations.) The string can be any following possible combinations: string exact match *string ending match (Functionally .LE.) string* beginning match (Functionally .GE.) %%%string exact field, like ending match string%%% exact field, like beginning match %%%string* exact location, beginning match *string%%% exact location, ending match. The * is a wild character for indicating any characters after this point. The % is a filler character for any character to fill the spot indicated in the string. To issue PARENTHETICAL WHERE clauses, reissue the WHERE command. The second and subsequent WHERE commands are evaluated as 'AND' unless previously evaluated with an EOR, EEQV, or ENEQ evaluation command. If you wish to issue .GE. or .LE. functions on a specific field and that field is key to the Retrieval, then issue a SORT on that field as well as the WHERE statement. AND field-name .BL. "string" For a previously issued WHERE statement this indicates the evaluation of the WHERE segment must be true for both the previous statement and the current statement. OR field-name .BL. "string" For a previously issued WHERE statement this indicates the evaluation of the WHERE segment can be true if either the previous statement and the current statement are true. EQV field-name .BL. "string" For a previously issued WHERE statement this indicates the evaluation of the WHERE segment can be true if either the previous statement and the current statement are both true or both false. V. Qualification Commands: (Continued) NEQV field-name .BL. "string" For a previously issued WHERE statement this indicates the evaluation of the WHERE segment can be true if one the statements is true and the other WHERE statement is false. EOR Tells program to evaluate the PARENTHETICAL functions using an OR function. If either function is true, then the result will be true. Not valid until after a second or subsequent WHERE command has been issued. It is issued prior to the third of subsequent WHERE command. EEQV Tells program to evaluate the PARENTHETICAL functions using an EQV function. if both functions are true or both functions are false, then the evaluation is true. ENEQ Tells program to evaluate the PARENTHETICAL functions using an NEQV function. if one functions is true and the other function is false, then the evaluation is true. FINISH Tells program that the WHERE statements have been completed. No further evaluations exist after this point. If not issued then it is assumed, and inserted into the stream. LQL EXAMPLES: UPDATE NETWORK_ID="AA" WHERE NETWORK_ID.EQ."AS" Above tells program to update the field NETWORK_ID where the field NETWORK_ID is already set to the value "AS". SELECT PRIM_WORK, LAST_NAME, FRST_NAME, etc... WHERE STATE .EQ. "LA" OR STATE .EQ. "TX" SORT STATE Above tells program to select designated fields WHERE the values for the STATE field are either "LA" or "TX". The SORT command is used to specify that the output should be in STATE order. ---------------- PARENTHETICAL WHEREs: (SIMPLE TWO LEVEL, NOT ORDER DEPENDENT) ((WHERE STATE .EQ. "TX") .AND. (PRIM_WORK .EQ. "P2*")) .OR. ((WHERE PRIM_WORK .EQ. "Q8*") .AND. (PRIN_EMPLOYER .EQ."SELF")) WHERE STATE .EQ. "TX" AND PRIM_WORK .EQ. "P2*" WHERE PRIM_WORK .EQ. "Q8*" AND PRIN_EMPLOYER .EQ. "SELF" EOR FINISH Will retrieve all records where the State is Texas and the PRIM_WORK is in the 200's, or where the primary work is in the 850-899 range with the individual being self employed.