Start Printer Emulation (STRPRTEML)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Start Printer Emulation (STRPRTEML) command starts 3270 printer emulation using a binary synchronous communications (BSC) or Systems Network Architecture (SNA) emulation printer device and a printer device file. The STRPRTEML command is used to print host system (System/370 type) information on an iSeries system. It is used when the user is working on an iSeries system and the information is on a System/370 type system.

More information is in the 3270 Device Emulation Support book, SC41-5408.

Top

Parameters

Keyword Description Choices Notes
EMLCTL Emulation controller, or Name Optional, Positional 1
EMLDEV Emulation device, or Name Optional, Positional 2
EMLLOC Emulation location Communications name Optional, Positional 3
PRTDEV Print device Name Optional
JOB Job name Name, *EMLDEV Optional
ENDBKTEJT End Bracket eject *NO, *YES Optional
PRTFILE Printer file Qualified object name Optional
Qualifier 1: Printer file Name, QPEMPRTF
Qualifier 2: Library Name, *LIBL, *CURLIB
TIMOUTEJT Timeout wait eject Single values: *NONE, *IMMED
Other values: Element list
Optional
Element 1: Minutes 0-99
Element 2: Seconds 0-59, 0
DFRPRTOUT Defer printing spool output *PRTFILE, *YES, *NO Optional
SPOOL Spool output *PRTFILE, *YES, *NO Optional
OPNPRTF Open printer file *IMMED, *RCVDTA Optional
NUMCOL Print positions per line 1-378, *PRTFILE Optional
NUMLIN Lines per page 1-255, *PRTFILE Optional
LPI Lines per inch *PRTFILE, 6, 3, 4, 7.5, 7,5, 8, 9 Optional
MSGQ Message queue Single values: *DSPDEV, *NONE
Other values: Qualified object name
Optional
Qualifier 1: Message queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
CHRSET Language character set *SYSVAL, AGB, AGE, AGI, AGM, ALI, ALM, BGB, BGE, BLI, BLM, BRB, BRE, CAB, CAE, CAI, CAM, CLB, CLE, CYB, CSB, CSE, DMB, DMI, DME, DMM, ESB, FAB, FAI, FAE, FAM, FNB, FNI, FQB, FQI, FNE, FNM, ICE, GKB, GNB, GNE, HIB, HNB, HNE, ICB, ICI, ICM, INB, INI, IRB, ITB, ITE, ITI, ITM, JEB, JEI, JKB, JPB, JPE, JUB, KAB, KOB, LTB, LAE, LVB, MKB, MKE, NCB, NCE, NEB, NEI, NEE, NEM, NWB, NWE, NWI, NWM, PKE, PLB, PLE, PRB, PRI, PRE, PRM, RCB, RMB, RME, ROB, ROE, RUB, RUE, SFI, SFM, SGM, SGI, SKB, SKE, SPB, SPE, SPI, SPM, SQB, SQE, SSB, SSI, SWB, SWI, SSE, SSM, SWE, SWM, TAB, THB, THE, TKB, TKE, TRB, TRE, UAE, UKB, UKI, USB, USI, UKE, UKM, USE, USM, VNE, YGI, YGM, *TRNTBL Optional
SBMJOB Submit job *YES, *NO Optional
JOBD Job description Qualified object name Optional
Qualifier 1: Job description Name, QBATCH
Qualifier 2: Library Name, *LIBL, *CURLIB
TRNTBLOUT Outgoing translation table Single values: *CHRSET
Other values: Qualified object name
Optional
Qualifier 1: Outgoing translation table Name
Qualifier 2: Library Name, *LIBL, *CURLIB
JOBQ Job queue Single values: *JOBD
Other values: Qualified object name
Optional
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
ENDCOND End emulation conditions Single values: *NONE
Other values (up to 3 repetitions): *DACTLU, *ENDBKT, *UNBIND
Optional
FORMFEED Acknowledge form feed *YES, *NO Optional
EMLCFGE Configuration entry Name, QEMDFTCFGE, *NONE Optional
Top

Emulation controller (EMLCTL)

Specifies the name of a BSC controller description or SNA controller description that has attached 3270 printer emulation device descriptions. When this parameter is specified, the printer emulation job uses a 3270 printer emulation device attached to this controller description. The requester must be authorized to the controller and at least one device, and the device must be available.

Either this parameter, the Emulation device (EMLDEV) parameter, or the Emulation location (EMLLOC) parameter is required.

Top

Emulation device (EMLDEV)

