Previous Topic: Using the WHERE CommandNext Topic: System Administration: Defining Online Specifications


WHERE Command Examples

The following two examples use the WHERE command.

Example 1

In example 1, use the WHERE command to help you determine the values for the Page Indexing Criteria. This criteria is most easily specified in the VIEW COLS mode, which has fields in its header lines for entering the necessary data to create the Page Index.

Because the field on which you want to create the Page Index is the customer name, place the cursor at the blank under the N in the word NAME, as shown in the following illustration:

CA View Browse - SWILSON5 -------------------------------- Line=00003 Pos=00001 Command ===> Scroll ===> PAGE ********************************* TOP OF DATA ********************************** .SARPAGE1 NAME ACCOUNT NUMBER REGION DIVISION MONTH TOTAL .---- -------------- ------ -------- ---------- .ABERNATHY xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ACME xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ADLER xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALLISON xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .AXEL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALSTER xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALSTON xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ATNE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BALICK xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BARELL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BAROVELLI xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BASSE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BASLICH xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CANTRELL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CELESTE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CENNET xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHASE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHASIN xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHINOIS xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CLAPKIN xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx

  1. When you press the PF key assigned to WHERE, CA View displays the message in the short message area indicating you that the cursor is at line 3 and position (that is, column) 1.

    Therefore, the value for PSLINE is 5, and the value for PSCOL is 2.

  2. You can move the cursor to the end of this product field, use the WHERE command again, then do the arithmetic to determine that the value for PSLEN is 28.

Example 2

WHERE can also indicate you the record and page numbers with its long message. This is helpful when defining column headings, or determining how many records or pages to exclude from the logical view.

  1. To display WHERE's long message, first display the short message as shown previously.
  2. Then press the PF key assigned to HELP.

    The long message is displayed as in the following illustration:

CA View Browse - SWILSON5 -------------------------------- Line=00003 Pos=00001 Command ===> Scroll ===> PAGE The text is at line=00003, Pos=00001, Page=00000001, Rec=004 ********************************* TOP OF DATA ********************************** .SARPAGE1 NAME ACCOUNT NUMBER REGION DIVISION MONTH TOTAL .---- -------------- ------ -------- ---------- .ABERNATHY xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ACME xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ADLER xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALLISON xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .AXEL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALSTER xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ALSTON xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .ATNE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BALICK xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BARELL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BAROVELLI xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BASSE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .BASLICH xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CANTRELL xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CELESTE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CENNET xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHASE xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHASIN xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CHINOIS xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx .CLAPKIN xxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxx