Options:
B -Print brief catalog (without date and time)
D -Sort by date/time
I -Generate an Input "import" listing (see below)
O -Generate an Output "export" listing (see below)
S -Sort by name
X -Suppress the command response
Y -Do not alter the command answer cells
Answers:
Ctl.Ans1 =The number of definition names displayed
Ctl.Ans2 =Zero
Ctl.Ans3 =Zero
Notes:
All of the Procedures (P), Menus (M), Reports (R), and Screens (S) you create via the DEFINE command are saved in the Application Catalog, and all of your Help definitions (H) are saved in the Help Catalog.
If you omit the def-type then the display is the entire table of contents of the Application Catalog. To see Help definitions or to see any given category of definitions, be specific and use one of the following definition type codes:
H Help definitions
P Procedure definitions
R Report definitions
G Graphical Report definitions
M Menu definitions
S Screen definitions
For example, CAT H displays the table of contents of the Help catalog.
To see the table of contents entry for a specific definition, supply its name. Also this optional def-name argument will support the use of the string wild card * and/or the character wild card ?. For example, if you wanted to see the TOC entries for all procedure definitions that start with the letters SP, you would say: CAT P SP*
The CAT command shows the table of contents. To see the content of a given definition, use LIST
.
The I and O options
Suppose you wanted to COPY every definition in your catalog, making each an independent file in your current folder (directory). If you had 500 definitions, you would have 500 copy commands to do. See COPY deftype
, forms 2 and 3.
The O option on the CAT command causes the command to output a listing of the COPY commands needed to copy every definition out to a file.
So now, if you could just put that listing in a file, you could get someplace. Enter the use of the PON
and POFF
commands. Do the following:
PON TEMP (Or any other filename you desire. See)
CAT/O ( "User Number
" for more information )
POFF ( about creating filenames. )
So now you have a file that consists of all the COPY commands you need to export your entire Catalog. The next step is to copy that file into your Procedure Catalog as a procedure:
COPY P *TEMP TO CopyOUT
Visit the procedure named "CopyOUT" with the Text Editor to eliminate any extraneous lines at the front and end of it:
DEFINE P CopyOUT
Save it, and now you have the procedure you need to accomplish the task of exporting your entire Catalog.
You will need the mirror-image procedure, the one to use in order to copy all of those definitions from your folder back into a fresh Catalog. This time employ the I option to get the neccessary COPY commands to create a CopyIN procedure:
PON TEMP
CAT/I
POFF
Import this into the procedure Catalog:
COPY P *TEMP TO CopyIN
Edit out extraneous lines:
Define P CopyIN
Save it, and now you have the procedure you need to accomplish the task of importing the entire set of definitions to a fresh Catalog.
Be sure to export these two new procedures back out to the folder so that they exist along with the rest of your definitions:
COPY P CopyOUT TO *CopyOUT
COPY P CopyIN TO *CopyIN
Now if you have a fresh Catalog (one created by compiling an AI in a folder without any existing Catalog in order to generate a fresh empty Catalog) and you want to import all of your definitions, you will need to "prime the pump" by importing the CopyIN procedure first:
COPY P *CopyIN TO CopyIN
Then run it to get the rest.
You can try the CAT/O or the CAT/I without doing the PON and POFF just to see what the listings look like.
If you wanted to do the same thing with your Help definitions, just use
CAT/O H
and
CAT/I H
surrounded by the PON and POFF as shown above. To see how to get a fresh empty Help Catalog, see "Creating Help
." And, of course, you would want to name these two new procedures differently, perhaps HCopyOUT and HCopyIN.