Specifies the name of a BSC or an SNA printer emulation device (EMLDEV(3284, 3286, 3287, 3288, or 3289)) that is used by the printer emulation job to do a type 3270 printer emulation. The user must be authorized to the device, and the device must be available.

Top

Emulation location (EMLLOC)

Specifies the emulation remote location name that describes the location of the 3270 printer emulation devices. This name is defined during device description configuration and refers to the remote location where communication takes place. When this parameter is specified, an available printer emulation device is selected from those referred to by the location. At least one printer emulation device referred to by the location must be available, and the job running emulation must be authorized to use the device.

Either this parameter, the Emulation controller (EMLCTL) parameter, or the Emulation device (EMLDEV) parameter is required.

Top

Print device (PRTDEV)

Specifies the name of the printer used with this printer device file to print the output. This parameter is ignored if the printer data is spooled. If the output is not spooled and the printer device is being used at the time the job is initiated, the emulation session ends.

Note: If a printer name is not specified, the output is sent to the printer device specified on the Device (DEV) parameter of the Create Printer File (CRTPRTF) command. This printer device can be displayed by using the Display File Description (DSPFD) command.

Top

Job name (JOB)

Specifies a job name for the printer emulation job. If the EMLDEV parameter is not specified, and a batch job is to be submitted (*YES is specified for the Submit job (SBMJOB) parameter), a job name must be specified. This parameter is ignored when *NO is specified for the SBMJOB parameter.

*EMLDEV
The job name is the same as the printer emulation device name.
job-name
Specify a name for this printer emulation job.
Top

End Bracket eject (ENDBKTEJT)

Specifies whether SNA printer emulation should force out the emulation output when an SNA End Bracket (EB) is received from the host system. Emulation output is forced out by closing and then reopening the emulation printer file specified in the PRTFILE parameter. When the emulation printer output is ejected, a page eject is performed. The parameter uses the default value of *NO for BSC printer emulation.

*NO
The emulation output is not forced out when SNA printer emulation receives an End Bracket.
*YES
The emulation output is forced out when SNA printer emulation receives an End Bracket. This is done only if the open printer file contains host system data.
Top

Printer file (PRTFILE)

Specifies the printer device file that prints data received from the host system. The printer device file can be spooled or not spooled.

QPEMPRTF
The standard printer file (which specifies SPOOL(*YES)) shipped with the emulation program is used as the printer device file.
printer-device-file-name
Specify the name and library of a user-defined printer device file.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the printer device file. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the library where the printer device file is located.
Top

Timeout wait eject (TIMOUTEJT)

Specifies whether printer emulation forces out the emulation output when a time-out has occurred while waiting for host system data. The emulation output is forced out only if the open printer file contains host system data. The wait interval can be specified in number of minutes or seconds. If a value is specified for both minutes and seconds, then these values will be added together.

Note: When the emulation printer output is ejected, a page eject is also performed.

*NONE
The emulation output is not forced out based on a specified timeout period.
*IMMED
The emulation output is forced out immediately.
minutes-seconds
Specify a time-out wait interval in minutes or seconds or both.
Minutes
Valid values range from 0 through 99.
Seconds
Valid values range from 0 through 59.
Top

Defer printing spool output (DFRPRTOUT)

Specifies whether spooled output is printed immediately or is delayed. This parameter is ignored when *NO is specified for the Spool output (SPOOL) parameter.

*PRTFILE
The SCHEDULE value for the printer file controls how the spooled output is printed.
*YES
Spooled output is printed when the spooled file is closed.
*NO
Spooled output can be printed before the spooled file is closed. The printed output does not contain all the data sent by the host system until the spooled file is closed. If the printer is not using spooling, this parameter is ignored.

Note: Once the printer starts printing output from 3270 device emulation, spooled output from other jobs sharing the printer does not print until the spooled file that is currently printing is complete.

Top

Spool output (SPOOL)

Specifies whether the output data for the printer device file is spooled. If *NO is specified on this parameter, output is sent to the printer specified on the Print device (PRTDEV) parameter. If the output is spooled, it is sent to the output queue specified on the Spooled output queue (OUTQ) parameter of the Create Printer File (CRTPRTF) command for the printer file specified on the PRTFILE parameter. The Output Queue value can be displayed by using the Display File Description (DSPFD) command and specifying the printer file name.

Note: If *JOB is specified on the OUTQ parameter, output is sent to the output queue specified on the OUTQ parameter of the job description specified on the JOBD parameter. This value can be displayed by using the Display Job Description (DSPJOBD) command and specifying the job description name.

