Displaying the Session Monitor Stack

Reference:

The Session Monitor has a number of commands for displaying the contents of the stack. These commands move an internal pointer forward and backward and display the contents of the stack starting at the location of the pointer (the Session Monitor commands themselves are not appended to the stack).

Initially, the pointer resides at the bottom of the stack (after the most recent entry). You can always reset the pointer at the bottom by pressing Enter.


Top of page

x
Reference: Session Monitor Line Categories

Session Monitor categorizes terminal lines as one or more of the following:


Top of page

x
Reference: Session Monitor Display Commands

You can enter Session Monitor commands at any time during a FOCUS session, except when you are using special full-screen facilities, such as FIDEL, Hot Screen, or TableTalk. You can even enter Session Monitor commands while being prompted for data or in the middle of entering other FOCUS commands, as in this TABLE request:

TABLE FILE CAR
PRINT CAR
/PC

If you enter a Session Monitor command during a data prompt, press Enter to return to the prompt.

You can include Session Monitor commands in FOCEXECs.

The following table lists the Session Monitor display commands:

Command

Command Name

Description

/PP

Previous Page

Moves the pointer back one page (20 lines) and displays the page. Repeating the command scrolls the pointer backward toward the top of the stack.

/PI

Previous Input

Moves the pointer back and displays the previous 20 lines of input.

/PO

Previous Output

Moves the pointer back and displays the previous 20 lines of output.

/PC

Previous Command

Moves the pointer back to the previous FOCUS command issued and displays it and the lines following it. When you enter /PC repeatedly, each command appears above the previously displayed commands. The Session Monitor can display up to 20 lines at one time.

/TOP 

Top of the Stack

Moves the pointer to the top of the stack (at the oldest entry) and displays the first 20 lines of the stack.

/LN [n|1]

Line Command

The effect of /LN n varies depending on your previous Session Monitor command:

  • After /PP or /TOP, moves the pointer n lines forward and displays the next 20 lines.
  • After /PI, moves the pointer n input lines forward and displays the next 20 input lines.
  • After /PO, moves the pointer n output lines forward and displays the next 20 output lines.
  • After /PC, moves the pointer n lines forward and displays the next 20 lines of commands.

Note: FOCUS does not recognize the /LN command unless you first issue another Session Monitor display command.

 



Example: Displaying Lines From the Session Monitor Stack

Consider the following terminal session:

SET SM = ON                   
>                             
DEFINE FILE CAR               
DCNEW/D10.2 = DEALER_COST * 5;
RCNEW/D10.2 = RETAIL_COST * 5;
END                           
>                             
TABLE FILE CAR                
PRINT CAR DCNEW RCNEW         
BY COUNTRY                    
END                           
NUMBER OF RECORDS IN TABLE=       18  LINES=     18 
                                                    
PAUSE.. PLEASE ISSUE CARRIAGE RETURN WHEN READY     
PAGE     1                                              
                                                        
                                                        
COUNTRY     CAR                      DCNEW         RCNEW
-------     ---                      -----         -----
ENGLAND     JAGUAR               37,135.00     44,390.00
            JAGUAR               55,970.00     67,455.00
            JENSEN               74,700.00     89,250.00
            TRIUMPH              21,460.00     25,500.00
FRANCE      PEUGEOT              23,155.00     28,050.00
ITALY       ALFA ROMEO           28,300.00     34,100.00
            ALFA ROMEO           28,300.00     34,100.00
            ALFA ROMEO           24,575.00     29,625.00
            MASERATI            125,000.00    157,500.00
JAPAN       DATSUN               13,130.00     15,695.00
            TOYOTA               14,430.00     16,695.00
W GERMANY   AUDI                 25,315.00     29,850.00
            BMW                  29,000.00     29,700.00
            BMW                  30,000.00     31,775.00
            BMW                  50,000.00     68,760.00
            BMW                  55,000.00     70,615.00
            BMW                  41,500.00     45,485.00
PAGE     2                                               
                                                         
                                                         
COUNTRY     CAR                      DCNEW         RCNEW 
-------     ---                      -----         ----- 
W GERMANY   BMW                  42,000.00     47,475.00 

Issue the Session Monitor command /PI to show stacked input lines. The following displays:

