HPlogo KSAM/3000 Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 USING KSAM UTILITIES

KSAMUTIL UTILITY

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

KSAMUTIL provides a number of capabilities, among which is the essential capability to create KSAM files. For a COBOL, BASIC, or RPG programmer, KSAM files can be created only through the BUILD command of the program KSAMUTIL. Although SPL and FORTRAN programmers can create KSAM files with the FOPEN intrinsic (described in section IV), the BUILD command may still provide these users with the simplest method for creating a KSAM file.

RUNNING KSAMUTIL

To pass control to KSAMUTlL, use the MPE command:

 

   :RUN KSAMUTIL.PUB.SYS

In a session, KSAMUTIL prompts with the greater-than sign (>) in column 1 to which you respond with the command you want to execute. In a job, you enter the command in column 1 of the record following the RUN command. No prompt character precedes the KSAMUTIL commands in batch mode.

Refer to Table 2-1 “Summary of KSAM Utilities” for a list of the KSAMUTIL commands and their functions.

COMMAND ABBREVIATIONS. All KSAMUTIL commands, except ERASE and PURGE, can be abbreviated. Most abbreviations allow the first letter of the command name. For example, >BUILD can be specified as >B, and >EXIT can be specified as >E. The three command names beginning with K (>KEYDUMP, >KEYSEQ, and >KEYINFO) are abbreviated to two letters to distinguish one from the other. As shown in Table 2-1 “Summary of KSAM Utilities”, these abbreviations are, respectively, >KD, >KS, and >KI.

RUNNING MPE COMMANDS FROM KSAMUTIL. Once you are running KSAMUTIL and you want to use an MPE command, you need not exit from KSAMUTIL and return to MPE; simply type the colon prompt (:) following the KSAMUTIL prompt (>) and then enter the MPE command. For instance, if you want to list the files in your account and group from KSAMUTIL, enter the LISTF command as shown:

 

   >:LISTF

OPTION TO LIST DISPLAYS ON LINE PRINTER. Four KSAMUTIL commands display file information; these are VERIFY, KEYDUMP, KEYSEQ, and KEYINFO. Each of these has an option that allows you to list the information on a line printer rather than display it on your terminal. If you include the keyword OFFLINE as an option in any of these commands, the requested information is sent to the line printer. If you want the list sent to a particular line printer, you can use a :FILE command naming the KSAM list file "KSAMLIST" as the formal designator. For example, suppose you are running KSAMUTIL and want to list the current information on a KSAM file and you want this information listed on a particular line printer:

 

   >:FILE KSAMLIST; DEV=SLOWLP <---- select particular line printer.

   >VERIFY MYFILE; OFFLINE <--------- specify output to go to an offline device

   WHICH (1=FILE INFO, 2=KSAM PARAMETERS, 3=KSAM CONTROL, 4=ALL)? 4 <----request all information 

The resulting output is sent to the line printer identified as SLOWLP.

OPTIONAL PARAMETERS. Wherever a command parameter is shown with brackets, [], that parameter can be omitted. For certain commands, SAVE, VERIFY, KEYDUMP, KEYSEQ, and KEYINFO, the filereference parameter is optional if no other parameters are specified. When this parameter is omitted, it assumes a prior command has specified a filereference and it uses the last filereference to identify the selected file. For example, assume you use the VERIFY command twice in a row, once to list the requested output on the line printer, and then to display it at your terminal. To do this, you can use the following command sequence:

 

   :RUN KSAMUTIL 

   >VERIFY MYFILE; OFFLINE 

   WHICH (1=FILE INFO, 2=KSAM PARAMETERS, 3=KSAM CONTROL, 4=ALL)?4 



   (output is sent to the line printer) 



   >V <------------------------------ previous file reference to MYFILE is assumed 

   WHICH (1=FILE INFO, 2=KSAM PARAMETERS, 3=KSAM CONTROL, 4=ALL)? 4 



   (output appears at your terminal) 

Note that you cannot issue these commands in reverse order because the filereference parameter can be omitted only if there are no other parameters. Thus, it is not legal to use command >VERIFY MYFILE followed by >VERIFY; OFFLINE.

EXITING FROM KSAMUTIL

When you have finished using KSAMUTIL in a session, you can return to the MPE operating system with the command:

 

   >EXIT or >E 

In a batch job, the EXIT command is specified in column 1 of the record that terminates the program; the greater-than sign is not included. The keyword EXIT can be abbreviated as E.

Feedback to webmaster