PRINTER COMMAND STRING Maintenance
Printer Command String (PCS) Maintenance enables you to create and change printer command strings in the PCS.OUTPUT file in SYSFILES. You can also invoke this function by entering the PCSM command at the TCL prompt.
A printer command string (PCS) is print data that can be output as a prologue or an epilogue. A printer command string may be used to send control signals to the printer or it may be some kind of heading or trailing data for each print job. In other words, it can be whatever your system or a particular type of printer requires.
PCS Maintenance Menu
When you select option 3 on the SPM menu, the system displays the PCS maintenance menu as follows:
P R I N T E R C O M M A N D S T R I N G M A I N T E N A N C E =================================================================== 1. Build a PCS using the ED editor 2. Build a PCS using the SE editor 3. Process the PCS source definition 4. Produce the PCS output Enter PCS maintenance choice >
PCS Maintenance Prompt
The PCS maintenance prompt is the line:
Enter PCS maintenance choice
To select a maintenance option, enter its number at the prompt. The system will display a menu for that function.
To exit from this menu when the cursor is at the PCS maintenance prompt, press RETURN only.
Creating a PCS
A printer command string is created as follows:
- Use PCS maintenance options 1 or 2 to create a DataBasic source program that produces print data. The source resides in the PCS file.
- Use option 4 to execute the program to produce the printer command string output, which resides in the PCS.OUTPUT file.
DataBasic Elements for Creating a PCS
The program that you write to produce printer command string output must be written in a subset of the DataBasic language. The following are allowed:
- Assignment and declaration statements using expressions with literals and variables, including string and numeric operators, but ICONV and OCONV are not permitted.
- PRINTER ON statement.
- PRINT statement.
- END statement.
- PTR function.
For details on these elements refer to the DataBasic Reference.
Option 1 - Building a PCS Using the Editor
This option asks you for the name of the printer command string and puts you into the Editor to create or update the specified item. The results of your editing should be a DataBasic program that produces print data. After you perform this option, you must perform option 3 to process the updated source.
To create or update a printer command string using the
Editor enter 1
. The system prompts:
Enter PCS name.
Enter the name of the printer command string.
The system starts the Editor so that you can edit the item. Refer to the EDITOR Reference for how to create, update, and file items.
Option 2 - Building a PCS Using the Screen Editor
This option asks you for the name of the printer command string and puts you into the Screen Editor to create or update the specified item. The results of your editing should be a DataBasic program that produces print data. After you perform this option, you must perform option 3 to process the updated source.
To create or update a printer command string using the
Screen Editor enter 2
. The system prompts:
Enter PCS name.
Enter the name of the printer command string.
The system starts the Screen Editor so that you can edit the item. See Screen Editor Reference for how to create, update, and file items.
Option 3 - Processing the PCS Source Definition
This option compiles your printer command string source item to produce an executable program. After you perform this option, you must perform option 4 to produce the printer command string output.
To process a printer command string enter 3
. The system prompts:
Enter PCS name.
Enter the name of the printer command string.
The system compiles the printer command string into an executable program.
Option 4 - Producing the PCS Output
This option executes the printer command string program to produce a print data item in the PCS.OUTPUT file.
To produce printer command string output enter 4
. The system prompts:
Enter PCS name.
Enter the name of the printer command string.
The system executes the program to produce the printer command string output. It reports the name of the output with the message:
Print Job Id - PCS-name
PCS-name can be used as the name of a prologue or epilogue in a formqueue or Despooler definition.
PCS Name
The print job-id produced by option 4 is the name of the printer command string, the first time it is used. Subsequently, the name is suffixed with a four-digit number. For example, say you enter the printer command string name.
MYQPROL
The first time you produce printer command string output, the system assigns the output the name MYQPROL. The next time you produce output using the printer command string named MYQPROL, the system calls the output MYQPROL0001. Each subsequent output increases the suffixed number by one.