===>                                   FIRST   INPUT   LINE
DEFINE FILE CAR                                            
DCNEW/D10.2 = DEALER_COST * 5;                             
RCNEW/D10.2 = RETAIL_COST * 5;                             
END                                                        
TABLE FILE CAR                                             
PRINT CAR DCNEW RCNEW                                      
BY COUNTRY                                                 
END                                                        
===>                                   CURRENT INPUT   LINE

Issue the Session Monitor command /LN 1 and then /PO to show stacked output lines. The following displays:

>                                                          
 NUMBER OF RECORDS IN TABLE=       18  LINES=     18       
                                                           
 PAUSE.. PLEASE ISSUE CARRIAGE RETURN WHEN READY           
                                                           
                                                           
>                                                          
===>                                   CURRENT OUTPUT  LINE

Note that the report output does not display because it was displayed using HotScreen.

Issue the request again with SET SCREEN = OFF:

SET SCREEN = OFF                                              
>                                                             
TABLE FILE CAR                                                
PRINT CAR DCNEW RCNEW                                         
BY COUNTRY                                                    
END                                                           
 NUMBER OF RECORDS IN TABLE=       18  LINES=     18          
                                                              
 PAGE     1                                                   
                                                              
                                                              
 COUNTRY     CAR                      DCNEW         RCNEW     
 -------     ---                      -----         -----     
 ENGLAND     JAGUAR               37,135.00     44,390.00     
            JAGUAR               55,970.00     67,455.00 
            JENSEN               74,700.00     89,250.00 
            TRIUMPH              21,460.00     25,500.00 
FRANCE      PEUGEOT              23,155.00     28,050.00 
ITALY       ALFA ROMEO           28,300.00     34,100.00 
            ALFA ROMEO           28,300.00     34,100.00 
            ALFA ROMEO           24,575.00     29,625.00 
            MASERATI            125,000.00    157,500.00 
JAPAN       DATSUN               13,130.00     15,695.00 
            TOYOTA               14,430.00     16,695.00 
W GERMANY   AUDI                 25,315.00     29,850.00 
            BMW                  29,000.00     29,700.00 
            BMW                  30,000.00     31,775.00 
            BMW                  50,000.00     68,760.00 
            BMW                  55,000.00     70,615.00 
            BMW                  41,500.00     45,485.00 
            BMW                  42,000.00     47,475.00 

Now issue the /PO command. You can see that the report output was appended to the stack:

             JAGUAR               55,970.00     67,455.00  
             JENSEN               74,700.00     89,250.00  
             TRIUMPH              21,460.00     25,500.00  
 FRANCE      PEUGEOT              23,155.00     28,050.00  
 ITALY       ALFA ROMEO           28,300.00     34,100.00  
             ALFA ROMEO           28,300.00     34,100.00  
             ALFA ROMEO           24,575.00     29,625.00  
             MASERATI            125,000.00    157,500.00  
 JAPAN       DATSUN               13,130.00     15,695.00  
             TOYOTA               14,430.00     16,695.00  
 W GERMANY   AUDI                 25,315.00     29,850.00  
             BMW                  29,000.00     29,700.00  
             BMW                  30,000.00     31,775.00  
             BMW                  50,000.00     68,760.00  
             BMW                  55,000.00     70,615.00  
             BMW                  41,500.00     45,485.00  
             BMW                  42,000.00     47,475.00  
                                                           
                                                           
>                                                          
===>                                   CURRENT OUTPUT  LINE

Issue the /PC command to display the most recent FOCUS command lines stacked:

TABLE FILE CAR                                             
PRINT CAR DCNEW RCNEW                                      
BY COUNTRY                                                 
END                                                        
===>                                   CURRENT INPUT   LINE

Issue the /PC command again to go back to the previous FOCUS command line stacked:

SET SCREEN = OFF                                           
TABLE FILE CAR                                             
PRINT CAR DCNEW RCNEW                                      
BY COUNTRY                                                 
END                                                        
===>                                   CURRENT INPUT   LINE

Issue the /PC command again. The following lines display:

DEFINE FILE CAR                                            
DCNEW/D10.2 = DEALER_COST * 5;                             
RCNEW/D10.2 = RETAIL_COST * 5;                             
END                                                        
SET SCREEN = OFF                                           
TABLE FILE CAR                                             
PRINT CAR DCNEW RCNEW                                      
BY COUNTRY                                                 
END                                                        
===>                                   CURRENT INPUT   LINE

Information Builders