Using XEDIT to Create FOCEXECS
This introduces you to XEDIT, a text processing facility which easily enables you to create, modify and save your own FOCUS programs, or FOCEXECS as they are called.
Getting Started
Log on to your account and pass through all the usual CPS screens into Native FOCUS. Choose the file month which you want to access and proceed to the point of beginning your FOCUS work (>).
Naming a Focexec
Determine a name for your focexec which is 8 characters or less, using any combination of letters and numbers. The name CPSDATA will be used throughout these instructions as an example. You are now ready to create a focexec.
Creating a Focexec
1. Type CMS X CPSDATA FOCEXEC. Press ENTER. This will change your screen as you move from within Native FOCUS to the XEDIT environment.
2. Type "i" (for input), then press ENTER. You are now in input mode.
3. Type in the lines of your FOCUS program. Press RETURN after typing in each line of the program.
4. When you are finished, press ENTER twice to exit from input mode.
Please note the PF key choices at the bottom of your XEDIT screen. These will enable you to quit, save and store your focexec, proceed through the 'pages' of your program by moving Up or Down or by moving to the Top (beginning) or Bottom (end) of your FOCEXEC.
Saving your Focexec
When you have completed your FOCEXEC, press PF12 in order to file and save your program. Your screen will now return to the Native FOCUS environment.
Running your Focexec
From within the Native FOCUS environment (at the >), type EX CPSDATA in order to execute your program. Your screen will indicate the word "running" in the lower righthand corner until your program is finished.
Modifying an Already-Existing Focexec
1. From within the Native FOCUS environment (at the >), type CMS X CPSDATA FOCEXEC. CPSDATA is a focexec which you have previously created. The screen will change as you again move from within Native FOCUS to the XEDIT environment. Your CPSDATA FOCEXEC will now appear on your screen.
2. Modify your focexec using the XEDIT commands described below. Please note that you may use the add and delete keys on your terminal to add and delete individual characters/letters/numbers in a line.
3. Press Enter when you finish making changes.
4. Press PF12 in order to file and save your completed program and return to Native FOCUS.
Creating a Focexec by Modifying an Already-Existing One
You may create new focexecs by simply making modifications to programs which already exist:
1. Assign a name to this new focexec (for example, CPSDATA2).
2. From within the Native FOCUS environment, type CMS X CPSDATA2 FOCEXEC. The screen will change as you move to the XEDIT environment.
3. Type GET CPSDATA. This will load your already-existing FOCEXEC CPSDATA onto the XEDIT screen.
4. Modify your focexec as desired using the XEDIT commands below.
5. Press ENTER as you finish making changes on one screen.
6. Press PF12 in order to file and save your new FOCEXEC, and return to Native FOCUS. You now have 2 focexecs saved - your original version of CPSDATA and your newly-modified CPSDATA2.
Viewing a List of FOCEXECS
From within Native FOCUS, type CMS L * FOCEXEC. This will result in a list of all of your focexecs.
Deleting a FOCEXEC
You may delete your CPSDATA FOCEXEC by typing CMS ERASE CPSDATA FOCEXEC.
Printing a Copy of a FOCEXEC
You may print a copy of your FOCEXEC on paper by typing CMS PRINT CPSDATA FOCEXEC.
Adding Descriptive Comments to FOCEXECS
You may add descriptive text to the beginning of your focexecs by simply typing -* at the beginning of each line of description. This will be a useful tool when you reach the point of having many focexecs saved, and will serve to remind you of the purpose of each focexec. For example:
-*This program calculates an unduplicated headcount of the
-*CX unit without using a hold file.
TFS
Count Empno
if EUC is CX
End
Basic Xedit Commands
The following commands are simple to remember, and are used to modify already-existing programs. The commands are typed in the prefix area which appears along the left side of the screen. The prefix area is 5 characters in length and contains a combination of zeros and numbers. To execute an Xedit command, simply type the command in the prefix area and press Enter.
Do all of your typing in lower case letters. The text is automatically changed to upper case letter when you press Enter.
If you make a mistake while typing, move the cursor to the incorrect letter and type the correct one over it. Notice that the space bar at the bottom of the keyboard moves the cursor forward a space at a time, just like on a typewriter, but it also erases anything you have typed in that space.
Some of the most frequently used Xedit commands are listed below:
Last updated April 10, 1998