Saving Session Monitor Lines

How to:

You can store the contents of the Session Monitor stack in a sequential file (record length 80 bytes).


Top of page

x
Syntax: How to Save Session Monitor LInes

To store part of the stack contents in a file, move the pointer to the first line you want to save, and issue the following command

/SAVE [n] [filename]

where:

n

Is the number of lines in the stack you want to save.

filename

Is the name of the file where the stack is stored. If no name is specified, the default name is FOCSAVE.

Starting at the pointer, the SAVE command saves n lines of input, output, or both, depending on the display command issued prior to the SAVE command:

Previous Command

Effect of SAVE Command

/PP or /TOP

Stores both input and output lines.

/PI

Stores only input lines.

/PO

Stores only output lines.

/PC

Stores only command lines.

/LN

The type of lines stored depends on the previous display command, as described in Session Monitor Display Commands.

If the pointer is at the bottom of the stack, FOCUS does not recognize the /SAVE command. FOCUS does recognize /SAVE commands in FOCEXECs.

Once the file is saved, you can edit the file using the system editor (which you can invoke using the IEDIT command) or the TED editor. If you are using CMS and want to print a hardcopy of the file, use the CMS PRINT command.



Example: Saving Stacked Lines

Consider the following terminal session:

SET SCREEN = OFF              
>                             
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      
                                                          
 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 

Issue the /TOP command to display lines from the top of the stack:

===>                                   FIRST   LINE         
>                                                           
SET SCREEN = OFF                                            
>                                                           
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        
                                                            
 PAGE     1                                                 
                                                            
                                                            
 COUNTRY     CAR                      DCNEW         RCNEW   

Now issue the following commands:

/SAVE
TED FOCSAVE 

The FOCSAVE file contains all of the stacked lines. Issue the command QQ to exit the file without saving it.

Next issue the following commands:

/TOP
/PC 
/SAVE
TED FOCSAVE

The FOCSAVE file contains the FOCUS commands issued:

SET SCREEN = OFF              
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                           
TED FOCSAVE                   

Issue the command QQ to exit the file without saving it.

Next issue the following commands:

/TOP
/PO 
/SAVE
TED FOCSAVE

The FOCSAVE file contains the FOCUS output:

+>                                                          
+>                                                          
+>                                                          
0 NUMBER OF RECORDS IN TABLE=       18  LINES=     18       
                                                            
1 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 
                                                           
                                                           
+>                                                         
+>                                                         
+>                                                         

Issue the QQ command to exit the file without saving it.


Information Builders