FOCUS Facilities Under CMS

In this section:

 

The following topics describe the use of FOCUS facilities in the CMS environment.


Top of page

x
Using the LET Command

If you are in a CMS environment that defines the pound sign (#) to be the LINEND character and you are using FOCUS online, you cannot use pound signs in LET statements. This is because CP recognizes the pound sign as a LINEND symbol and passes the data to CMS as two separate lines, as if the Enter key had been pressed. You can solve this problem in two ways:

To query CMS on the status of your LINEND and escape characters, enter:

CMS CP QUERY TERM

If you are executing the LET statement from a FOCEXEC, you can use pound signs without changing the LINEND character or using the escape character. To save LET equivalences in a file, enter:

LET SAVE [filename]

The default file name is LETSAVE. The file type is FOCEXEC, and the file mode is A. For example, entering the command

LET SAVE EMPLET

saves the LET equivalences in the file EMPLET FOCEXEC A. Entering the command

LET SAVE

saves the LET equivalences in the file LETSAVE FOCEXEC A.


Top of page

x
Using FIDEL

The actual terminal control program is loaded dynamically, according to the program name you specify in the DATA VIA subcommand of MODIFY:

DATA VIA FIDEL
END

A DATA statement is not required in a MODIFY which uses CRTFORM if the procedure will be executed on a 3270-type terminal. FOCUS automatically loads FIDEL if the MODIFY procedure uses CRTFORM.


Top of page

x
Entering TED

How to:

You can edit a file with TED using the TED command or with your system editor using the IEDIT command.



x
Syntax: How to Enter TED
TED filename [filetype [filemode]] 

where:

filename

Is the name of the file you want to create or edit.

filetype

Is the type of file you are creating or editing. There are a number of different types of files. Each file type specifies what the file is going to be used for. The table below illustrates some of them. The default file type is FOCEXEC.

filemode

Is the identifier of the disk that holds your file. If you do not specify a file mode, TED assumes a file mode of A1, which means that the file will become part of a file collection called your A disk (A1).



Example: Editing TED

Note the following examples:

File Class

File Type

Example

MASTER

MASTER
TED EXPERSON MASTER

ACCESS

ACCESS
TED EXPERSON ACCESS

FOCEXEC

FOCEXEC
TED EXPERSON

TEMPORARY file

FOCTEMP
TED SAVE FOCTEMP

DATA file

DATA
TED EXPERSON DATA

Note: The maximum record length supported by TED under CMS is 159. Also, files containing non-printable characters may not be displayed.



Example: Creating a TED Profile

When you enter TED, it searches all disks for a file PROFILE TED. If the file is found, it is executed before control passes to the user. A typical profile might be

1. SCALE ON 
2. NUM ON 
3. PF6 FILE

where:

  1. Displays a scale on line 2 of the screen.
  2. Sets the prefix area on and displays line numbers.
  3. Redefines the PF6 key as FILE.


x
Syntax: How to Change a File Name in TED
FN newfilename

or

FILEName newfilename

where:

newfile

Is the new file name.



x
Syntax: How to Change a File Type in TED
FT newfiletype

or:

FILEType newfiletype

where:

newfiletype

Is the new file type.



x
Syntax: How to Change a File Mode in TED
FM newfilemode

or:

FILEMode newfilemode

where:

newfilemode

Is the new file mode.



x
Syntax: How to Issue CMS Commands From TED
CMS command

Note: Only certain CMS commands are allowed, since they are issued in CMS subset mode.


Top of page

x
Using GRAPH

FOCUS uses the IBM program product Graphical Data Display Manager (GDDM) to create graphics on IBM high-resolution devices (see the IBM GDDM Guide for Users).

A GDDM stub must be linked into FOCUS before GDDM graphics may be used. This must be performed once as part of the FOCUS installation procedure. See the CMS Installation Guide.

To run color graphics on the IBM 3270-type devices, the GDDM library must be available at run time either as TXTLIBs specified in a GLOBAL statement or as a segment in memory.

You can use GDDM facilities for saving deferred graphic output. After creating the graph to be saved on your screen, press PF1 to save it. A prompt will appear asking for the name of the "save" file. Enter a name and press the Enter key. Thus saved, the file can be retrieved by compiling and linking the GDDM program ADMUSF2 (see the IBM GDDM Guide for Users).

Use the IBM-supplied utility ADMOPUV to print GDDM graphs on the IBM 3287 printer. ADMOPUV is run using the file and address of the printer as parameters (see the IBM GDDM Guide for Users for more information).

To get SAVE files and printouts from FOCUS GRAPH:

  1. Generate a graph.
  2. To get a printout, press PF4. Respond to the resulting prompt with the local printer name. The graph will be routed to the printer right away if the background print utility job (ADMOPUT) is active. If it is not active, you have to repeat the procedure with the PF4 key when the background job is running.

The ADMOPUV utility supplied with GDDM must be running in the background to take the printer output from GDDM to a local printer. Details about this utility can be found in the IBM GDDM Guide for Users.

It takes from five to fifteen minutes to print a graph depending on its complexity and colors. Keep in mind that the screen has six colors while the printer has only four, so colors (except for red, blue, or green) appear as black.

You can use FOCUS to generate graphs in conjunction with IBM's Interactive Chart Utility (ICU is a component of PGF). Specify normal FOCUS GRAPH syntax to use any of its features. The ICU Interface can either place the user directly in the ICU environment, or can save the graph format and data for subsequent ICU processing. To use the ICU Interface, issue the command:

SET DEVICE=ICU

Subsequent GRAPH requests will use ICU to generate graphs. See the FOCUS ICU Interface User's Manual for further information.

When allocating your own file for storing non-GDDM deferred graphic output, specify only the fileid and the DISP parameter. Do not specify the DCB parameters. FOCUS specifies them when it writes the file.

You can send the output of many GRAPH commands to one graphics SAVE file by setting DISP MOD. If you do, however, make sure that all of the deferred graphic output is headed for the same graphic device.


Top of page

x
Accessing the FOCUS Menu

How to:

The FOCUS Menu is a convenient way to access FOCUS facilities using windows. It enables you to navigate through menu options, selecting FOCUS features such as the Talk technologies, DEFINE, JOIN, and query functions.



x
Syntax: How to Access the FOCUS Menu

Issue the command

EX FMMAIN 

or

Invoke the FOCUS menu automatically when you enter FOCUS by editing the file SHELPROF FOCEXEC (found on either the FOCUS production disk or on any accessed disk). Remove the comment characters from the line with the -INCLUDE command. The lines should appear as follows:

-* This FOCEXEC will be executed only after PROFILE focexec execution
-* has been completed.
-INCLUDE FMMAIN 

Top of page

x
Accessing the FOCUS ToolKit

How to:

The FOCUS ToolKit is a menu-driven tool that walks the end user through many FOCUS facilities. Topics listed on the ToolKit menu include: reporting facilities, maintain data, decision support, and dictionary maintenance. The ToolKit option supports FOCUS and operating system utilities, as well as access to SQL facilities. An online guide to using the system is also included. The ToolKit option may be customized to provide specific site information, user selections for print destination, and database access.

The files ISHFPROF DATA (the background window) and ISHDPNTR DATA (printer selection list) must be available when you execute the ToolKit. These files are created with the installation FOCEXEC ISHFINSTL. The printer list may be updated using the FOCEXEC ISHFPNTR.

The ToolKit dynamically accesses files that are identified to the ToolKit. This is accomplished by creating a FOCEXEC that performs the necessary accesses and USE statements for a given file. This FOCEXEC is named filename ISHFALOC, where filename is the name of the file (as used by FOCUS).



x
Syntax: How to Access the FOCUS ToolKit

Issue the command

EX ISHFSHLL 

or

Invoke the FOCUS ToolKit automatically when the user enters FOCUS by editing the file SHELPROF FOCEXEC, which is found on either the FOCUS production disk or on any accessed disk, to read:

EX ISHFSHLL
-EXIT 


Example: Dynamically Accessing Files Identified to the Toolkit

For example, the file CAR ISHFALOC accesses the CAR FOCUS data source:

-CMS CP LINK CARDATA 191 201 RR 
-CMS ACCESS 201 B 
USE ADD 
CAR FOCUS B 
END 
-EXIT 

Top of page

x
Accessing Power Reporter

How to:

Power Reporter is a user-friendly, full screen front end to the FOCUS Report Writer. Designed for both end users and application developers, it features pull down menus that enable users to create FOCUS report requests in non-linear order, preview the report format and generated code, and much more. Power Reporter provides the capability to create DEFINEs and JOINs, save requests for later revision, and display information about the FOCUS session. Power Reporter has a PC Windows look and feel and contains context-sensitive help.



x
Syntax: How to Access Power Reporter
EX PWREP 

Top of page

x
National Language Support

How to:

FOCUS is designed with consideration for National Language Support (NLS). FOCUS stores data as entered and retrieves the data based on the current code page mapping. FOCUS can be configured for local language messages and keyboards. For installation instructions, refer to the CMS Installation Guide. Your Information Builders' representative can provide a list of available language choices.

The ? LANG command can be used to determine the current language setting and parameters pertaining to language, such as continental decimal notation.



x
Syntax: How to Determine Current Language Settings
? LANG

FOCUS supports languages that require two bytes of storage per character, such as Kanji. For more information, see the Describing Data manual.


Top of page

x
Issuing CMS Commands From Within FOCUS

Valid CMS commands may be issued from within FOCUS by using the CMS prefix.

From within the SCAN facility, you can enter CMS followed by a valid CMS command on the same line. The line is passed to CMS for processing and resulting messages are from CMS.

All CMS commands that can execute in subset mode are valid; CMS itself decides which commands it will accept from inside FOCUS.

Valid CP commands should be prefixed with CMS CP. For example:

CMS CP QUERY TERM


Example: Issuing a CMS Command From FOCUS

The following issues the CMS LIST command:

CMS LIST * FOCEXEC A

Top of page

x
Extended Plists

z/VM FOCUS issues commands to CMS using CMS's Extended Plist. This enables FOCUS users to issue CMS commands such as STORMAP and PIPE that require the extended plist. It also enables FOCUS users to specify FILEDEF, ACCESS, and other CMS commands with parameters that are longer than eight characters. The standard plist or token plist uppercases each token, left-justifies it, and truncates it to a length of 8 bytes. Extended plist has no limit on the length of the plist passed.

FOCUS uses a FILEDEF for SYSIN to read from the terminal and from FOCEXECs. By default, FILEDEF uppercases all data. Reissuing FILEDEF with the LOWCASE option, allows a lowercase option list to be passed to z/VM. This requires all FOCUS commands to be typed in uppercase. This may be used for special cases when a lowercase plist is required.



Example: Issuing Commands With Extended Plist

Consider the following FILEDEF command:

FILEDEF MINE DSN TEST.SAMPLE.MAY

With extended plist, all of the data set name is preserved.



Example: Issuing Commands Without Extended Plist

Without extended plist, the command

FILEDEF MINE DSN TEST.SAMPLE.MAY

would read as:

FILEDEF
MINE
DSN
TEST.SAM

In this case, the data set name has lost the 'PLE.MAY' part of the qualifier. A tokenized plist is limited to 32 tokens, each of which may be between 1 and 8 bytes. The extended plist consists of a control block that points to an uppercase command token, a pointer to the start of the option list, and a pointer to the end of the option list. The option list is left unchanged.



Example: Issuing Direct Operating System Commands From Within Dialogue Manager: The -CMS Command

The Dialogue Manager statement -CMS is assumed to be an operating system control statement if the RUN statement is absent. It executes directly within Dialogue Manager. For instance:

-CMS FILEDEF MYINPUT DISK &FNAME DATA A1

After executing an operating system control statement, you can test the statistical variable &RETCODE to determine if it operated successfully. &RETCODE is the value returned by the operating system after an operating system statement executes.

If there is no error, the value of &RETCODE is returned as zero. The following example illustrates the usage of this test:

-CMS STATE MYTRANS DATA A1
-RUN
-IF &RETCODE NE 0 GOTO BAD ;
-CMS FILEDEF INDATA DISK MYTRANS DATA A1
MODIFY FILE SALES
.
.
.
DATA ON INDATA
END
-EXIT
-BAD TYPE TRANSACTION FILE NOT AVAILABLE
-EXIT

Note: Because FOCUS automatically executes all stacked commands whenever a statistical variable is encountered, the -RUN statement above is not necessary. However, we recommend that you include -RUN to make the procedure more readable.


Top of page

x
Interrupting FOCUS

Reference:

When you are in the FOCUS command environment, you can issue an external interrupt to stop execution of some commands (MODIFY, SCAN, TABLE, TABLEF, MATCH, and GRAPH) when operating in line mode. This results in an orderly closing of the FOCUS data file and/or suppression of the output. Issue an interrupt, then type either KX, KT, RT, FX or ? and press Enter.

Note: To interrupt down to CP level, press PA1. Then, type BEGIN to continue the session or a CP command such as IPL CMS to start a new CMS session.

The effect of each interrupt is as follows:

KX

Kill execution, stay in FOCUS.

KT

Kill typing till next terminal read.

RT

Resume typing.

FX

Kill execution, exit FOCUS.

?

Display current run-time statistics.

Other

Ignored, execution resumes.



x
Reference: Kill Execution: KX

This reply stands for "Kill Execution" and remain in FOCUS. It can be used with the GRAPH, MATCH, MODIFY, TABLE, TABLEF, and FSCAN commands. It tells FOCUS to halt execution and return you to the FOCUS command level outside all FOCEXEC procedures (that is, to the next command from SYSIN, which is generally the terminal). The interrupted command may terminate normally or it may be cut short. The FOCUS data file is closed in an orderly manner. The commands are terminated as follows:

MODIFY

At end of current transaction.

SCAN

At end of current subcommand.

TABLE, TABLEF, 
MATCH and GRAPH

At next data access or generation of an output line.

All others

Ignore the KX reply and continue to completion.



x
Reference: Kill Typing: KT

This reply stands for "Kill Typing" and can be used with GRAPH, MODIFY, FSCAN, TABLE, and TABLEF. It tells FOCUS to suppress output of the command but to allow the command to continue to completion. After you enter KT, nothing more will appear on the screen until the command finishes, when FOCUS will prompt you for the next command.

The KT feature is useful when FOCUS is producing a report of unexpected length. Suppressing output eliminates terminal I/O and speeds up processing. You can save the output in a file with the SAVE and HOLD commands, or you can display the output from the beginning with the RETYPE and REPLOT commands.



x
Reference: Resume Typing: RT

This reply stands for "Resume Typing" and is used after entering the KT subcommand in response to a previous interrupt. After you enter KT, nothing will appear on the screen until the command is finished executing. To have FOCUS resume display of the output, press the interrupt key and enter RT. FOCUS displays output with the first output record it produces after this latest interrupt.

The RT interrupt reply is useful for discovering how far FOCUS has gone in producing output. If you want to suppress output again, press the interrupt key and enter KT.



x
Reference: Kill Execution: FX

This reply stands for "Kill Execution" and exit FOCUS. It can be used with the GRAPH, MATCH, MODIFY, TABLE, TABLEF, and FSCAN commands. It tells FOCUS to halt execution and return you to the CMS session. The interrupted command may terminate normally or it may be cut short. The FOCUS data file is closed in an orderly manner. The commands are terminated as follows:

MODIFY

At end of current transaction.

SCAN

At end of current subcommand.

TABLE, TABLEF, MATCH FILE 
and GRAPH

At next data access or generation of an output line.

All others

Ignore the FX reply and continue to completion.



x
Reference: Display Statistics: ?

This reply can be used with the commands TABLE, TABLEF, GRAPH, MATCH, and MODIFY. It displays statistics on reports of record modifications that FOCUS has processed. Afterwards, FOCUS displays the output from the point where it was interrupted. The statistics are: the number of records in the report or the records modified by the MODIFY or FSCAN command, the number of lines in the report, and the number of I/O operations FOCUS performed to read or modify the data file.


Top of page

x
LOADLIBs Used by CMS FOCUS

How to:

FOCUS adds required LOADLIBs to the GLOBAL library list automatically, in addition to other optional LOADLIBs. FOCUS accomplishes this through the use of two CMS EXECs: FOCADLIB and FOCDELIB. Before adding LOADLIBs to the GLOBAL list, the existing list is saved. Then FOCUS adds the required and optional LOADLIBs in front of any libraries you may have specified before entering FOCUS. Upon exiting FOCUS, the prior GLOBAL environment is restored to the list specified before entering FOCUS. The LOADLIBs added when entering FOCUS are removed. The EXECs FOCADLIB and FOCDELIB must be found in the CMS search sequence (A-Z) during a FOCUS session.

Prior entries can be retained in the GLOBAL list and new entries added by using the FOCADLIB EXEC. To delete entries while maintaining others in the list, use the FOCDELIB EXEC. For both FOCADLIB and FOCDELIB, the output from the EXEC is the return code of the GLOBAL command.



x
Syntax: How to Add and Delete GLOBAL Libraries
CMS EX {FOCADLIB|FOCDELIB} libtype lib1 [lib2 lib3...] [(QUIET ]

where:

FOCADLIB

Adds libraries to the beginning of the GLOBAL library list.

FOCDELIB

Deletes libraries from the GLOBAL library list.

libtype

Is a library of type LOADLIB, TXTLIB, MACLIB, etc.

lib1...

Are the names of the libraries to be added or deleted.

QUIET

Suppresses messages from the GLOBAL command. The open parenthesis is required.

Note: FUSELIB routines now reside in FUSELIB LOADLIB (rather than in a TXTLIB). Issuing GLOBAL TXTLIB FUSELIB still works because the TXTLIB still exists. However, CMS loads routines from the LOADLIB before searching the TXTLIBs.


Information Builders