How to delete a blank program name or a program name with bad characters

How to delete a blank program name or a program name with bad characters

THIS MANTIS KBA ADDRESSES BOTH:
- HOW TO DELETE A PROGRAM WITH A BLANK PROGRAM NAME
- HOW TO DELETE A PROGRAM WITH BAD CHARACTERS IN THE PROGRAM NAME

HOW TO DELETE A PROGRAM WITH A BLANK PROGRAM NAME (from Vantive Resolution 78320)
---------------------------------------------------------------------------------

Take a backup of your SETPRAY and EEPR clusters.

Situation 1
-----------

Here is the easier way to delete a program with a blank program name. This should work for all releases.

Select option 1 from the MANTIS menu (Run A Program By Name).
Enter program:  CONTROL:LINE_EDIT
Answer "yes" to question presented.
Enter   LOAD " "      < ---  this is a LOAD command with a double quote followed by a SPACE followed by a double quote
Enter LIST            < ---- this will allow you to view the program. You can SAVE it under a valid name … or
Enter PURGE " "       < ---- this is a PURGE command with a double quote followed by a SPACE followed by a double quote
Enter QUIT            < ---- this will exit you from line editor

Cleanup the EEPR by logon to library MASTER | Select 'MANTIS Utilities' | then select 'Purge All Extraneous EEPR'.

Verify the program doesn't show in the original Library user's Facility Selection Menu | Design a Program | List view or in the Directory Facility or Enhanced Directory Facility | Programs list.
 

OR :

Situation 2
-----------

If you have a program with a blank (spaces) name it does not appear in the program design list, but it does appear in the directory list.  This program can cause problems doing certain functions, such as trying to print all of the programs for a user.

Diagnosis:
In order to delete the program you must first find out the complete SETPRAY key for the program.  It consists of a 
* 1-byte user code
* 2-byte entity code
* 32-byte name
* 1-byte sequence number

1) To find out the user code, sign on to MASTER, then go to user design and inspect the user record for that user.  At the bottom of the panel is the "internal user code" in both decimal and hexadecimal.  For example you may see:
Internal User code  .................Dec: 18  Hex: 0012

In this example, you need the second byte of the Hex code, that is, 12.

2) The entity code for programs is always x'0002'.

3) The name is spaces, so it is x'40404040...'.   It is sufficient to use a generic key for the name.

4) The sequence number starts with 00 and progresses upward.  There could be more than one record that you need to delete.

Therefore, for example, the key of the record(s) that you want to delete is x'120002404040...'


Corrective action:

Once you have the program's key, there are three ways to delete the record(s).

1)  Use a tool that allows you to access the file from CICS or the operating system, if the file is not open to CICS.  Point the tool to the record and delete it.  Attempt to fetch it again and delete if there.  Continue this process until you reach a non-blank program record.

2) Define a new cluster and REPRO up to that key and REPRO from the next record after that key to the new cluster.  In the example above, the two REPRO statements would look like:
REPRO INFILE(xxxxx) OUTFILE(yyyyy) FROMKEY(X'00') TOKEY(X'120001')
REPRO INFILE(xxxxx) OUTFILE(yyyyy) FROMKEY(X'12000241') TOKEY('FF')

3) Define a new sequential VB file. REPRO the SETPRAY cluster to the sequential VB file. Input the sequential VB file to a SORT which EXCLUDEs the bad key records and outputs to another sequential VB file. REPRO the output sequential VB file to a new KSDS SETPRAY cluster.

Once the record(s) are deleted, cleanup the EEPR and verify the program doesn't appear in program lists (see Situation 1 steps).



HOW TO DELETE A PROGRAM WITH BAD CHARACTERS IN THE PROGRAM NAME
---------------------------------------------------------------

Take a backup of your SETPRAY and EEPR clusters.

Situation 1
-----------

1)  Under the library user containing the program name with bad characters, do a Purge of the program. i.e. Use Facility Selection Menu | Design a Program | List view and enter Purge before the program name. Once in the Purge Program Entry Screen, hit <PF7> to Confirm.

Note: a Refresh (<PF5>) of the List screen will still show the program but it will now be empty. It is no longer on the SETPRAY but it is still in the EEPR.

2) To cleanup the EEPR, logon to library MASTER. Select 'MANTIS Utilities' then select 'Purge All Extraneous EEPR'.

3) Log back onto the original library user and confirm that the program list(s) no longer show the purged program.

Situation 2
-----------

In the case when Situation 1 will not fix the problem, you will need to resort to manually fixing the problem by doing something like in "HOW TO DELETE A PROGRAM WITH A BLANK PROGRAM NAME Situation 2" but instead for the program name with bad characters.

Please contact MANTIS Cincom Support if you have any questions on these instructions.