*PRTFILE
The value specified on the Spool output (SPOOL) parameter of the Create Printer File (CRTPRTF) command determines whether spooling is performed.
*YES
The data is spooled.
*NO
The data is not spooled; it is sent directly to the device and is printed as the output becomes available.
Top

Open printer file (OPNPRTF)

Specifies when the printer file is opened during the SNA 3270 printer emulation session. If the printer data is not spooled, then the printer will be allocated to your job when the printer file is opened. If the printer data is spooled, then the spool writer is allocated to your job after the printer file is opened depending on the value of the DFRPRTOUT parameter.

This parameter is not allowed if specified for BSC 3270 printer emulation.

*IMMED
The printer file is opened immediately after starting the 3270 printer emulation session.
*RCVDTA
The printer file is opened after first receiving print data from the host system.
Top

Print positions per line (NUMCOL)

Specifies the number of columns in a line when creating the printed output.

*PRTFILE
The printer file PAGESIZE(width) value contains the number of columns per line. This value is used if *IMMED is specified on the open printer file (OPNPRTF) parameter, or *RCVDTA is specified on the OPNPRTF parameter and the maximum print positions (MPP) value is not sent from the host system. Otherwise, the MPP value sent from the host system is used.
number-of-columns
Specify the number of columns per line in the printed output. Valid values range from 1 through 378.
Top

Lines per page (NUMLIN)

Specifies the number of lines per page when creating the printed output.

*PRTFILE
The printer file PAGESIZE(length) value contains the number of lines per page. This value is used if *IMMED is specified on the open printer file (OPNPRTF) parameter, or *RCVDTA is specified on the OPNPRTF parameter and the maximum page length (MPL) value is not sent from the host system. Otherwise, the MPL value sent from the host system is used.
number-of-lines
Specify the number of lines per page in printed output. Valid values range from 1 through 255.
Top

Lines per inch (LPI)

Specifies the number of lines per inch when creating the printed output.

*PRTFILE
The printer file LPI value contains the number of lines per inch. This value is used if *IMMED is specified on the open printer file (OPNPRTF) parameter, or *RCVDTA is specified on the OPNPRTF parameter and the set line density (SDL) value is not sent from the host system. Otherwise, the SDL value sent from the host system is used.
lines-per-inch
Specify the number of lines per inch in the printed output. Valid values are 3, 4, 6, 7.5, 7,5, 8 and 9. Values 3, 7.5 and 7,5 are valid only for double-byte character set (DBCS) printer devices.
Top

Message queue (MSGQ)

Specifies the message queue to which operational messages for this device are sent.

*DSPDEV
The current display station message queue is used.
*NONE
No messages are sent to message queues other than the job log for the printer emulation job.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the message queue. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the library where the message queue is located.
message-queue-name
Specify the name and library of the message queue where messages are sent when the printer emulation job is running.
Top

Language character set (CHRSET)

Specifies the 3-character country or region keyboard language identifier which represents a specific full character identifier (CHRID - comprised of a character set and code page) that is used by the printer being emulated.

*SYSVAL
The current QKBDTYPE system value is used.
country-keyboard-identifier
Specify the country or region keyboard language identifier to be used.
*TRNTBL
Allows a user-defined translation table to be used. The character translation is defined in the translation table specified by the Outgoing translation table (TRNTBLOUT) parameter. The CHRID associated with the QKBDTYPE system value will be used by the printer being emulated.
Top

Submit job (SBMJOB)

Specifies whether the printer emulation should be done as a separate job or as part of this job.

*YES
A specific job is submitted to do the printer emulation. The job attributes are determined from the job description specified by the Job description (JOBD) parameter. The job uses your user profile.
*NO
Printer emulation is done in the current job.
Top

Job description (JOBD)

Specifies the job description for the job that is being submitted for 3270 printer emulation. This parameter is ignored when *NO is specified for the Submit job (SBMJOB) parameter.

QBATCH
The job description QBATCH is used for the job.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the job description name. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the library where the job description name is located.
job-description-name
Specify the name and library of the job description associated with the job.
Top

Outgoing translation table (TRNTBLOUT)

Specifies the outgoing translation table used to translate characters sent from the host system to 3270 Emulation.

*CHRSET
Specify that translation is done when data is sent from the host system using the character set specified on the Language character set (CHRSET) parameter.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the translation table. If no current library entry exists in the library list, QGPL is used.
library-name
Specify the library where the translation table is located.
table-name
Specifies the name and library of the table which is used for outgoing translation.
Top

Job queue (JOBQ)

Specifies the name of the job queue in which this 3270 printer emulation job is placed. This parameter is ignored when *NO is specified for the Submit job (SBMJOB) parameter.

