HP 3000 Manuals

COBEDIT Commands [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

COBEDIT Commands 

There are 10 commands in the COBEDIT program.  Each is listed in Table
G-1  and discussed on the following pages.  Note that user input is
underlined in each example of the commands.

          Table G-1.  COBEDIT Commands 

---------------------------------------------------------------------------
|                   |                                                     |
|      Command      |                       Meaning                       |
|                   |                                                     |
---------------------------------------------------------------------------
|                   |                                                     |
| BUILD             | Build a COPYLIB file.                               |
|                   |                                                     |
| COPY              | Copy modules into the library as in the BUILD       |
|                   | command.                                            |
|                   |                                                     |
| EDIT              | Create or edit a module to add to a COPYLIB file.   |
|                   |                                                     |
| EXIT              | Leave the COBEDIT program.                          |
|                   |                                                     |
| HELP              | List all COBEDIT commands.                          |
|                   |                                                     |
| KEEP              | Add a module to the currently active COPYLIB file.  |
|                   |                                                     |
| LIBRARY           | Activate an already existing COPYLIB file.          |
|                   |                                                     |
| LIST              | List text-names or one or more modules of the       |
|                   | currently active COPYLIB file.                      |
|                   |                                                     |
| PURGE             | Purge a module of the currently active library or   |
|                   | purge the library itself.                           |
|                   |                                                     |
| SHOW              | Show the name of the current library, its key file  |
|                   | and the latest module to be accessed.               |
|                   |                                                     |
---------------------------------------------------------------------------

BUILD Command 

The BUILD command allows you to build a new KSAM file to be used as a
library file.  Once this library file is built, it remains open and
available for use until you exit the COBEDIT program, or specify a new
library by issuing another BUILD command or a LIBRARY command.

Syntax.   

     BUILD [ file-name ] [ ,maxrecs ]

Parameters.   

file-name             any name you wish to give your new library file,
                      subject to the naming conventions for any MPE file.
                      The file-name may be from one to eight alphanumeric
                      characters, the first of which must be alphabetic.

maxrecs               if specified, must be greater than 0.  It specifies
                      the maximum number of records that may be placed in
                      the file being built.  If no value is specified for
                      maxrecs, the default is 2500.

Description.   

If a file name is not specified, COBEDIT prompts you for one.  After you
are prompted for a name, a second chance to provide a file name is given
if RETURN is pressed.  If RETURN is pressed again, the BUILD command is
terminated and no library file is created.

If you name a file in the BUILD command, or if a name is specified when
COBEDIT prompts you for one, you are next prompted for a name to be used
as the key file for the library file being created.

The restrictions on the key file name are the same as for file-name.

If RETURN is pressed, an MPE file system error message is listed,
followed by an error message from COBEDIT. Then, the BUILD command is
terminated.

Once a library file and an associated key file have been named, the
COBEDIT program attempts to create a KSAM file using the specified names.
If this attempt fails, an MPE error message is generated.  Otherwise, you
are given the opportunity to copy a file into your newly created library
file.  When the file name prompt is given and, if you respond with a
carriage return, the BUILD command is terminated.  To copy a file into
the library file, the name of the file must be typed in response to the
prompt.  This name can be fully qualified and specified in the form
filename.group.account.

You must have the capability to access files in a group or account other
than your own.  One of the ways this is accomplished is by using the MPE
RELEASE command.  See the MPE XL Commands Reference Manual for details.
Also, see the Account Structure and Security Reference Manual for details
on file security and access.

If you do not have access to the specified file, the following message is
returned:

     SECURITY VIOLATION (FSERR 93)
     BUILD TERMINATED

After the file has been specified, you are asked if the file is in
COPYLIB format.  This is equivalent to asking you if the file to be
copied has text-names in columns 73 through 80.

If you respond with Y for YES, COBEDIT attempts to copy the requested
file.  Note that if the text-name is blank, the COBEDIT program copies
the records into your library and assigns a default text-name, BOO-BOO.

If a negative response is given, COBEDIT asks you for a text-name to be
used for the copied records.  This text-name must be from one to eight
characters long.

After a file has been copied into your library, you are asked if there
are more files to be copied.  A negative response terminates the BUILD
command.  A positive response causes the COBEDIT program to repeat the
questions and actions described in the preceding three paragraphs.


NOTE If the file to be copied is in copylib format and has duplicate copies of one or more modules, COBEDIT gives an error message.
Examples. To illustrate the BUILD command, user input is underlined: >BUILD What is the name of your library file? MYLIB Name a key file to be used with MYLIB: KMYLIB To copy a file into MYLIB now, enter the file name. File name? COBCOPY Is the file in copylib format? NO Text-name for library module? MODULE1 5 records copied to library file. Do you wish to copy more files? Respond YES or NO: NO Library file created; requested file(s) copied. > >BUILD MYLIB Name a key file to be used with MYLIB: MYLIBKEY Unable to create KSAM file DUPLICATE PERMANENT FILE NAME (FSERR 100) > Note that if you name a file to be copied into your library file and the library file does not have a sufficient amount of free space to contain the records of the file being copied, no records are copied and the BUILD command is terminated. A library file that is too small to contain the records from a specified file is used to illustrate this. >BUILD ATLAS, 3 Name a key file to be used with ATLAS: KEYATLAS To copy a file into ATLAS now, enter the file name. File name? COBCOPY NOT ENOUGH ROOM FOR FILE COBCOPY 0 records copied to library file. BUILD TERMINATED > [REV BEG] If you are building a KSAM/XL COPY library, the name of the key file is ignored because KSAM/XL files do not use a key file. When the BUILD command prompts you for a key file name, press the RETURN key. Example. To create a KSAM/XL copy file: :FILE MYLIB;KSAMXL :COBEDIT >BUILD *MYLIB Name a key file to be used with *MYLIB: <RETURN> : Library file created. [REV END] COPY Command The COPY command allows you to copy additional modules into a library that was created previously using the BUILD command. To use COPY, the library must be the current library or it must be activated by using the LIBRARY command. COPY prompts and executes in a way similar to the BUILD command. Syntax. COPY Example. :RUN COBEDIT.PUB.SYS HP32233A.02.00 COPYLIB EDITOR - COBEDIT MON, MAR 26, 1991, 10:12 AM (C) HEWLETT-PACKARD CO. 1986 TYPE "HELP" FOR A LIST OF COMMANDS. >COPY No library is open. >LIB MYLIB >COPY To copy a file into MYLIB now, enter the file name. File name? COBCOPY Is the file in copylib format? NO Text-name for Library module? MOD2 13 records copied to library file. Do you wish to copy more files? Respond YES or NO: NO Requested file(s) copied. >EXIT END OF PROGRAM EDIT Command The EDIT command calls the EDIT/3000 subsystem, and optionally allows you to name a module from the currently active library to be edited. Syntax. EDIT [ text-name ] Parameters. text-name the name of a module in the currently active library. Description. EDTXT is created by COBEDIT as a permanent file when required for edit operations. EDTXT is purged by COBEDIT when no longer required. Thus, only one user per logon group can be editing any library file. EDTXT is the name of the temporary text file used as the interface between COBEDIT and EDIT/3000. If you name a module to be edited, a copy of the module, excluding the text-name in columns 73 through 80, is moved into EDTXT. If a module is not named, a single blank record with a record number of .001 is moved into EDTXT. This blank record is placed in EDTXT in order to place the EDIT/3000 work file in COBOL format. If you do not want to use the blank record, delete it. Once you have entered the EDIT/3000 subsystem, any of its features, except two can be used to perform any editing task. The two features you cannot use are the TEXT and KEEP commands. The TEXT command cannot be used since EDTXT is automatically used as the TEXT file when you enter the EDIT command. However, you can use the JOIN command to append ASCII files to EDTXT. The KEEP command cannot be used for the same reason. An automatic KEEP is issued, naming EDTXT as the KEEP file. Example 1. >EDIT HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:15 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL .001 /D .001 *** WARNING *** WORK FILE IS EMPTY. /A 1 $CONTROL SUBPROGRAM 1.1 PROGRAM-ID. FRESHTEST. 1.2 AUTHOR. JAMES FISH. 1.3 // ... /KEEP MINE INVALID COMMAND /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD?Y > In the example above, note the error message, INVALID COMMAND, which follows a KEEP command attempted while in the EDIT/3000 text editor. You can not use the EDIT/3000 KEEP command to keep the file MINE because an automatic KEEP is issued, naming EDTXT as the KEEP file. However, to keep the data entered in EDTXT in your copylib, you must use the COBEDIT KEEP command. The COBEDIT KEEP command is fully explained later. Example 2. >EDIT MODULE1 Previous Edit text was not saved. OK to clear? (Y/N) Y HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:18 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL 1. SORT-PARA. 1.1 SORT SORTFL ON ASCENDING KEY FIRST-KEY 1.2 INPUT PROCEDURE IS INP-SECTION 1.3 OUTPUT PROCEDURE IS OUTP-SECTION 1.4 THROUGH OUTP-END-SECTION. /ADD 1.5 INP_SECTION. 1.6 OPEN INPUT FILE-IN 1.7 IF IN-REC IS ALPHABETIC 1.8 THEN RELEASE IN-REC 1.9 ELSE NEXT SENTENCE. 2.0 CLOSE FILE-IN. 2.1 OUTP-SECTION. 2.2 OPEN OUTPUT FILE-OUT. 2.3 IF SORT-REC IS NOT NUMERIC 2.4 THEN RETURN SORTFL RECORD INTO FOR-WRITE 2.5 WRITE REC-OUT FROM FOR-WRITE; 2.6 ELSE NEXT SENTENCE. 2.7 OUTP-END-SECTION. 2.8 CLOSE FILE-OUT. 2.9 // ... /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD?Y > In the example above, when the EDIT command is issued, the module named MODULE1 is specified. Note the message immediately following the EDIT command above. This message is issued because the data stored in EDTXT was not kept to the library file before the EDIT command was issued. Since the response to the CLEAR question is Y (yes), EDTXT is cleared, and the records of MODULE1 are copied into it. Also, although records have been copied from MODULE1, the records of MODULE1 are still in the library file. These are kept in the library file by issuing a KEEP command for the records in EDTXT, using a different text-name, or the same name. Example 3. As a final illustration of using the EDIT command, a file created outside of the COBEDIT program is joined to the work space associated with EDTXT. >EDIT Previous Edit text was not saved. OK to clear? (Y/N) N > >KEEP MODULE4 >EDIT HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:21 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL .001 /M MODIFY .001 R* THIS MODULE IS CREATED BY JOINING THE FILE, FROMEDIT, * THIS MODULE IS CREATED BY JOINING THE FILE, FROMEDIT /A .101* TO THE CURRENT WORK FILE. .201// ... /JOINQ FROMEDIT NUMBER OF LINES JOINED =2 /L ALL .001* THIS MODULE IS CREATED BY JOINING THE FILE, FROMEDIT, .101* TO THE CURRENT WORKFILE. .201* THIS LINE AND THE FOLLOWING WERE JOINED TO THE WORK .301* FILE FROM THE FILE, FROMEDIT. /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD? Y > EXIT Command The EXIT command is used to exit the COBEDIT program. Syntax. E[XIT] Description. To exit COBEDIT, type EXIT or E. If you have used the EDIT command, and no KEEP command was issued before the EXIT command is executed, the following message is displayed: Edit text not empty. OK to clear? If you respond with anything except Y or YES, the EXIT command terminates, and COBEDIT remains active. A Y or YES response causes COBEDIT to clear EDTXT, close the currently active library, and cease execution. If a KEEP command has been performed for the current contents of EDTXT, or if the EDIT command was not used during the current execution of the COBEDIT program, then when the EXIT command is executed, COBEDIT ceases execution with no warning message. Example 1. >EDIT HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:25 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL .001 /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD? Y >EXIT Edit text not empty. OK to clear? Y END OF PROGRAM : Example 2. :RUN COBEDIT.PUB.SYS HP32233A.02.00 COPYLIB EDITOR - COBEDIT MON, MAR 26, 1991, 10:26 AM (C) HEWLETT-PACKARD CO. 1986 TYPE "HELP" FOR A LIST OF COMMANDS. >E END OF PROGRAM : Example 3. :RUN COBEDIT.PUB.SYS HP32233A.02.00 COPYLIB EDITOR - COBEDIT MON, MAR 26, 1991, 10:27 AM (C) HEWLETT-PACKARD CO. 1986 TYPE "HELP" FOR A LIST OF COMMANDS. >LIB MYLIB >LIST ALL Text-name MODULE1 001000$CONTROL SUBPROGRAM 001100 IDENTIFICATION DIVISION. 001200 PROGRAM-ID. DUMMY-SUB. Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. Text-name MODULE3 008000 PERFORM TEST-IT. 008100 IF RESULTANT IS LESS THAN 2 008200 PERFORM TEST-FAILED; 008300 ELSE NEXT SENTENCE. >EDIT HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:28 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL .001 /A .101* THIS IS TO SHOW WHAT HAPPENS WHEN A KEEP COMMAND .201* IS ISSUED BEFORE THE EXIT COMMAND IS USED. .301// ... /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD? Y >KEEP MOD4 >E END OF PROGRAM : HELP Command The HELP command lists and gives a brief description of all commands available in the COBEDIT program. Syntax. HELP Example. > HELP The following is a list of COBEDIT commands: BUILD library-name [ , filesize ] Create a new library file with name "library-name". COPY Copy modules into library, as in Build command. EDIT [ text-name ] Activate EDIT/3000 and text in that module of the current library which contains "text-name" in the id field. EXIT Exit the COBEDIT program. HELP Display a list of COBEDIT commands. KEEP [ text-name ] Insert an (edited) module in the current library. LIBRARY library-name Designate "library-name" as the current library. LIST [ text-name ] [ ALL ] Display all or part of the current library on $STDLIST. With no parameter, will list the text-names of the current library. PURGE { text-name } { ALL } Delete a module from the current library. The ALL option will purge the entire library. SHOW Display an information block for the current library. :{ MPE Command } Certain MPE commands may be executed from COBEDIT. KEEP Command The KEEP command allows you to add a module to the currently active library, or replace an already existing module. Syntax. KEEP [ text-name ] Parameters. text-name is the name to be used for the module being kept. Description. If the module to be kept is one that already exists on the file, and you named that module in a previous EDIT command, you do not have to specify a text-name in the KEEP command. In this case, you are asked if you want to replace the module in the library. Example 1. >LIST MYLIB >LIST ALL Text-name MODULE1 001000$CONTROL SUBPROGRAM 001100 IDENTIFICATION DIVISION. 001200 PROGRAM-ID. DUMMY-SUB. Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. Text-name MODULE3 008000 PERFORM TEST-IT. 008100 IF RESULTANT IS LESS THAN 2 008200 PERFORM TEST-FAILED; 008300 ELSE NEXT SENTENCE. Text-name MOD4 000101* THIS IS TO SHOW WHAT HAPPENS WHEN A KEEP COMMAND 000201* IS ISSUED BEFORE THE EXIT COMMAND IS USED. >EDIT MODULE1 HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:32 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL 1. $CONTROL SUBPROGRAM 1.1 IDENTIFICATION DIVISION. 1.2 PROGRAM-ID. DUMMY-SUB. /M 1.2 MODIFY 1.2 PROGRAM-ID. DUMMY-SUB. RTEST-KEEP. PROGRAM-ID. TEST-KEEP. /A 1.3 AUTHOR. MYSELF. 1.4// ... /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD? Y >KEEP "MODULE1 " already exists on Library MYLIB. OK to clear? Y >LIST ALL Text-name MODULE1 001000$CONTROL SUBPROGRAM 001100 IDENTIFICATION DIVISION. 001200 PROGRAM-ID. TEST-KEEP. 001300 AUTHOR. MYSELF. Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. Text-name MODULE3 008000 PERFORM TEST-IT. 008100 IF RESULTANT IS LESS THAN 2 008200 PERFORM TEST-FAILED; 008300 ELSE NEXT SENTENCE. Text-name MOD4 000101* THIS IS TO SHOW WHAT HAPPENS WHEN A KEEP COMMAND 000201* IS ISSUED BEFORE THE EXIT COMMAND IS USED. Example 2. >EDIT HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 10:36 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /MODIFY MODIFY .001 I*THIS MODULE WILL BE ADDED TO MYLIB BY *THIS MODULE WILL BE ADDED TO MYLIB BY /A .002*USING A TEXT NAME IN THE KEEP COMMAND .003// ... /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD?Y >KEEP MOD5 >LIST ALL Text-name MODULE1 001000$CONTROL SUBPROGRAM 001100 IDENTIFICATION DIVISION. 001200 PROGRAM-ID. TEST-KEEP. 001300 AUTHOR. MYSELF. Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. Text-name MODULE3 008000 PERFORM TEST-IT. 008100 IF RESULTANT IS LESS THAN 2 008200 PERFORM TEST-FAILED; 008300 ELSE NEXT SENTENCE. Text-name MOD4 000101* THIS IS TO SHOW WHAT HAPPENS WHEN A KEEP COMMAND 000201* IS ISSUED BEFORE THE EXIT COMMAND IS USED. Text-name MOD5 000101* THIS MODULE WILL BE ADDED TO MYLIB BY 000201* USING A TEXT NAME IN THE KEEP COMMAND. Note that if you use the KEEP command without a text-name, and the data in EDTXT was not entered by using text from an already existing module, the message Invalid text-name is returned. Also, if the KEEP command is issued, and you have issued no EDIT command since, then when another KEEP command is issued, the message Edit file is empty is returned. LIBRARY Command The LIBRARY command allows you to select the library that you wish to access. When you issue this command, the currently active library is closed, and the specified library is opened and made available. Syntax. LIBRARY library-name Parameters. library-name is the name of the library file you want to access. Description. It can be in any group and account. Note that only one user at a time can be editing a particular library file. COBEDIT opens the library file exclusively. The fully qualified form of a library name is the same as for all MPE files. Note that you can specify the name of the currently active library, even though it is already open. This has no effect on the COBEDIT program. If no library name is specified in the LIBRARY command, COBEDIT prompts you for one. When the LIBRARY command executes, it checks to make sure that the file named is a valid library file. If it is not, an appropriate error message is generated by the MPE file system, and a COBEDIT error message occurs in the following two cases. The two cases are: when no file of the specified name exists, and when an error occurs while trying to open the file. Example. >LIB Library name? MYLIB >SHOW ************************************************ Library file: MYLIB.MANAGERS.USERS Text-name: Key file: KMYLIB ************************************************ >LIB COPYLIB >SHOW ************************************************ Library file: COPYLIB.MANAGERS.USERS Text-name: Key file: KCOPYLIB ************************************************ >LIB CLIB.PUB.USERS SECURITY VIOLATION (FSERR 93) FILE CLIB.PUB.USERS NOT OPENED. >:TELL WENDY.USERS; PLEASE RELEASE FILE CLIB FOR UPDATE FROM /S21 WENDY.USERS/ IT'S RELEASED NOW >:TELL WENDY.USERS; THANKS >LIB CLIB.PUB.USERS >SHOW ************************************************ Library file; CLIB.PUB.USERS Text-name: Key file: CLIBKEY.KING.USERS ************************************************ In the previous examples, the LIBRARY command is used to obtain access to three different files. The first use of the command specified no library. COBEDIT therefore prompted for one. The third attempt to use the LIBRARY command failed, since the desired library, CLIB, resides in a group other than the logon group, MANAGERS. The availability of MPE commands in COBEDIT make it easy to request that the file be released. Once the file is released, obtaining access to it presents no problem. The SHOW command is used to show which library file is currently open and available. As a final example of the LIBRARY command, an attempt to open a non-existent file is made: >LIBRARY FROTH NONEXISTENT PERMANENT FILE (FSERR 52) FILE FROTH NOT OPENED. LIST Command The LIST command allows you to list information about your currently active library. The information available is a list of all module names within the library, or a list of all or one of the modules in the library. A control Y terminates the listing. If no library is open (you have not built one, or used the LIBRARY command to name one, or purged the latest one, and have not opened another), the response to executing a LIST command with or without parameters is No library file is open. Syntax. LIST [text-name] [ALL ] Parameters. text-name is the name of a module in the currently active library. ALL indicates that all modules in the library are to be listed, beginning with the first module on the file, and proceeding to the last. Description. If neither text-name nor the word ALL is used in the LIST command, only the names of the modules in the library are returned.
NOTE The listing is directed to the $STDLIST device. If you wish to obtain a "hard copy" listing, the $STDLIST device can be redirected by using the :RUN command or by executing COBEDIT in a batch job.
The following examples illustrate the use of redirection and batch jobs. Example of Redirection. :FILE PRINT; DEV=LP :RUN COBEDIT.PUB.SYS;STDLIST=*PRINT HP32233A.02.00 COPYLIB EDITOR - COBEDIT MON, MAR 26, 1991, 10:43 AM (C) HEWLETT-PACKARD CO. 1986 TYPE "HELP" FOR A LIST OF COMMANDS. >LIB COPYLIB >SHOW >LIST ALL >EXIT Example of Batch Job. :JOB LIBPRINT,USER.ACCOUNT :RUN COBEDIT.PUB.SYS LIB COPYLIB SHOW LIST ALL EXIT :EOJ Example. >LIBRARY MYLIB >LIST Text-names of modules in MYLIB: MODULE1 MODULE2 MODULE3 MOD4 MOD5 >LIST MODULE2 Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. >LIST ALL Text-name MODULE1 001000$CONTROL SUBPROGRAM 001100 IDENTIFICATION DIVISION. 001200 PROGRAM-ID. TEST-KEEP. 001300 AUTHOR. MYSELF. Text-name MODULE2 005100 WORKING-STORAGE SECTION. 005200 01 UNIV-TOTALER PIC 9(8) COMP-3. 005300 01 UNIV-ACCUM PIC 9(8) COMP-3. Text-name MODULE3 008000 PERFORM TEST-IT. 008100 IF RESULTANT IS LESS THAN 2 008200 PERFORM TEST-FAILED; 008300 ELSE NEXT SENTENCE. Text-name MOD4 000101* THIS IS TO SHOW WHAT HAPPENS WHEN A KEEP COMMAND 000201* IS ISSUED BEFORE THE EXIT COMMAND IS USED. Text-name MOD5 000101* THIS MODULE WILL BE ADDED TO MYLIB BY 000201* USING A TEXT NAME IN THE KEEP COMMAND. PURGE Command The PURGE command allows you to purge either a single module from your currently active library, or the entire library. If you choose to purge the entire library, it no longer exists after successful execution of the PURGE command. Syntax. PURGE {text-name} {ALL } Parameters. text-name is the name of a module to be purged from the currently active library. This is the module to be purged. ALL indicates that you want the entire library, including its key file, to be purged. Description. If you specify ALL in the PURGE command, COBEDIT double checks to be sure that you want the entire library file purged. COBEDIT displays the following message where library-name is the name of your currently active library: Is it OK to purge library library-name? If the response is not Y or YES, purging does not occur and the current library file remains active. If an affirmative response is not given, the following message is returned: COBOL library file library-name purged. Example. To illustrate the PURGE command, a file called MESSEDUP is used. This library contains only two modules. The first is a module copied into it at the time MESSEDUP was created. This module has no text-name associated with it. Thus, it is accessed with the default text-name assigned by COBEDIT that is BOO-BOO. >LIB MESSEDUP >LIST ALL Text-name BOO-BOO 000101* THESE RECORDS WERE COPIED INTO MESSEDUP FROM AN ASCII 000201* FILE, AND SINCE THE COBEDIT PROGRAM THOUGHT IT WAS IN 000301* COPYLIB FORMAT, IT ASSIGNED THE DEFAULT TEXT-NAME, BOO-BOO. Text-name M1 001000$CONTROL USLINIT 002000 IDENTIFICATION DIVISION. 003000 DATA DIVISION. 004000 PROCEDURE DIVISION. >PURGE M1 >LIST ALL Text-name BOO-BOO 000101* THESE RECORDS WERE COPIED INTO MESSEDUP FROM AN ASCII 000201* FILE, AND SINCE THE COBEDIT PROGRAM THOUGHT IT WAS IN 000301* COPYLIB FORMAT, IT ASSIGNED THE DEFAULT TEXT-NAME, BOO-BOO. >PURGE ALL Is it OK to purge library MESSEDUP? YES COBOL Library file MESSEDUP purged. >LIST ALL No library file is open. SHOW Command The SHOW command is used to find out the name of the currently active library, its key file, and the name of the module that was most recently accessed by COBEDIT. If no library is open, the message No library is open occurs. Syntax. SHOW Example. :RUN COBEDIT.PUB.SYS HP32233A.02.00 COPYLIB EDITOR - COBEDIT MON, MAR 26, 1991, 11:03 AM (C) HEWLETT-PACKARD CO. 1986 TYPE "HELP" FOR A LIST OF COMMANDS. >SHOW No library is open. >LIB MYLIB >SHOW ************************************************ Library name: MYLIB.USERS.MANAGERS Text-name: Key file: KMYLIB ************************************************ >EDIT MOD5 HP32201A.07.20 EDIT/3000 TUE, MAR 26, 1991, 11:04 AM (C) HEWLETT-PACKARD CO. 1990 NOTE: FORMAT=COBOL VALUES SET FOR LENGTH,RIGHT,FROM,DELTA,FRONT /L ALL .101*THIS MODULE WILL BE ADDED TO MYLIB BY .201*USING A TEXT NAME IN THE KEEP COMMAND /A .301*THIS LINE IS ADDED TO SHOW THE EFFECT OF USING .401*THE SHOW COMMAND WHEN A MODULE HAS BEEN ACCESSED. .501// ... /E EDTXT ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD? Y >SHOW ************************************************ Library name: MYLIB.USERS.MANAGERS Text-name: MODS Key file: KMYLIB ************************************************ >KEEP MOD6 >EXIT END OF PROGRAM :


MPE/iX 5.0 Documentation