USER'S MANUAL FOR THE BATCH QUERY LANGUAGE

Document Type: 
Document Number (FOIA) /ESDN (CREST): 
CIA-RDP78T04759A009600010081-3
Release Decision: 
RIPPUB
Original Classification: 
T
Document Page Count: 
75
Document Creation Date: 
December 28, 2016
Document Release Date: 
July 10, 2002
Sequence Number: 
81
Case Number: 
Publication Date: 
June 1, 1970
Content Type: 
REPORT
File: 
AttachmentSize
PDF icon CIA-RDP78T04759A009600010081-3.pdf2.1 MB
Body: 
Approved For Release 2002/08/12 : CIA-RDP78T04759A009600010081-3TOP SECRET NATIONAL PHOTOGRAPHIC INTERPRETATION CENTER USER'S MANUAL FOR THE BATCH QUERY LANGUAGE Declass Review by NIMA/DOD GROUP I EXCLUDED FROM AUTOMATIC DOWNGRADING Ap`0Pd?fed5Fibf1RF lease 2002/08/12 : CIA-RDP78TO4759AO09600010081-3 TOP SECRET JUNE 1970 COPY 1 71 PAGES 25X1 25X1 Approved For Release 2002/08/12 : CIA-RDP78TO4759AO09600010081-3 Approved For Release 2002/08/12 : CIA-RDP78TO4759AO09600010081-3 Approvo d For Relea O0ROR T IA-RDP78TO47 25X1 25X1 USER'S MANUAL FOR THE BATCH QUERY LANGUAGE 25X1 Approved For Releas 0 W/RTf IA-RDP78TO4759AO09600010081-3 Approved For ReleasIQBO:-E R.fl IA-RDP78T0475 ON-LINE EQUIPMENT . . . . . . . . . . . . . . . . THE INSTALLATIONS DATA FILE . . . . . . . . . . REPORT FORMAT TABLES . . . . . . . . . . . . . . ASSUMPTIONS . . . . . . . . . . . . . . . . . . . FILE STATEMENTS . . . . . . . . . . . . . . . . . OUTPUT STATEMENTS . . . . . . . . . . . . . . . . REPORT Statement . . . . . . . . . . . . . . UNIT Statement . . . . . . . . . . . . . . . FORM Statement . . . . . . . . . . . . . . . COUNT Statements . . . . . . . . . . . . . . 25X1 25X1 I- I- I- II- 1 II- II- II- II- II- .`' III- III- L 2 III- III- 8 In Relation to Two Different Figures . . . . . III-11 RECORD SELECTION BASED ON FIELD AND ITEM VALUES . III-12 WHEN Statement . . . . . . . . . . . . . . . . III-B OR Statement . . . . . . . . . . . . . . . . TIT-I,)- AND Statement . . . . . . . . . . . . . . . . III-16 USE Statement . . . . . . . . . . . . . . . . III -17 RECORD SELECTION BASED ON TARGET LOCATION . . . . In Relation to a Circle . . . . . . . . . . . In Relation to a Polygon . . . . . . . . . . In Relation to a Corridor . . . . . . . . . . 25X1 Approved For Releaj Oc p 1 ILIA-RDP78TO4759AO09600010081-3 Approv$ d For Rele-1--QUE1GR1 CIA-RDP78TO4 59AO0960001 081-3 25X1 25X1 TABLE OF CONTENTS (CONTINUED) COMPOUND RECORD SELECTION STATEMENTS . . . . . . TTI-IU RESTRICTIONS . . . . . . . . . . . . . . . . . . TIT-22 IDF Queries . . . . . . . . . . . . . . . . . TIT-22 Repeating Fields . . . . . . . . . . . . . . . TIT-P-) CHAPTER IV. SPECIAL-PURPOSE STATEMENTS . . . . . . . . . . . TV- -1 CNTL STATEMENT . . . . . . . . . . . . . . . . . TV- I PREFACE STATEMENT . . . . . . . . . . . . . . . TV- 2 CHAPTER V. GUIDELINES FOR CONSTRUCTING QUERIES FILE AND OUTPUT STATEMENTS . . . . . . . . . . . V- 2 RECORD SELECTION STATEMENTS . . . . . . . . . . . V- 2 SPECIAL-PURPOSE STATEMENTS . . . . . . . . . . . V- 3 PUNCTUATION AND SPACING . . . . . . . . . . . . . V- 4 CHAPTER VI. SUBMITTING QUERIES ON TELETYPEWRITERS AND DATA COMMUNICATIONS TERMINALS . . . . . . . VT- I TRANSMITTING QUERIES ON TELETYPEWRITERS . . . . . VT- 2 TRANSMITTING QUERIES ON PAPER TAPE . . . . . . . VT- 4 Punching Queries on Paper Tape . . . . . . . . VI- 4 Transmitting Queries Punched on Paper Tape . VI- 5 TRANSMITTING QUERIES ON A DCT 2000 . . . . . . . VT- 6 25X1 Approved For Reepe 8fCjW1P : CIA-RDP78TO4759AO09600010081-3 Approved For Releas0S?ET TABLE OF CONTENTS (CONTINUED) A009600010 $1 3 APPENDIX A. GLOSSARY OF TERMS FOR THE BATCH QUERY LANGUAGE . . . . . . . . . . . . . . . . . . . . A- 1 APPENDIX B. BINARY REPRESENTATION OF DATA (BINTP) AND DATA RECORDED FOR CABLE TRANSMISSION (CABLE) . . B- 1 DEFINITIONS . . . . . . . . . . . . . . . . . . B- I SYMBOLS . . . . . . . . . . . . . . . . . . . . . B- 2 REEL FORMAT . . . . . . . . . . . . . . . . . . B- 3 HEADER LABEL BLOCK . . . . . . . . . . . . . . . B- 4 DATA BLOCKS . . . . . . . . . . . . . . . . . . B- 8 TRAILER LABEL BLOCK . . . . . . . . . . . . . . B- 9 EXTERNAL FILE LABELS . . . . . . . . . . . . . . B-ll APPENDIX C. SETUP INSTRUCTIONS FOR DOCUMENTS PRODUCED BY THE BATCH QUERY LANGUAGE . . . . . . . . . . C- 1 25X1 25X1 25X1 Approved For ReleasygpO2jEI'1fTTIA-RDP78T04759A009600010081-3 25X1 Approveq For ReIeIP20%wfil 59AO0960001 081-3 25X1 25X1 Whenever necessary, revisions and/or addenda to this manual will be issued by the Automated Information Division, Production Services Group. If you need additional information on the Batch Query Language or assist- ance in using it, contact the Chief, Information Systems Branch, AID. Approved For Re1dMf 2SRjk j2 : CIA-RDP78TO4759AO09600010081-3 25X1 Approv ed For Re1eT@f2&W" The Batch Query Language (BQL) is an English-like language that enables you to retrieve information from the Installations Data File (IDF). This language enables you to * select from the IDF one or more records that meet your specifica- tions and print all or part of each selected record * determine how many records meet your specifications * determine how many different values are recorded in a given field or item in each record that meets your specifications * record data retrieved from the IDF on magnetic tape The language can also be used to obtain information from so-called private files set up by other users to meet a particular need.* Using the Batch Query Language, you will formulate a series of statements, that is, a query that will direct the computer to perform the operations listed above. Most of the words that will comprise each statement are mnemonics. The rest are English words. The mnemonics specify computer operations, identify certain entities in the IDF, and express relations between grammatical units in statements. * Such files will be established according to the standards of the Integrated Information System. 25X1 25X1 Approved For ReIe,t2I M1 1: CIA-RDP78TO4759AO09600010081-3 Approved b or Releasf W2S(KRETC A-RDP78T04759 Four types of statements can be constructed, and some -- but not all -- are used in every query. In the order in which they must appear in a query, the four types and the functions of each are listed below. Type of Statement Functions File statement Specifies file to which query is directed Output statement Specifies whether output is a listing, total number of selected records, or total number of different values from selected records; also specifies data to be output & format of that data, equipment to be used, & type of paper needed for printouts Special-purpose Inserts such data as labels, statement TCS numbers, headings, etc., in output Record selection Specifies basis for selection of statement records Each query must consist of at least one file and one output statement. If the query is directed to the IDF, it must also contain at least one record selection statement. Regardless of the number of statements in any given query, all will be submitted to the UNIVAC 491+ computer sys- tem in the same transmission. When using the Batch Query Language, you will usually transmit queries to the UNIVAC 494 computer system via on-line teletypewriters or card readers located in your work area. This equipment includes * ASR and KSR Teletypes (Model 35) Kleinschmidt Electronic Data Printers (Model 311), send-and- receive units UNIVAC Data Communications Termi- nals (DCT 2000) 25X1 25X1 25X1 Approved For Releas4~?Q2~Q$d fA-RDP78TO4759AO09600010081-3 25X1 Approve d For ReleaT?F0gEeM. You can elect to receive your output on any of the following devices: * ASR and KSR Teletypes * Kleinschmidt Electronic Data Printers, send-and-receive units and receive-only units high-speed printers located in the computer room You also have the option of recording your output on magnetic tape. If you direct the computer to record data on magnetic tape, your output will automatically be transmitted to the computer room. THE INSTALLATIONS DATA FILE The Installations Data File (IDF) contains information derived from imagery and compiled by organizations responsible for imagery interpreta- tion. This information concerns targets that have been designated by NPIC or COMIREX. The file is an outgrowth of the Target Brief File and of DIA's Uniform Photo Interpretation Reports (UPIR) File. In the IDF all infor- mation on a single target is stored in one record. At present there are about 30,000 records in this file. Each is identified by a machine refer- ence number (MRN). This number is assigned to each record by the computer and will never be changed or assigned to another record. With the exception of MRN 1, the format -- not the contents -- of each record in the IDF is identical. Mission highlights for first- and second-phase reports are re- corded in MRN 1; no other information is stored in this record. A record consists of lk sectors, each of which contains a specific type of information about an installation. All sectors are divided into fields, and all fields consist of one or more items. Thus, the format of each record is the following: largest unit sector field smallest unit item Fields may be non-repeating and repeating. (See APPENDIX A.) Approved For Relelu 2l of 25X1, 25X1 Approve p For Re1ea'fflR0ffQ1RE;r: All sectors, fields, and items are identified by mnemonics. For example, each record contains a sector identified by the mnemonic, IBRIE. In the IBRIE sector a brief third-phase report is stored in a field iden- tified by the mnemonic, BRIT. One of the items comprising this field is DATE, which contains the date of a particular third-phase report. Mnemo- nics such as these comprise part of the vocabulary of the Batch Query Language. All mnemonics pertaining to the IDF and the formats of related values are presented in the Format and Mnemonics for Records in the Installations Data File. REPORT FORMAT TABLES You will be concerned with report format tables whenever you con- struct output statements introduced by the word, REPORT. A REPORT state- ment always includes the mnemonic for such a table. A report format table is a set of instructions that directs the computer to output data in a specific format. The data can be output in printed form or be recorded on magnetic tape. The tables you will probably use most frequently output data in a relatively simple, predetermined format. Each outputs data from one of the 14 sectors in an IDF record or from the IHIGH sector in MRN 1. Each indicates the following to the computer: 1) which sector, fields, and/or items from each selected record are to be output and 2) the format (typography) to be used in presenting this output; e.g., titles, pagination, spacing, proper arrangement of tabular material, and so on Each report format table is identified by the mnemonic of the sector it outputs. Report format tables that will arrange selected records in some other sequence and/or output them in some other format can also be designed. Tables of this kind will be designed and generated as you need them. Each will also be identified by a mnemonic. All report format tables are produced and stored in the computer by the Presentation Language Program.* eSe the User's Manual for Report Formatting. 25X1 25X1 25X1 Approved For Relear POp2JORI-l f :I CIA-RDP78T04759A009600010081-3 1ECIR d For ReleU 2 G Ei t 8A00960001 If the tables currently available do not meet your needs, you may wish to design a new table. For assistance in this matter contact the Chief, Information Systems Branch, AID. To use the Batch Query Language effectively and with some degree of proficiency, it is assumed that you * are familiar with the IDF, its structure, contents, and nomen- clature * know how to operate a teletypewriter or a DCT 2000 * are familiar with the remote access computer service now being used in * See Introduction to the Remote Access Computer Service published by AID. Copies are available from AID upon request. 25X1 25X1, Approved For Relea 0SR8RI r ILIA-RDP78TO4759AO09600010081-3 Approv ed For ReleTOR0MORP' 25X1 25X1 CHAPTER II. FILE AND OUTPUT STATEMENTS A file statement directs the computer to the file containing the information you need. This statement is always the first to appear in each query and is constructed in this manner: [ File-]. FOR FILE nemoni ; For example: FOR FILE IDF; To direct your query to a private file recorded on magnetic tape, con- struct a file statement in this manner: File FOR FILE jMnemonic, T; If a private file is stored on a magnetic drum, use this format: [File FOR FILE Mnemoni]c s9 25X1 Approved For Relea" %T& I ICIA-RDP78TO4759AO09600010081-3 Approv id For ReIeIP26( 1T2 There are four types of output statements: REPORT, COUNT, UNIT, and FORM. At least one of these must appear in each query. In most queries you will probably use only a REPORT or COUNT statement. Output state- ments always follow a file statement. REPORT Statements A REPORT statement indicates the following to the computer: what data from each selected record is to be output and the format of that out- put; this is indicated by the mnemonic of a report format table (EFT) on what device this data is to be out- put -- in your work area or in the com- puter room; this is indicated by a logical equipment number (LEN) To have a single copy of your output printed in your work area, construct a REPORT statement in this manner: RFT REPORT [Mnemonic ON [LEN] The LEN to be specified is that of the teletypewriter or DCT 2000 to which you want your output sent. To have your output transmitted to a high- speed printer in the computer room, always specify LEN 600. For example: FOR FILE IDF; REPORT IHEAD ON 600; Output transmitted to teletypewriters is printed on paper that will accommodate 72 characters per line and is 5.5 inches long. It is always printed at six lines per inch. Output transmitted to DCTs and high- speed printers is also printed at six lines per inch. However, the paper is 14+ inches wide, 11 inches long, and can accommodate 132 characters per line. 25X1 25X1 25X1 Approved For ReIeWrO ffeff f I: CIA-RDP78TO4759AO09600010081-3 25X1 Appro ied For Re1e2g&,T2 59A0096000 I 25X1 25X1 Close a REPORT statement with a semicolon unless it is the last in your query. If it is the last, close it with a period. If you elect to have your answer printed at eight lines per inch or to have it printed on paper other than that described above, your REPORT statement will always be supplemented by a FORM statement and/or a UNIT statement. Both are described on the following pages. If you want your output recorded on magnetic tape, omit the "ON LEN" portion of the REPORT statement. For example: FOR FILE IDF; REPORT IHEAD; UNIT MAGTP,CABLE; This query directs the computer to record the IHEAD sector of each IDF record on magnetic tape. UNIT Statement A UNIT statement should be used to indicate to the computer that one copy of your answer is to be printed at eight rather than six lines per inch or that your answer is to be recorded on magnetic tape. In the first case, LEN 600 must also be specified in the preceding REPORT statement. In the second case, your output will automatically be transmitted to the computer room. If used, a UNIT statement follows a REPORT statement. For one copy of your answer at eight lines per inch, the format of a UNIT statement is this: UNIT RMTL,8 Approved For Releas 2?e& Ef 25X1 Approv 81-3 ~d For Relealb0$ 8RET FOR FILE IDF; REPORT INOTE ON 600; UNIT RMTL,8; This query directs the computer to 1) transmit the INOTE sector of each IDF record to a high-speed printer in the computer room; 2) and print one copy of that data at eight lines per inch. To direct the computer to record your output on magnetic tape use one of the appropriate UNIT statements listed below. Do not specify a LEN in your REPORT statement. For example: For subsequent conversion to paper tape for trans- UNIT MAGTP,CABLE mission via cable (APPENDIX B) For binary representation UNIT MAGTP,BINTP of data (APPENDIX B) For Fieldata representa- UNIT MAGTP,BCDTP tion of data FOR FILE IDF; REPORT IHEAD; UNIT MAGTP,BINTP Approved For Releaf0pO"VRf: 25X1 25X1 25X1 Approv$ d For Relea-W0SMRIT 009600010 81-3 I 25X1 25X1 FOR FILE IDF; REPORT IOBJE; UNIT MAGTP,CABLE. Close a UNIT statement with a semicolon unless it is the last in your query. If it is the last, close it with a period. FORM Statement A FORM statement is used whenever you want copies of your output printed on one of the types of paper listed below. Your output must be transmitted to the computer room (LEN 600). If used, a FORM statement is placed immediately after a UNIT statement or after a REPORT statement if a UNIT statement is not used. In the table the letter b indicates a blank character position. Code for Type of I Paper (5 Chars) Width (Inches) Ho rizontal Character I Positions Length (Inches) 116bb 11 110 8.5 1468b 14 132 8.5 1471b 14 132 9.0 MATLb lb 132 14.o MATLL 9 90 15.0 MATSb 14 132 10.0 MATXL 14 132 16.0 TTYLG -- 72 11.0 To direct the computer to print your output on one of the types of paper listed above, construct a FORM statement in this manner: FORM Caper Cod] 25X1 Approved For ReleasT6r~R : A-RDP78T04759A009600010081-3 25X1 Appro% ed For Rel"p 2gf f1RT2 25X1 25X1 For example: FOR FILE IDF; REPORT INOTE ON 600; FORM 116 ; This query directs the computer to 1) transmit the INOTE sector of each record in the IDF to a high-speed printer in the computer room; 2) and print one copy of that data, six lines per inch, on paper identified by the code, 116. 0081-3 Five character positions must be allotted for each paper code; allow blanks for unused positions. A FORM statement can also be used to indicate that you want up to and including four copies (an original and three) of your output printed on one of the types of paper listed above. In this case, the format of a FORM statement is this: No. o FORM Caper Cod] S~opie Approved For Releas?drI> /: 25X1 Approved For Relea bOSSS 25X1 25X1 For example: FOR FILE IDF; REPORT INOTE ON 600; FORM MATXL,2; This query directs the computer to 1) transmit the INOTE sector of each record in the IDF to a high-speed printer in the computer room; 2) and print two copies of this data, six lines per inch, on paper iden- tified by the code, MATXL. To have your output printed at eight lines per inch include a UNIT state- ment in your query. For example: FOR FILE IDF; REPORT INOTE ON 600; UNIT RMTL,8; FORM MATXL,2; Close a FORM statement with a semicolon unless it is the last in your query. If it is the last, close it with a period. 25X1 -La CIA-RDP78T04759A009600010081-3 Approved For 09R Approve d For Relea5N0W9RU I CIA-RDP78TO47 25X1 25X1 COUNT Statements You may use a COUNT statement instead of a REPORT statement whenever you want the computer to (1) total the number of records that meet all your specifications, or (2) total the number of different values in a given field or item in records that meet all your specifications Thus, the answer to a query that contains a COUNT statement will always be a single number rather than textual material. Answers can be transmitted to any of the devices listed in CHAPTER I. However, it will usually be more convenient to specify the LEN of an on-line teletypewriter in your work area. To direct the computer to total the number of selected records that meet your specifications, construct a COUNT statement this way: COUNT RECORDS ON LEN To direct the computer to total the number of different values in any given field or item in each selected record, specify the phrase, COUNT VALUES FOR, the mnemonic of the sector in which the field or item is located, and then either the mnemonic for the field or the mnemonic for the field and the item in which you are interested. Sector Field COUNT VALUES FOR emoni., emonic ON LEN 25X1 Approved For Reif 4S '1I : CIA-RDP78TO4759AO09600010081-3 Approved For ReIejaP205ER6 Sector i] , +2n Field Item FOR [M nemonemon' , emon COUNT VALUES j ON LEN For example: FOR FILE IDF; COUNT RECORDS ON 621; This query directs the computer to total the number of records you want selected from the IDF and print that total on LEN 621. FOR FILE IDF; COUNT VALUES FOR IDETE,DET:,AGEN ON 621; This query directs the computer to total the number of different agencies that produced basic third-phase re- ports on selected IDF targets and to print the total on LEN 621. If your query is directed to the IDF, a COUNT statement must always be used with one or more record selection statements. In any given query only one COUNT statement can be specified. Approved For ReIcp2ggt1 J : CIA-RDP78TO4759AO09600010081-3 II 25X1 25X1 25X1 25X1 Appro ed For ReITOR Q"M 25X1 25X1 CHAPTER III. RECORD SELECTION STATEMENTS Record selection statements indicate to the computer which records you want selected from the file specified in your FOR FILE statement. You can specify that records be selected on any one of the following bases: the location of targets with respect to a circle, polygon, or corridor on the surface of the earth; this per- tains only to the IDF; (2) or the values recorded in given fields and/or items in each record; (3) or a combination of (1) and (2). You must include at least one record selection statement in each query directed to the IDF. By including one or more of these statements in each query, you are in effect listing the conditions upon which records are to be selected. The maximum number of conditions you can include in a single query is twenty. Record selection statements are discussed in the order in which they must appear in a query. (1) RECORD SELECTION BASED ON TARGET LOCATION Statements that direct the computer to select records on the basis of the location of one or more targets are always introduced by the words, WITHIN or EXCEPT. WITHIN statements refer to targets located inside a given area; EXCEPT statements, to targets located outside a given area. The areas you select must not include the north or south pole. When defining areas for the computer, measure latitudes north and south from the equator and longitudes east and west from Greenwich Meri- dian. Approved For Releas,6 19 25X1 Approve d For ReleaTo lb 2r A009600010 81-3 25X1 25X1 The use of WITHIN and EXCEPT statements is optional and will depend entirely upon the sort of information you need. If used, a WITHIN state- ment is always the first record selection statement to appear in a query. An EXCEPT statement (if any) must follow a WITHIN statement. In Relation to a Circle You may direct the computer to select records on installations on the basis of their location with respect to one or two circles on the surface of the earth. To define a circle (1) express the latitude and longitude of the center in degrees, minutes, seconds, and direction; if minutes and/or seconds are unknown, insert zeros in the unused positions; (2) express the radius of the circle in tenths of a nautical mile (nm); the radius must not exceed 999.9 nm. 25X1 Approved For ReleaTopOtT a:ICIA-RDP78T04759A009600010081-3 Approved For ReleatbfPl CIK 0960001 81-3 25X1 25X1 Given these values, the computer will select records for only those targets located * inside one circle but outside a second circle For the first option the format of your record selection statement will be this: Latitude WITHIN CIRCLE of Center Longitude of Center RADIUS Radius Value Where applicable, use leading zeros with latitude and longitude values; separate latitude and longitude with a slash. There must be a single space between degrees and minutes, minutes and seconds, and seconds and direction. For example: FOR FILE IDF; REPORT IHEAD ON 600; WITHIN CIRCLE 20 00 00 N/040 00 00 E RADIUS 2000. This query directs the computer to 1) select IDF records on all targets located inside a circle having a radius of 200.0 nm and centered at the coordinates cited above; 2) print the IHEAD sector of each selected record on LEN 600 (in the computer room). Note that the decimal point is not expressed in the nautical mile value. 25X1 Approved For RelealsQP24i1+9RA2 :I CIA-RDP78T04759A009600010081-3 Approvo d For ReleaEOF0 R' : 25X1 25X1 To direct the computer to select records on targets located inside one circle but outside a second circle, define each figure according to the instructions given above. The circles may or may not be concentric. The record selection statement defining the second circle will always be intro- duced by the word, EXCEPT. The format for this option is this: For example: La_611 uae oz Long1Luae oI Center 1 IA_Center 1 RADIUS Re Latitude o1/1 ongitude of Center 2 Center 2 FOR FILE IDF; REPORT IHEAD ON 600; WITHIN CIRCLE 20 00 00 N/040 00 00 E RADIUS 2005; EXCEPT CIRCLE 21 00 00 N/?39 00 00 E RADIUS 100. This query directs the computer to 1) select from the IDF records on all targets located inside the circle (radius - 200.5 nin) defined in the WITHIN statement but outside the circle (radius - 10.0 nm) defined in the EXCEPT statement; 2) then print the IHEAD sector of each selected record on LEN 600. Punctuation, spacing, and the conventions to be observed in expressing latitude and longitude values remain the same. 25X1 Approved For Rele 2C fflf l: CIA-RDP78TO4759AO09600010081-3 ed For ReIe 2 REI'1 59AO096000 0081-3 25X1 25X1 In Relation to a Polygon The computer can select records on installations on the basis of their location with respect to one or two polygons on the surface of the earth. Each side of this figure will be a line of constant direction or, if you prefer, a rhumb line. The polygon to be defined must not have more than eight sides. No included angle may be greater than 180 degrees. To define a polygon express the geocoordinates of each vertex in degrees, minutes, seconds, and direction; if minutes and/or seconds are unknown, insert zeros in unused positions 25X1 Approved For Rele R2/~92/ ff :I CIA-RDP78TO4759AO09600010081-3 Appro bed For Relea Op00 (ET: Given these values, the computer can select records on those targets located * inside one polygon or * inside one polygon but outside a second polygon For the first option the format of your record selection statement will be this: WITHIN POLYGON [ocoordinates of Vertex 1, Geocoordinates of Vertex 2, Geocoordinates of Last Vertex For example: FOR FILE IDF; REPORT ILOCA ON 600; WITHIN POLYGON 00 00 00 N/020 00 00 E, 20 00 00 N/020 00 00 E, 20 00 00 N/040 00 00 E, 00 00 00 N/0140 00 00 E. This query directs the computer to 1) select all IDF records on targets located inside the four-sided polygon defined above; 2) then print the ILOCA sector of each selected record on LEN 600. Where applicable, use leading zeros with latitude and longitude values; separate latitude and longitude with a slash. There must be a single space between degrees and minutes, minutes and seconds, and seconds and direction. 2X1 25X1 Approved For Relea OQ ge'I ; rIARDP78T04759A00960001 0081-3 Approv id For ReleasIQMOIRTCi I 25X1 25X1 To direct the computer to select records on targets located inside one polygon but outside a second polygon, define both figures according to the instructions given above. The record selection statement defining the second polygon will be introduced by the word, EXCEPT. For example: FOR FILE IDF; REPORT IHEAD ON 600; WITHIN POLYGON 15 00 00 N/019 00 00 E, 18 00 00 N/021 00 00 E, 16 00 00 N/022 00 00 E; EXCEPT POLYGON 17 00 00 N/O20 00 00 E, 17 30 00 N/021 30 00 E, 15 30 00 N/019 45 00 E, 16 00 00 N/020 00 00 E. This query directs the computer to 1) select from the IDF records on all targets located inside the triangle defined in the WITHIN statement but outside the quadrilateral defined in the EXCEPT statement; 2) then print the IHEAD sector of each selected record on LEN 600. 25X1 Approved For ReleascrW'&:'JIA-RDP78T04759A009600010081-3 Approve In Relation to a Corridor d For ReleaIOP0 tCRUT: The computer can select records on targets located inside a corridor on the surface of the earth. The center axis of the corridor will be a line of constant direction, i.e., a rhumb line. To define a corridor (1) express the geocoordinates of both end points of the center line in degrees, minutes, seconds, and direction; if minutes and/or seconds are unknown, insert zeros in the unused positions; (2) express the entire width of the corridor in tenths of a nautical mile; the width must not exceed 999.9 nm. 25X1 25X1 25X1 Approved For Relqff2s I: CIA-RDP78TO4759AO09600010081-3 Approve d For ReleTORC&tfil CIA-RDP78T04759 00960001 j081-3 Given these values, the computer will select records on those targets located inside the corridor you have defined. To express these values in a record selection statement, use this format: Latitude of Longitude _o _j WITHIN CORRIDOR gnd Point 1 / EEnd Point i , atitude o Longitude o End Point f2 / End Point 2 Total Width 0_f Corridor. Note that no comma is placed after the longitude of end point 2. For example: FOR FILE IDF; COUNT RECORDS ON 621; WITHIN CORRIDOR 21 07 05 N/091 25 10 E, 35 00 00 N/095 00 00 E WIDTH 600. This query directs the computer to 1) count all IDF records on targets located inside a corridor 60 nm wide, extending between the coordi- nates cited above; 2) and then print the total number of records on LEN 621. Where applicable, use leading zeros with latitude and longitude values. Separate latitude and longitude with a slash. There must be a single space between degrees and minutes, minutes and seconds, and seconds and direction. A few words about the arrangement of records when a query contains a record selection statement introduced by WITHIN CORRIDOR. If you specified the mnemonic of an IDF sector in your REPORT statement, the computer will arrange records on targets inside the corridor in the sequence shown below, that is, from the west end to the east end. If the corridor is oriented in a north-south direction, records on targets inside the corridor will be arranged in a sequence that begins at the 25X1 25X1 Approved For Releas"0&E?jET~IA-RDP78T04759A009600010081-3 25X1 Appro ied For ReleaIOf5T first end point defined in your WITHIN statement. If you specify a report format table that contains a so-called sort instruction, the selected records will be arranged according to the instructions in the specified table, not in the sequence shown below. In each corridor targets are marked in the order in which their respective records will be arranged, i.e., 1 through 7 and 8 through 13. Approved For ReIeapOR?WE : 25X1 25X1 Appro4 ed For Relel&AHAE1~2 o 25X1 25X1 In Relation to Two Different Figures Using WITHIN and EXCEPT statements, yon can direct the computer to select records on targets located # inside one circle but outside one polygon * inside one polygon but outside one circle inside one corridor but outside one circle inside one corridor but outside one polygon The general format for each statement is this: CIRCLE, POLYGON WITHIN L or CORRIDOR For example: [efinition of Figure; rOLYGON oii EXCEPT CIRCLE I 1efinition of Figure. FOR FILE IDF; COUNT RECORDS ON 1010; WITHIN CORRIDOR 21 07 05 N/091 25 10 E, 35 00 00 N/095 00 00 E WIDTH 500; EXCEPT CIRCLE 27 00 00 N/093 00 00 E RADIUS 100. This query directs the computer to total the number of installations located 1) inside a corridor 50 nm wide and extending between the coordinates cited above, and 2) outside a circle centered at the coordi- nates cited above and having a radius of 10 nm; then print this total on LEN 100. 25X1 Approved For Rele OF"VT I: CIA-RDP78TO4759AO09600010081-3 Approve For Releal bOSE f 2T I 25X1 25X1 RECORD SELECTION BASED ON FIELD AND ITEM VALUES You may also direct the computer to select records from the IDF on the basis of the values (contents) you specify for one or more fields and/ or for one or more items in each record. Statements that direct the computer to select records on this basis are introduced by the words WHEN, OR, or AND. Each of these statements consists of three parts listed below. The identification of the field and/or item in which you are interested. A field is identified by its mnemonic and the mnemonic of the sector in which it is located. An item is identified by its mnemonic and the mnemonics for the sector and field in which it is located. The relation between the value you specify and the value actually recorded in the field and/or item of each record to be selected. This relation is expressed by one of these mnemonics: EQ - equal to GR - greater than NL - not less than, i.e., greater than or equal to NE - not equal to NG - not greater than, i.e., less than or equal to LS - less than The value you specify. This value can pertain to targets (e.g., BE numbers) or to the records themselves (e.g., mission number, date of information). You can specify * a single value * a range of values Approved For Retfe SRW~ : CIA-RDP78T04759A009600010081-3 I 25X1 25X1 i Approved ~ or ReIeei 2[112 . CIA-RDP78T047 9A0096000 * several alternative values, any one of which can be used as the basis for the selection of records A range of values will consist of the first and last values or the lowest and highest, whichever is appro- priate. Expressing a range indicates (to the com- puter) that you need those records that contain one or more values within the specified range, including the first and last values. Separate the two with a slash. For example: 2555/3555 Alternative values are expressed in this manner: 2500,3000,3500,4000 They are separated only by commas. Although expressed in one statement, each alternative value must be considered as one of the twenty conditions that can be included in a single query. The first time you specify the value for a field in any record selection statement this construction must be used: CHEN, ORI or AND eld SectorField ~Falue _ emonic Mnemonic Relation Value Then, in your next record selection statement you may specify additional values for a field in the same sector without repeating the sector mnemonic. The first time you specify the value for an item in any record selection statement the format of that statement will be this: WHEN, OR or AND Sector Mnemoni 'Field nemoniC, Item IItem emonic Relation Value Then, in your next record selection statement you may specify additional values for items in the same field and sector without repeating the field and sector mnemonics. However, this procedure for identifying succeeding fields and items is optional. You may find it easier and more convenient Approved For Releas0S 8RET I 25X1 25X1 25X1 Approved For ReleasTQj JT4 25X1 25X1 to specify the mnemonics for sector and field or the mnemonics for sector, field, and item in each statement. If a record does not meet all conditions specified in your record selection statements, it will not be selected from the file. The mnemonics you specify for sectors, fields, and items in the IDF and the formats of their respective values are listed in Format and Mnemonics for Records in the Installations Data File. WHEN Statement A WHEN statement will be the first record selection statement to appear in your query unless you use a WITHIN statement. Both cannot be used in the same query. To specify the value for a particular field determine the format of the value and the mnemonics for the appropriate sector and field. Then specify sector and field mnemonics, relation mnemonic, and value in that order. For example: FOR FILE IDF; REPORT IOBJE ON 600; WHEN IHEAD,COUN EQ UR. This query directs the computer to 1) select IDF records on all tar- gets in the USSR and 2) then print the IOBJE sector of each on LEN 600 (in the com- puter room). FOR FILE IDF; REPORT IOBJE ON 312; WHEN IHEAD,MRN$ 2120/213. This query directs the computer to 1) select an IDF record or records identified by MEN 2120-2130, inclusive; 2) then print the IOBJE sector of each selected record on LEN 321. Approved For RelMp 2f ftfff 25X1 Approv4 d For Relea OS?1 T b81-3 25X1 25X1 Values for items in a particular field are specified in exactly the same manner, except that your statement must include the appropriate item mnemonic. For example: FOR FILE IDF; REPORT IBRIE ON 321; WHEN IBRIE,BRI:,DATE EQ 701111. This query directs the computer to 1) select records on all targets described in brief third-phase reports dated 11 November 1970; 2) and print the IBRIE sector of each selected record on LEN 321. Note the punctuation and spacing that must be observed in the examples cited above. Close the statement with a period if it is the last in your query. If it is not, close it with a semicolon. OR Statement An OR statement expresses an alternative to the conditions given in preceding and/or succeeding record selection statements. Thus, WHEN condition A OR condition B OR condition C means that the computer will select records on the basis of condition A or condition B or condition C. Because of its function, an OR statement will never be the first record selection statement to appear in a query. The format of an OR statement is identical to that of a WHEN statement. 25X1 Approved For ReleyfPWfMpf I CIA-RDP78TO4759AO09600010081-3 Approve For Releas0M?fET 1-3 25X1 25X1 For example: FOR FILE IDF; COUNT RECORDS ON 012; WHEN IHEAD,COUN EQ VN,KN,KS; OR COUN EQ CH; OR CAT$ 80000/82000. This query directs the computer to count the records on all targets 1) located in N. Vietnam, N. Korea, or S. Korea; 2) or located in China; 3) or assigned an IDHS category code from 80000-82000, inclusive; 4+) then print the total number of records on LEN 012. In this example alternative values are expressed for the COUN field and a range of values, for the CAT$ field. Note that it was unnecessary to repeat the sector mnemonic, IHEAD, in each OR statement because the COUN and CAT$ fields are located in this sector, the last to be specified in a preceding record selection statement. AND Statement If used in a query, an AND statement is treated (by the computer) as part of each preceding record selection statement. Only one AND state- ment can be used in a query, and with the exception of a USE statement, it will be the last explicit record selection statement to appear in a query. Thus, WHEN condition A OR condition B AND condition C means that records will be selected on the basis of conditions A and C or on the basis of conditions B and C. 25X1 Approved For ReleapPOS tRl~-:ICIA-RDP78T04759A009600010081-3 Approve d For Releaa?ROf,{: I 25X1 25X1 The format of an AND statement is identical to that of WHEN and OR statements. For example: FOR FILE IDF; REPORT IREAD ON V30; WHEN IHEAD,DELE EQ Y; OR ILOCA,ELEV GE 2500; AND IHEAD,COUN EQ CU. This query directs the computer to print on LEN 030 the IREAD sector of each selected record on targets 1) appearing in annotated photos and located in Cuba; or 2) located more than 2,500 feet above mean sea level and located in Cuba. In the AND statement note that it was necessary to repeat the sector mnemonic, IHEAD. Although this mnemonic had been specified in a pre- ceding statement, it was not the last to be specified. USE Statement Unlike the other types of record selection statements discussed so far, a USE statement directs the computer to select records from an entire file on the basis of a value or values recorded in the first selected record. A USE statement directs the computer to select the first record that satisfies all conditions specified in your record selection statements; use the field or item mnemonic specified in the USE statement and determine the contents actually recorded in that field or item in the first selected record * then search the entire file and select all other records having the same value(s) in the same field or item 25X1 Approved For ReleasT6r~RI&19A-RDP78TO4759AO09600010081-3 Approv ~d For Releal 0 KRET- tA009600010 81-3 I 25X1 25X1 A USE statement consists of only the necessary sector, field, and/or item mnemonics but no values. Do not specify a repeating field. The statement is constructed in this manner: ector EField Item USE emoni Mnemon' emoni CSectorl rField USE Mnemonic Mnemonic. For example: FOR FILE IDF; REPORT IHEAD ON 600; WHEN IHEAD,MRN$ EQ 975; USE ILOCA,ELEV. This query directs the computer to 1) select the IDF record identified by MRN 975; 2) determine the value recorded in the ELEV field (in the ILOCA sector) of that record; 3) select all other IDF records having the same value in the same field; I) and then print the IHEAD sector of each selected record on LEN 600. In other words, this query directs the computer to print the IHEAD sectors of all IDF records on targets located at the same elevation as the target de- noted by MEN 975. If you elect to include a USE statement in your query, it will be the last statement in the Query, not just the last record selection state- ment. 25X1 Approved For Rel"f2g 1R1TJ : CIA-RDP78T04759A009600010081-3 Approved For Releasc0SET COMPOUND RECORD SELECTION STATEMENTS 9AO0960001 Except for USE statements, the other types of record selection state- ments can be used to construct a compound statement. A compound statement is introduced by a WHEN, OR, AND, or a WITHIN-EXCEPT statement followed by one or more statements that specify other conditions. Each succeeding statement is identical to an AND statement except that the word, AND, is implied. Each condition in a compound statement must be satisfied before a record or records can be selected from the file. Thus, this represents a compound statement: WHEN condition A condition B condition C It directs the computer to select all records that satisfy conditions A and B and C. Records that do not meet all three conditions will not be selected from the file. In each compound statement all statements except the first are always indented five or more spaces from the left margin. A single query can include more than one compound statement: WHEN condition A 1 1 condition B OR condition C 7 2 condition D In this case records will be selected only if they satisfy conditions A and B or conditions C and D. An AND statement can also introduce a compound statement. Although its construction is identical to that of other compound statements, this kind of compound statement actually becomes part of each preceding state- ment -- simple and/or compound. 25X1 25X1 25X1 Approved For Releas"osfevtTICIA-RDP78T04759A009600010081-3 Approve d For ReleaTQfr0/af'ff~ 25X1 25X1 OR condition B condition C condition D AND condition E condition F These statements direct the computer to select records that satisfy condi- tions A and E and F or BandCandDandEandF For example: FOR FILE IDF; REPORT IHEAD ON 012; WHEN IHEAD,COUN EQ VN,KN,KS; CAT$ EQ 80110; OR IHEAD,COUN EQ CH,UR; CAT$ 70000/72000; AND IPHOT,PHO:,DATE GR 700115; This query directs the computer to print on LEN 012 the IHEAD sector from each selected IDF record and to select records on the basis of one of two alternative sets of conditions: 1) targets located in N. Vietnam, N. Korea, or S. Korea; and assigned IDHS category code 80110; and observed on photography dated later than 15 January 1970; and appearing in ground photos; or 2) targets located in China or the USSR; and assigned an IDHS category code from 70000 through 72000, inclusive and observed on photography dated later than 15 January 1970; and appearing in ground photos. 25X1 Approved For Rel Q( if : CIA-RDP78TO4759AO09600010081-3 Approved IF or ReleaseTOb2 A-RDP78T04759A 25X1 25X1 A compound statement can also consist of a WITHIN statement and an EXCEPT statement (if used) followed by one or more statements that specify other conditions. Thus, these statements represent a compound statement: WITHIN figure 1 EXCEPT figure 2 condition A condition B This compound statement directs the computer to select records on all targets located inside figure 1 and outside figure 2 provided those records also satisfy conditions A and B. For example: FOR FILE IDF; COUNT RECORDS ON 105; WITHIN CIRCLE 20 00 00 N/04 00 00 E RADIUS 2005; EXCEPT CIRCLE 20 00 00 N/04 00 00 E RADIUS 1005; IHEAD,COUN EQ EG; CAT$ EQ 67000. This query directs the computer to select records on all targets 1) located inside a circle having a radius of 200.5 nm and centered at the coordinates cited above; 2) and outside a circle having a radius of 100.5 nm and centered at the coordinates cited above; 3) and located in the UAR; 4) and assigned IDHS category code 67000; then count the number of records meeting these conditions and print the total on LEN 105. 25X1 Approved For Relea O YT PIA-RDP78TO4759AO09600010081-3 Approved f{ or Releas Q 0K ET 81-3 25X1 25X1 FOR FILE IDF; REPORT IHEAD ON 60?; WITHIN POLYGON 51 00 00 N/019 00 00 E, 18 00 00 N/O21 00 00 E, 16 00 00 N/022 00 00 E; OR IHEAD,COUN EQ CH; CAT$ EQ 67000. This query directs the computer to print on LEN 600 the IHEAD sectors of records on all targets 1) located inside the triangle defined by the coordinates cited above; 2) or located in China and assigned IDHS category code 67000. Note that lines 4 and 5 in this query are part of the WITHIN statement and must be indented at least five spaces from the left margin. IDF Queries If your query is directed to the IDF, record selection statements must include * either at least one of these values: COMIREX number BE number IDHS category code country code military district number NPIC number machine reference number * or the values that define a circle, polygon, or corridor. 25X1 Approved For Relew0Nt P TI: CIA-RDP78TO4759AO09600010081-3 d For ReleTOO S-EQ> (it: 096000109 25X1 25X1 The statements to which this restriction applies are - a simple or compound statement introduced by WITHIN, WHEN, or OR - one of the above followed by a simple or a compound statement introduced by AND To omit one of these values is to direct the computer to search the entire IDF. 1 WHEN condition A condition B -BE number 2 OR condition C condition D IDHS category code 3 OR condition E condition F COMIREX number condition G 1, 2, & 3 AND condition H Note that it was unnecessary to specify one of the mandatory values in the last compound statement because that statement is a continuation of state- ments 1, 2, and 3. This example would also preclude a search of the entire IDF: 1 WHEN condition A condition B 2 OR condition C condition D 1 & 2 AND condition E----BE number continued condition F For example this type of query would preclude a search of the entire 25X1 Approved For ReleaQ!2?p 0$`/?2I: CIA-RDP78TO4759AO09600010081-3 Approves For Relea-U c E FET A009600010 Despite the speed involved in digital computer operations, a search of the entire IDF requires several hours to perform. If you submit a query that does not specify one of the values listed above, you will receive a Tele- type message indicating that you cannot transmit your query to the com- puter. If such a query is necessary, consult the Chief, Information Systems Branch, AID, who will endeavor to find some other means of satisfying your requirement. 25X1 25X1 25X1 Approved For ReleasT6 p2fMl&:fIA-RDP78T04759A009600010081-3 Approve Repeating Fields For Relea O O6f1?EI If your query includes more than one compound record selection state- ment and in one of these statements you specify one or more repeating fields or items from repeating fields, you must specify the same field(s) or the same item(s) in each statement. To do this specify these fields or items in an AND statement or in a compound statement introduced by an AND statement. For example: FOR FILE IDF; REPORT INEGA ON 112; WHEN IBRIE,BRI:,AGEN EQ NPIC; DATE EQ 7??4?0; OR IDETE,DET:,AGEN EQ NPIC; DATE EQ 700400; AND IBRIE,PHO:,MISS EQ GA123; FRAM 36/5. The same query could also be constructed this way: Items in PHO: Repeating Field FOR FILE IDF; REPORT INEGA ON 112; WHEN IBRIE,BRI:,AGEN EQ NPIC; DATE EQ 700400; PHO:,MISS EQ GA123; FRAM 36/50; OR IDETE,DET:,AGEN EQ NPIC; DATE EQ 7004?0; IBRIE,PHO:,MISS EQ GA123; Items in PHO: FRAM 36/5? Repeating Field This query directs the computer to select from the IDF records on all targets 1) described in a brief third-phase report produced by NPIC during April 1970 and based on GIANT NAIL mission 123, frames 36 through 50; Approved For Rele' 2 : CIA-RDP78T04759A009600010081-3 III 25X1 25X1 25X1 25X1 Appi oved For ReIIOP 22JtIR II 2) or described in a basic third- phase report produced by NPIC during April 1970 and based on GIANT NAIL mission 123, frames 36 through 50; 3) then print the INEGA sector of each selected record on LEN 112. Approved For Releatb jp pr. 25X1 25X1 Approved or Re1ea_T02E!2T CHAPTER IV. SPECIAL-PURPOSE STATEMENTS A009600010 25X1 25X1 Special-purpose statements enable you to insert information that must or could appear in your output. This information includes items such as labels identifying each page of output, control system numbers, report numbers, lines of text for a preface, and headings. At present, there are two special-purpose statements, each of which will insert this type of in- formation in your output. Both are described on the following pages. In each query you may include as many special-purpose statements as you need. When used, they always precede record selection statements and follow out- put statement(s). A CNTL statement directs the computer to insert one or more headings on a single line of each page of your output. Precisely what the content of each heading should be will depend on the contents of your output. Usually this statement will insert information such as defense classifica- tion, codewords, a control system number, and/or the caveat for the system or systems in which the output will be controlled. But it may be any statement you wish. For example, you may want to identify your output by inserting on each page a brief reference to the query that produced it. The format of a CNTL statement is this: [Line' ieading 1: Positio CNTL II No. ## I of 1st Characters Heading 1 Last Heading: Position / ea ding 2: Position of 1st Character Heading 2J, of 1st Character Last Heading 25X1 Approved For Retepe S1F : CIA-RDP78T04759A009600010081-3 For example: d For ReleeiMf9(1[1T2 081-3 CNTL 2,1/NUMBER OF AIRFIELDS ABOVE 7000 FT MSL IN CHINA - DEC 1970 CNTL 2,65 D All headings will be printed on the line you specify after the mnemonic, CNTL. The maximum number of positions on a given line depends on the type of paper you intend to use and therefore ranges from 72 to 132 positions. (See CHAPTER II.) To insert information on more than one line use a CNTL statement for each additional line. Close the statement with a semicolon unless it is the last in your query. If it is the last, close it with a period. If your output is a document that requires a preface, you can use one or more preface statements to compose and insert that text. Use one PREF statement for each line to be inserted. Include these statements in your query only if you have detailed BQL instructions regarding your output, and those instructions indicate that you should do so. (See APPENDIX C.) The format of a preface statement is this: No. of Spaces from o. of Spaces from Line To Be Printed Between Left Margin , Right Margin IL Specified Margins Close the statement with a semicolon unless it is the last in your query. If it is the last, close it with a period. Approved For Re1eaf?p0tjn'q CIA-RDP78TO4759AO09600010081-3 25X1 25X1 25X1 ed For ReIUj M?iJTI CHAPTER V. GUIDELINES FOR CONSTRUCTING QUERIES Before constructing a query, determine 59AO09600 1) the kind of output you need: data from selected records? statistics about selected records or about the contents of these records? 2) whether you want your output to be printed or recorded on magnetic tape; 3) whether you want records selected on the basis of the location of targets with respect to a circle, polygon, or corridor; 4) whether you want records selected on the basis of values in fields and/or items; 5) whether you want your output printed at eight lines per inch or printed on special paper or whether you need more than one copy. In each query statements must appear in this order: file output special-purpose record selection (except USE) USE Approved For ReIe 2 1: CIA-RDP78TO4759AO09600010081-3 Turl"LlY Approved FILE AND OUTPUT STATEMENTS For ReleasMBOSERET Each query must contain at least two statements: one file and one output statement. Use a REPORT statement to get one copy of your output printed at six lines per inch on a teletypewriter, DCT 2000, or high-speed printer. Use a REPORT and an appropriate UNIT statement to have your output recorded on magnetic tape. If you w ant one or more copies of your output printed on special paper, supplement your REPORT statement with a FORM statement. A COUNT statement may be used instead of a REPORT statement when you need statistical output. In a query directed to the IDF a COUNT statement should always be specified with one or more record selection statements. Only one COUNT statement can be used in any given query. RECORD SELECTION STATEMENTS Include one or more record selection statements in each query directed to the IDF. The maximum number of conditions that can be specified in one query is twenty (20). If specified, each alternative value is considered as one condition. If used, statements directing the computer to select records on the basis of geographic location will always be the first to appear in a query. In this case, the first statement will always be introduced by WITHIN; if used, the second statement will be introduced by EXCEPT. If you wish, you can then list one or more statements directing the computer to select records on the basis of values in fields and/or items. If the statements mentioned in the preceding paragraph are not used, a WHEN statement will be the first record selection statement to appear in a query. A WITHIN and a WHEN statement cannot be used in the same query. 25X1 25X1 Approved For Rele"pOStlef(ETI CIA-RDP78TO4759AO09600010081-3 25X1 Approved For ReITP MORE/1 6A0096000 0081-3 25X1 25X1 The first time you specify a value for a field or item it must be identi- fied by the mnemonics for sector, field, and/or item. You do not have to repeat sector and/or field mnemonics if they were specified in a preceding record selection statement and were the last to be specified. This pro- cedure is optional. Each query can contain only one simple or compound AND statement, which is part of each preceding record selection statement -- simple and/or com- pound. If your query is directed to the IDF, record selection statements must include at least one of these values BE number COMIREX number IDHS category code country code military district number NPIC number machine reference number or the definition of a circle, polygon, or corridor. The statements to which this restriction applies are a simple or compound statement introduced by WITHIN, WHEN, or OR one of the above followed by a simple or a compound statement introduced by AND If you specify a repeating field or one or more items from a repeating field in one compound statement, the same repeating field and/or items must be specified in each compound statement. SPECIAL-PURPOSE STATEMENTS Use special-purpose statements to insert items such as identifying labels, report numbers, a preface, and headings. 25X1 Approved For Releaa?p0SI ': Appro% PUNCTUATION AND SPACING ed For Reldfflf 26&T2 59A0096000 0081-3 Place the first word in each statement at the left margin. If a statement requires more than one line, indent the overruns at least five spaces. Each introductory word or words is separated from the rest of the state- ment by one space. In compound record selection statements each statement except the first is also indented at least five spaces from the left margin. Mnemonics, relation mnemonics, and values are usually separated from one another by one space. Close each statement except the last with a semicolon. Close the last statement with a period. 25X1 25X1 25X1 Approved For Relea t (0 hu TICIA-RDP78T04759A009600010081-3 Approv ~d For ReIe.T P10?I R 1 : CHAPTER VI. SUBMITTING QUERIES ON TELETYPEWRITERS AND DATA COMMUNICATIONS TERMINALS Queries can be transmitted to the UNIVAC 494 computer system via on-line teletypewriters or Data Communications Terminals located in work areas throughout the building. The teletypewriters you can use are the ASR and KSR Teletypes and Kleinschmidt Electronic Data Printers. Two types of Kleinschmidt printers are available. One can be used to transmit queries and receive output. The other prints output only and has no key- board. Procedures for transmitting queries on all teletypewriters are identical. Regardless of whether you use a teletypewriter or a DCT 2000, all statements comprising one query are submitted in one transmission. Before using a teletypewriter, we recommend that you list your query on paper. Initialization and turnoff procedures for teletypewriters and DCTs are explained in Introduction to the Remote Access Computer Service. 25X1 25X1 25X1 Approved For Releas,d 0 /ttftT?IA-RDP78T04759A009600010081-3 d For ReIi SBRFU1~ 25X1 25X1 TRANSMITTING QUERIES ON TELETYPEWRITERS Before transmitting a query on a teletypewriter, be sure that the computer system is available for use by pressing these keys in the order listed: simultaneously + /BELL simultaneously If the system is available, you will receive this kind of message on the teletypewriter you are using: 102 09+0 A RYE READY Q00002 (LEN) (Time) (Number of Programs in the Queue) If such a message does not appear, press simultaneously A so-called RYE READY message will then be printed. If it is not, contact the Chief, Systems Programming Branch, AID for assistance. You will receive no other messages from the computer system before you transmit a query. Approved For ReleaMP0 8 25X1 25X1 Approved For ReleasWWR(TC To transmit a query via a teletypewriter follow these procedures in the order listed. The LEN or logical equipment number you specify must be that of the teletypewriter, DCT 2000, or high-speed printer to which you want your output transmitted. Omit a LEN if your output is to be recorded on magnetic tape. R/L is an abbreviation for the RETURN and LINE FEED keys. Type BQL,LEN (of teletypewriter you are using) Your Component Code, Name, Extension Press ALT Type Your query. simultaneously at the end of each line except the last simultaneously Shortly after you have transmitted a query to the computer system, your output will be printed by the teletypewriter, DCT 2000, or high-speed printer you have specified via a LEN. Or, your output will be recorded on magnetic tape. Approved For Rel"p 25EZ HKI 25X1 ved For Rele'5@p21T2 TRANSMITTING QUERIES ON PAPER TAPE 100.81- If you wish, you can use the ASR paper tape punch and reader unit to punch and transmit queries. Recording queries on paper tape is a time- saving measure since you can transmit frequently used queries without using the keyboard each time. Punching Queries on Paper Tape The paper tape punch and reader unit is located on the left side of the ASR teletypewriter. Before punching a tape, you must convert the teletypewriter to a so-called local mode, that is, to an off-line status. Instructions for doing this appear on the control panel. After the con- version is complete, you will receive this message indicating that the ASR is in a local mode: 1. Press these keys in the order listed: ALT MODE CTRL + SVC simultaneously L 2. Turn the PUNCH button to ON. 3. Feed about six inches of tape through the tape gate by pressing and simul- taneously holding these keys: CTRL, SHIFT, REPT, P Hold all these keys down until the desired amount of paper tape has been fed through the tape gate. 25X1 25X1 Approved For ReleaMf0Q : ICIA-RDP78TO4759AO09600010081-3 Approve d For ReleaPOff(>Rf 9A00960001 081-3 1+. Follow the instructions given in the TRANSMITTING QUERIES ON TELETYPEWRITERS section in this chapter. A copy of your input will be printed by the teletypewriter you are using. Tear off the punched paper tape. To identify your tape we recommend that you place a label and date in a con- spicuous place at the beginning of the tape. 6. Press the RESET button to return the teletypewriter to on-line status. Turn the PUNCH button to OFF. You are now ready to transmit your query via the ASR paper tape reader. Transmitting Queries Punched on Paper Tape Be sure that the ASR Teletype is on line. To transmit your query via the paper tape reader follow these procedures: 1. Press the square red button under the tape gate to release the gate. 2. Place the tape over the feed holes on the tape feed wheel; the narrower, unperforated margin must face the tape reader, not you. 3. Place the code holes of the first character to be read slightly behind the sensing pins. 4. Close and lock the tape gate by pushing it down. Press the READER ON button. The tape will stop when the last punched character has been read. Press the square red button to release the tape. 25X1 25X1 25X1 Approved For Releas p0SeUtTfIA-RDP78T04759A009600010081-3 Approved or ReleasJ&2L' A-RDP78T0475 1-3 25X1 25X1 TRANSMITTING QUERIES ON A DCT 2000 If you elect to transmit your query on a DCT 2000, your punched card deck must include the control and data cards shown below. Instructions for punching control cards are given in the Introduction to the Remote Access Computer Service. Punch each statement in your query on a separate card. Begin punching the statement in column 1 and proceed to the right. To punch a semicolon use a multiple 6-8-11 (minus sign) punch. An overrun (if any) of any statement should be punched on the next card; however, begin punch- ing the rest of the statement in column 6 rather than column 1. If you are punching a compound record selection statement, begin punching the second and succeeding statements in column 6. Then arrange your deck in the sequence shown below. 25X1 Approved For Relea p0 EWU:ICIA-RDP78T04759A009600010081-3 Approv ~d For ReleasI0 i RETCi 0096000100 25X1 25X1 APPENDIX A. GLOSSARY OF TERMS FOR THE BATCH QUERY LANGUAGE A single letter, number, or symbol; the smallest unit of information considered in this manual. A unit of information consisting of one or more items; every field is identified by a mnemonic. A set of records. The arrangement of data in a file, record, sector, field, or item; also refers to the arrangement of data that is input or output. Installations Data File; a set of records on targets or installations; records contain data derived from imagery. A unit of information consisting of one or more characters; an item is identified by a mnemonic; when it is the only item in a field, an item has no mnemonic. 25X1 Approved For ReI a MERETl2 : CIA-RDP78TO4759AO09600010081-3 Appr~ ved For ReIeIAP2OOEfQR I : 25X1 25X1 APPENDIX A. GLOSSARY OF TERMS FOR THE BATCH QUERY LANGUAGE (CONTINUED) A combination of letters or of letters and symbols used to identify a sector, field, or item; also used to specify some computer operations and the relation between a mnemonic and a value or values. Machine reference number; assigned by the computer to each record in the IDF for identification purposes; will not be changed or transferred to another record. The status of a piece of equipment when it is in communication the UNIVAC 1+91+ computer system in In this manual, a series of statements directing the computer to select from a file records that meet your specifications and print or record on tape all or part of each record. A unit of information consisting of one or more sectors; in the IDF each record is identified by a machine reference number. Approved For RWeSt", f~ 25X1 25X1 Approve For Relea1QF0(Kff: APPENDIX A. GLOSSARY OF TERMS FOR THE BATCH QUERY LANGUAGE (CONTINUED) A field which is used as often as necessary, that is, repeated to record different values; all occurrences (i.e., instances) of the field are identified by the same mne- monic; consult a description of the file in which you are interested to learn which fields are repeating fields. REPORT FORMAT TABLE A set of instructions indicating (to the computer) which data is to be output and the format to be used in presenting this data; each table is identified by a mnemonic and each is stored in the computer. A unit of information consisting of one or more fields; a sector is identified by a mnemonic. The contents of a given record, sector, field, or item; synonymous with entry and data. 25X1 25X1 Approved For ReleasT6pO~W1 f&9 IA-RDP78T04759A009600010081-3 Approvefd For Releaser EW WAR 25X1 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE BINARY REPRESENTATION OF DATA (BINTP) AND DATA RECORDED FOR CABLE TRANSMISSION (CABLE) Tape File The output produced by your BQL query. Data Block 602D computer words: 20 items plus 2 block descriptor words; the last block in a file may contain fewer words. Item 30 computer words (150 characters). Internal file label The first (header) or last (trailer) block of data on each reel of magnetic tape in the file; contains information pertaining to the file and is machine readable; the format differs from that of a data block. External file label That file information appearing on the reel on which the file is recorded; common external file labels are the stickers applied to tape reels and the handwritten notations on card decks. FOR End-of-reel; the termination indicator for inter- mediate reels of a multireel file. EOF End-of-file; the termination or point of completion of a quantity of data. 25X1 Approved For ReleaT@PO_WCI'ET:ICIA-RDP78T04759A009600010081-3 Approve For ReleO00S-/Q$(i2: A00960001 25X1 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) A = alphabetic Fieldata character N = numeric Fieldata character Q = octal character; not in Fieldata S = special Fieldata character X = any Fieldata character Z = alphanumeric Fieldata character Approved For RelelsAP2 RAI : 25X1 d For Rele-T-OP100E R A009600010681-3 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) Inter-Block Gap Data Block 1 Inter-Block Gap Inter-Block Gap 25X1 25X1 Approved For ReleasygPO2lE p TgIA-RDP78T04759A009600010081-3 Approv ~d For Re1ea$?P0(9RU: 25X1 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) HEADER LABEL BLOCK The header label shown below will be placed on all reels of tape when output is represented in binary numbers or when output is to be transmit- ted by cable. WORD 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 3 7 3 7 3 7 3 7 3 3 7 3 7 3 7 3 7 3 File Name Date Created Reel Sequence No. Time Created Reserved Retention Date No. Reel Pass-Write Physical Reel No. Not Used For User's Infor- mation 7373737373 7373737373 ) Initial Header Block End Header Block 25X1 Approved For Relea 05 M. FIA-RDP78T04759A009600010081-3 Approve d For Re1eaI0P0(*f2T 25X1 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) Each header label will contain the fields listed below. WORD 3 - FILE NAME (in Fieldata) Coded: FFFFFFFFFFFFFFF Symbol: AZZZZZZZZZZZZZZ Example: TBMASTERWPICa0M where F is a unique, descriptive name assigned to a file for purposes of communication in verbal references to the file and for internal program verification that the correct input file has been used. WORD 5 - DATE FILE CREATED (in Fieldata) Coded: YYDDD Symbol: NNNNN Example: 66326 where Y = year & D = day of year. WORD 6 - REEL SEQUENCE NUMBER (in Octal) Coded: RRRRR Symbol: QQQQQ Example: 00002 where R is the sequentially assigned reel number provided by the computer. 25X1 Approved For Reltep ITET 4 : CIA-RDP78T04759A009600010081-3 Approved For ReleassQFO$IEEJRHH 009600010181-3 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) WORD 7 - TIME CREATED (in Fieldata) Coded: TTTTT Symbol: NNNNS Example: 1258+ where T is the starting time at which the reel was produced; time is provided by the computer's day clock. WORD 12 - RETENTION DATE (in Fieldata) Coded: YYDDD Symbol: NNNNN Example : 66340 where Y and D are the year and day the tape may be released. WORD 13 - NUMBER OF REEL PASS-WRITE (in Octal) Coded: PPPPP Symbol: QQQQQ Example: 00032 where P indicates the number of times a given reel of tape has been mounted and initialized; magnetic tape write only. D Approved For ReIe 2G : CIA-RDP78TO4759AO09600010081-3 1 39*1 25X1 Appro ed For Re1egQR05K T : A00960001 081-3 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) WORD 14 - PHYSICAL REEL NUMBER (in Fieldata) Coded: RRRRR Symbol: NNNNN Example: 01288 where R denotes a number externally assigned to a reel of tape. 25X1 Approved For ReleaTMIRSPET $IA-RDP78T04759A009600010081-3 Approv$ A009600010 81-3 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) Except for possibly the last, each data block in the file will have the format shown below. The last will have a similar format but might contain fewer data items. d For ReleaTMMMT ///// /Z Word 0 Number of Items This Block Number of Words This Block 30 31 600 601 Inter-Block Gap Block Descriptor Word Data Item 20 Block Descriptor Word Inter-Block Gap 25X1 Approved For Rele"POS /ekef :ICIA-RDP78T04759A009600010081-3 Approved APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) TRAILER LABEL BLOCK For Release 900 fild The 24-word trailer label on each tape reel will be preceded by a file mark (178) and will have the format shown below. WORD 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 75757575 75 -7 5 7 5 7 5 7 5 7 5 No. Blocks This Reel Item Count Item Count-Cumulative Reserved Unused 75757575 75 75757575 75 ) 758 - EOR, 768 = EOF ) 758 = EOR, 768 = EOF 25X1 25X1 Approved For Re1eay?p003 R. ICIA-RDP78TO4759AO09600010081-3 Approved For ReleaseTW28fjIE IA-RDP78T04759A 25X1 25X1 APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) The standard trailer label will contain the fields listed below. WORD 2 - NUMBER OF BLOCKS THIS REEL (in Octal) Coded: CCCCCCCCCC Symbol: QQQQQQQQQQ Example: 01273 where C is the number of data blocks on a given reel of tape. WORD 4 - ITEM COUNT (in Octal) Coded: MMMMMMMMMM Symbol: QQQQQQQQQQ Example : 0000025660 where M is the number of data items on a given reel of tape. WORD 6 - CUMULATIVE ITEM COUNT (in Octal) Coded: PPPPPPPPPP Symbol: QQQQQQQQQQ Example: 0000052520 where P is the number of data file items accumulated to the end of the tape. 25X1 Approved For Relea 0SR6YET ILIA-RDP78TO4759AO09600010081-3 Approved For ReleaslOWSECRET APPENDIX B. FORMATS OF OUTPUT RECORDED ON MAGNETIC TAPE (CONTINUED) EXTERNAL FILE LABELS External file labels will be produced on line by the computer and will contain the fields annotated in this illustration. Date & Time (Fieldata) AAAAAAAAAAAAAAA DDMMMYYTTTTS CH UN NNNNN NNNNN h-Channel & Unit Tape, Octal ~-Physical Reel Number in Fieldata ~-Number of Days File Must Be Retained NNNNN NNNNN NNN Logical Sequence of Reel in File -Job Number Assigned by Computer -Requester's Component Code 25X1 25X1 Approved For Rele"POS /e f I CIA-RDP78T04759A009600010081-3 Approved or Relea 0Sk 1 ET APPENDIX C. SETUP INSTRUCTIONS FOR DOCUMENTS PRODUCED BY THE BATCH QUERY LANGUAGE Instructions for using the Batch Query Language to produce documents and certain types of reports will be published as these instructions are developed. 25X1 25X1 25X1 Approved For ReIeT@j20s 0R{ :I CIA-RDP78T04759A009600010081-3 Approved For Release 2002/08T W cSEOn:Ir8TO4759AOO9600010081-3 Approved For Release 2002/ 'g SeDRU78TO4759AO09600010081-3