*JOBD
The submitted job is placed in the job queue associated with the job description specified in the (JOBD) parameter.
job-queue-name
Specify the name and library of the job queue to contain the submitted job.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the job queue. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the library where the job queue is located.
Top

End emulation conditions (ENDCOND)

Specifies additional ways in which the SNA 3270 printer emulation session can end.

This parameter is not allowed if specified for BSC 3270 printer emulation.

*NONE
No additional ways to end 3270 printer emulation are requested.
*DACTLU
The 3270 printer emulation session ends if it receives an SNA DACTLU from the host system.
*ENDBKT
The 3270 printer emulation session ends if it receives an SNA end bracket from the host system. Please consider the following before selecting this end condition:
  • This end condition should be used only when you need to print one host system file for the duration of the session. An end bracket may occur after printing the first file, and the 3270 session ends before a second file can print.
*UNBIND
The 3270 printer emulation session will end if it receives an SNA UNBIND from the host system. Please consider the following before selecting this end condition:
  • This end condition should be used only when you need to print one host system file for the duration of the session. An UNBIND may occur after printing the first file, and the 3270 session will end before a second file can print.
Top

Acknowledge form feed (FORMFEED)

Specifies whether to acknowledge a form-feed instruction located in the first character position of the first print line for a 3270 Information Display System data-stream compatibility (DSC) LU3 printer.

This parameter is ignored for an SNA character string (SCS) LU1 printer.

*YES
The form-feed instruction is acknowledged. The print position advances to a new page.
*NO
The form-feed instruction is ignored. The print position does not advance to a new page.
Top

Configuration entry (EMLCFGE)

Specifies whether a configuration entry is used for this session. Configuration entries indicate 3270 emulation configuration options. Configuration entries are created with the Add Emulation Configuration Entry (ADDEMLCFGE) command.

*NONE
No configuration entry is named and the configuration entry defaults are used.
QEMDFTCFGE
The default configuration entry QEMDFTFGE is used. This entry is shipped with configuration entry defaults, and can be updated with the Change Emulation Configuration Entry (CHGEMLCFGE) command.
configuration-entry-name
Specify the name of the configuration entry to be used. If the configuration entry named does not exist in the configuration file, the configuration entry defaults are used.
Top

Examples

Example 1: Printing Data to Standard Emulation Printer File

STRPRTEML   EMLDEV(HOSTPRT4)

This command starts a batch job by accepting data from the HOSTPRT4 device and prints the data to the standard emulation printer file (QPEMPRTF). The job is named HOSTPRT4 and runs until the job is canceled. Messages are sent to the current work station message queue.

Example 2: Emulating a Printer in the Current Job

STRPRTEML   EMLDEV(HOSTPRT5)  SBMJOB(*NO)

This command does printer emulation in the current job by accepting data from the HOSTPRT5 device, and writing the data to the standard emulation printer device file (QPEMPRTF). The request is active until it ends through the End Printer Emulation (ENDPRTEML) command, or until the job is canceled.

Example 3: Printing Output Immediately

STRPRTEML   EMLCTL(EMLCTL1)  TIMOUTEJT(10)
            DFRPRTOUT(*NO)  NUMLIN(96)

This command starts a batch job by accepting data from the device and printing the data in printer file QPEMPRTF. If a timeout of 10 minutes occurs, printer emulation forces out the emulation output. The output prints immediately; the maximum number of lines per page is 96.

Top

Error messages

*ESCAPE Messages

CPF85EB
3270 device emulation session ended.
CPF85ED
Values other than ENDCOND(*NONE) are not supported.
CPF85EE
*RCVDTA on the OPNPRTF parameter is not supported.
CPF8510
Internal error occurred on device &1.
CPF8511
Emulation ended by errors on device &2.
CPF8512
Emulation ended because device &2 was held.
CPF8513
Emulation ended by errors on device &2.
CPF8514
Error recovery stopped on device &1.
CPF8515
3270 emulation session ended by host.
CPF8516
No match between host and device &2.
CPF8517
Received more than maximum number of fields allowed.
CPF8518
Emulation ended because of internal failure in system.
CPF8519
Function check in 3270 emulation.
CPF8561
Printer emulation not started.
CPF8564
Printer emulation job &3/&2/&1 ended.
CPF8570
Translate of 3270 printer data stream failed.
CPF8579
Cannot open printer file &1 in library &2.
CPF8580
File &1 is not a printer file or has been overridden.
CPF8582
Cannot open printer file &1 again in library &2.
CPF8583
Printer emulation cannot open required file.
Top