• Aucun résultat trouvé

FIELD OR CONSTANT:

Dans le document TEXAS INSTRUMENTS (Page 129-133)

SELECTION COMPARISON CONSTANT OPERAND 2 CONSTANT: 3

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING NEXT: S

**SORT/MERGE RECORD SELECTION SPECIFICAT!ON**

RECORD SELECTION TYPE: I

Figure 8-6. Typical Interactive Prompt and Response Sequence for Building Control Specification File (Sheet 1 of 2)

8-9

SELECTION COMPARISON FIELD OPERAND 2 BEGINNING:

OPERAND 2 ENDING:

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING NEXT: R

**SORT/MERGE REFORMATTING SPECIFICATION**

FIELD TYPE: F

CHARACTER PORTION: C BEGINNING LOCATION:

ENDING LOCATION: 5

FORCED CHARACTER INFORMATION RECORD CHARACTER: 4

SUBSTITUTE CHARACT~H: A CONTINUATION:

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING NEXT:

R

**SORT/MERGE REFORMATTING SPECIFICATION**

FIELD TYPE: F

CHARACTER PORTION: C BEGINNING LOCATION:

ENDING LOCATION: 5

FORCED CHARACTER INFORMATION RECORD CHARACTER:

SUBSTITUTE CHARACTER:

CONTINUATION: C

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING

NEXT: R

**SORT/MERGE REFORMATTING SPECIFICATION**

:=IELD TYPE: N

CHARACTER PORTION: C BEGINNING LOCATION: 23 ENDING LOCATION: 27

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING

NEXT: R

**SORT/MERGE REFORMATTING SPECIFICATION**

FIELD TYPE:

D

CHARACTER PORTION: C BEGINNING LOCATION: 1 ENDING LOCATION: 80

ENTER NEXT SPECIFICATION - SELECTION OR REFORMATTING NEXT:

SORT/MERGE EXECUTION OPTION RUN SORT/MERGE?: Y~S

SORT/MERGE LISTING DEVICE LISTING DEVICE NAME: LPOl SORT/MERGE COMPLETED NORMALLY

L

J

Figure 8-6. Typical Interactive Prompt and Response Sequence for Building Control Specification File (Sheet 2 of 2)

8.3 BATCH MODE

You can use a file containing batch command statements to produce a Sort/Merge control file and to run Sort/Merge. Use the Text Editor or other means of creating records in the batch format described in the following paragraphs. Use the Execute Batch (XB) command or the Execute Batch Sort/Merge (XBSM) command to initiate a batch input. For further information on the batch com-mands, see the DX10 Operating System Reference Manua/, Volume II.

8.3.1 Batch Stream Commands

Use the commands described in this paragraph to create control files and run Sort/Merge in batch mode. The first record in a batch file must be the BATCH command, and the second must be the SM$SMC command.

NOTE

If SM$SMC is not the second command of a Sort/Merge batch stream, the results of XB are unpredictable.

The format of SM$SMC is as follows:

SM$SMC CFN = filename

The file specified will contain the completed control specifications.

Table 8-2 details the various commands and the order in which they must be given. You can repeat SM$IN once for each input file in a merge. You can repeat SM$SLC and SM$REF in sets to create detailed specifications. Execute these commands in the order required by the specification sheets (as shown in earlier sections of this manual). Although the order of keywords within a specification is not critical, you should use the same order as you would use on the specification worksheets. You need not specify keywords that are defaulted, but, if you fail to specify a required entry, an E~rror termination of Sort/Merge results.

The last command of the control file creation sequence is SM$CLS. This command terminates the creation of the control stream in an orderly fashion. It is a good practice to always include this command, although no harm is done if it is omitted.

The EBATCH command must be the last record in a batch file.

8.3.2 Batch Record Format

Batch records must conform to the following rules:

• The maximum length of a record is 80 characters. If you need more than one record to specify the parameters for a command statement, end the first record with a comma or an equal sign.

• Each record in the file begins with a particular procedure name. If any keyword-response sets are required, the first set must be on the same record as the procedure name.

• Keyword-response sets are separated' by commas, as follows:

COMMAND KEY1 = RESPONSE1,KEY2= RESPONSE2

946252-9701

The order of the keywords is not critical. Table 8-1 gives suggested batch keywords. If you use keywords other than those recommended, the keyword selected might not be unique, producing unpredictable results.

Table 8-2 describes each of the Sort/Merge commands. The table presents the commands in the order in which they must occur if used.

Command

SM$SMC

SM$HD

SM$OUT

SM$WKF

SM$IN

SM$SLC

SM$REF

SM$CLS

XBSM

Table 8-2. Batch Stream Commands and Use Remarks

Creates the control file that will contain the specifications created by the subsequent commands. This statement is re-quired and must be the second command in the batch stream (that is, following the BATCH command).

Builds the header control statement. Must be specified and must immediately follow the SM$SMC command.

Builds the output file control statement. It must be specified im-mediately after SM$HD.

Builds the work file control statement. It may be specified for a sort; when used, it must follow the SM$OUT command. This command is not necessary for a merge and will be ignored if specified.

Builds the input file control statement(s). The first SM$IN must follow SM$WKF. For a sort, only one SM$IN may be specified.

For a merge, at least two and no more than five SM$I N com-mands may be used. For a merge, these comcom-mands may be inter-mixed with SM$SLC and SM$REF commands to create more complex selection and reformatting patterns.

Builds the record selection control statement(s). SM$SLC com-mands may be mixed with SM$IN and SM$REF comcom-mands to create different selection patterns for different record types. The SM$SLC command is not required. If no SM$SLC command is used, the default value includes all records.

Builds the reformatting control statement(s). SM$REF com-mands may be mixed with SM$IN and SM$SLC comcom-mands to create different reformatting for differentselected record sets or different input files. SM$REF commands must be present to define the sort control fields or keys.

Terminates after the file creation procedure. This should be the last command of the file creation section of a batch stream.

Executes Sort/Merge by using the specified batch file name and listing device.

8.3.3 Executing Sort/Merge in Batch Mode

The command to execute Sort/Merge in batch is as follows:

XBSM CFN = filename,LDN

=

device(or filename)

If the control file has previously been created, only the XBSM command is required. If the control file is being built in the batch stream, the file name on the XBSM statement must match the file name on the SM$SMC statement. Figure 8-7 shows a file created by the Text Eqitor and then used as a batch stream with the XB command.

BATCH

SMSSMC CFN=DS03.FILNAM

SMSHD

SMT=SORTR~TCL=6~ORL=80,MS=8000

SMSOUT FP=DS03. TEST,LRL=80,PRL=560 SM$WKF WFV=DS02,WFT:E

SMSIN FP=DS03. INFIL SMSSLC RST=I

SM$REF FT=N,CP:C,BL=32,EL=37 SM$REF

FT=D,CP~C,BL=1IEL=80

SM'$CLS

XBSM CFN=DS03.FILNAM,LDN=LPOl

Dans le document TEXAS INSTRUMENTS (Page 129-133)