Trigger And Data Capture Guide www.objectiflune.
©2014 Objectif Lune Inc -2-
Copyright Information Copyright Information Copyright © 1994-2014 Objectif Lune Inc. All Rights Reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any other language or computer language in whole or in part, in any form or by any means, whether it be electronic, mechanical, magnetic, optical, manual or otherwise, without prior written consent of Objectif Lune Inc. Objectif Lune Inc.
©2014 Objectif Lune Inc -4-
Table of Content Table of Content Copyright Information 3 Table of Content 5 Overview 7 Icons used in this guide 7 Other Documentation 7 Capturing Data 9 Sample Data File 9 Spool File 9 Capture Sample Data for a Document You Install on a Printer 10 Capture Sample Data for a Document You Install in your PlanetPress Suite Workflow Tool 10 Capture Sample Data in Windows NT 11 Capture Sample Data in Windows 2000/Server 2003/XP 12 Capture Sample Data in Windows Host Using a Novell Print
©2014 Objectif Lune Inc -6-
Overview Overview This PDF documentation covers version 7.2. To view the documentation of previous versions please refer to the PDF files available in the Downloads section of our website: http://www.objectiflune.com/OL/Download/DownloadCenter. Icons used in this guide Some icons are used throughout this guide in order to catch your attention to certain particular information. Notes: This icon shows you something that complements the information around it.
©2014 Objectif Lune Inc -8-
Capturing Data Capturing Data This chapter provides procedures for capturing data on different platforms.
Capturing Data Capture Sample Data for a Document You Install on a Printer This procedure describes the general steps involved in capturing sample data for a document you intend to install on a printer. If you are using database emulation, you capture sample input data at the time you set up the emulation. An understanding of the general procedure for capturing a reliable sample data file can help you understand and navigate the platform-specific instructions.
Capturing Data 2. Determine the input mode you intend to use when you execute your document in your PlanetPress Suite Workflow Tool. The input modes you can use for data capture include Windows printer driver, lpd queue, directory, email, and serial capture. The input modes available depend on your platform and the type of connection that exists between the host on which the input data resides and the host on which PlanetPress resides.
Capturing Data Capture Sample Data in Windows 2000/Server 2003/XP You perform this procedure on the machine that controls the printer, not on the workstation. 1. In the Windows Start menu, choose Settings, then choose Printer. The Printers window appears. 2. Right-click on the printer on which you intend to execute your document and choose Pause printing. 3.
Capturing Data queue.You can then verify the file remains in the print queue by navigating to the print queue in Windows Explorer and verifying there is a spool file for the test page. The spool file has a .Q extension. You use the Volume and ID information you noted in step 4 to determine the path of the print queue. 8. Send your input data to the print server. 9. Retrieve the spool file for the input data from the print queue. In Windows Explorer, navigate to the print queue for the print server.
Capturing Data Note that you must create a PlanetPress Watch process before you send data from UNIX to the workstation running your PlanetPress Suite Workflow Tool. PlanetPress Suite Configuration To set up your PlanetPress Suite Workflow Tool to capture data sent using LPR: 1. In PlanetPress Watch Configuration, create a new PlanetPress Suite process by choosing Insert | New Process. 2. In the Process area, click the unknown task in the upper-left corner at the beginning of the data stream. 3.
Capturing Data 3. Press F10 followed by F9 to display the Remote Printer Queue parameter. 4. Enter the following information: l In the Remote system field, enter the string *INTNETADR. l In the Remote printer queue field, enter the name of the remote printer queue, enclosed in single quotes. The remote printer queue is the one located on the machine that will receive the input data. In this example, ‘PRINTER1’ is the remote printer queue name. 5. Press PAGE DOWN to display the Create Output Queue screen.
Capturing Data Internet address: The IP address of the workstation to which you will send the data. In this example, the address is 192.168.100.109. 7. Press PAGE DOWN. The next page of the Create Output Queue screen appears. 8. If you want to prevent a separator page from printing, enter *NO in the Print separator page field. Leave all other fields untouched. 9. Press ENTER to create the new generic output queue. A confirmation message appears at the bottom of the main menu.
Capturing Data 2. In the Name box, enter a name for the connection and click OK. The Connect To dialog box appears. 3. Select COM 1 or COM 2 and click OK. If you need to determine which COM port the printer uses, open the Control Panel, then open Modems and click Diagnostics. In most cases you select COM2. The remaining steps of this procedure assume you selected COM2. The COM2 Properties dialog box appears.
Capturing Data 4. Adjust the COM2 Properties and click OK. A HyperTerminal window for this connection appears. 5. In the menu for the HyperTerminal window, choose Transfer | CaptureText. The Capture Text dialog box appears. 6. The file name that appears in this dialog box is Capture.txt. If this file does not exist, you will need to create it (this is the text file that will be used as the capture file). 7. Click Start. 8.
Creating Triggers Creating Triggers This chapter describes platform-specific procedures for creating a trigger and inserting it at the head of a data stream. A job consists of a document, a trigger, and data. If you are not using any PlanetPress Suite Workflow Tool, you must manually create the appropriate trigger, add it to the head of the data stream, and send the result to the printer on which the document resides.
Creating Triggers run INVOICE Trigger Syntax What is the syntax of a trigger? In all syntax descriptions in this section, italics denote a variable, square brackets indicate the element is optional, denotes a carriage return and denotes a line feed. The general syntax for the first line of the trigger is the same for all triggers: [ printer-specific_commands ] %!PS-Adobe The first line of the trigger uses the string “%!PS-Adobe” to put the printer in PostScript mode.
Creating Triggers Trigger Syntax for Documents Installed in Flash Memory The general syntax of a trigger for a document that resides in the printer’s flash memory is: [ printer-specific_commands ] %!PS-Adobe (%flash%name_of_document) run name_of_document An example of the trigger for a document named PAYROLL that resides in the printer’s flash memory: %!PS-Adobe (%flash%PAYROLL) run PAYROLL Techniques for Inserting Triggers What are the common techniques for inserting a trigger
Creating Triggers 4. Press INSERT. 5. In the New Device Name dialog box, enter the name of the document you want to execute. For this example, enter Mailing. 6. In the Defined Print Devices dialog box, select Mailing and press ENTER. 7. In the Edit Device Options dialog box, select Device Functions. 8. Press INSERT. 9.
Creating Triggers 12. In the Function Definition dialog box, enter the following information: l In the Name field, enter Force PostScript l In the Escape Sequence field, enter the following sequence: %-12345X@PJL enter language = PostScript 13. Press ESCAPE. In the Save Changes dialog box, select Yes and press ENTER to save the changes. 14.
Creating Triggers 18. In the Call Mailing Functions dialog box, press INSERT. 19. In the Additional Mailing Functions dialog box, select Force PostScript and press ENTER. 20. The Call Mailing Functions dialog box should display Force PostScript. 21. Press INSERT. 22. In the Additional Mailing Functions dialog box, select Call Mailing. 23. Press ENTER.
Creating Triggers 24. Press ESCAPE to return to the Mailing Modes dialog box. 25. In the Mailing Modes dialog box, select (Re-initialize). 26. In the (Re-initialize) Functions dialog box, press INSERT. 27. In the Additional Mailing Functions dialog box, select Reset and press ENTER. 28. The (Re-initialize) Functions dialog box displays Reset. 29. In the Exit PrintDef dialog box, select Yes to save the changes. 30. In the Exit Options dialog box, select Save Data Base, then EXIT. 31.
Creating Triggers 34. Press INSERT. 35. In the Enter new name field, enter Mailing. 36. Press ENTER. 37. In the Edit Print Job Configuration "Mailing" dialog box, adjust only the following settings. Leave all others untouched. Options: Settings Print Queue: Printer where the intelligent document resides Device: Mailing Mode: Call Mailing Print Banner: No 38. Press ESCAPE and save the changes. To test the trigger installation: 1. In DosPrompt, enter pconsole to access pconsole. 2.
Creating Triggers 6. In the Current Queue Status dialog box, select No for the Servers can service entries in queue option. 7. Press ESCAPE several times to exit pconsole. 8. In the DOS prompt, enter the following line: /l=2 represents the LPT port to which the printer is connected. In this example, it is LPT2. 9. Return to pconsole. 10. In the Available Options dialog box, select Print Queue Information. 11. In the Print Queues dialog box, select Mailing. 12.
Creating Triggers 14. Press ESCAPE several times to exit pconsole. 15. In DOS, enter the following to create a sample spool file: c:\>dir>lpt2 16. In the drive on which the Sys Volume is mounted, enter the following lines: Y:\>cd system Y:\SYSTEM>dir *.qdr A list of all printer queues, including the one you just created, appears. The new printer queue has the same name as the Object ID noted earlier. 17. Enter the following: Y:\SYSTEM>cd 2F00000B.qdr Y:\SYSTEM>2F00000B>dir The following appears. 18.
Creating Triggers Implement a Trigger under Novell 4.x and 5.x with NDS or Bindery Printers It is important to create a "Print Device" for the "Organizational Unit" containing the printer you use to print the document. The "Print Job Definition" must be done for the "User" object, that is, for the "Organizational Unit" containing the "User" object used to do the "Capture". To create a print device: 1. Start the Netware Administrator (z:\win32\nwadmn32.exe). 2.
Creating Triggers 6. Select the newly created print device and click Modify. 7. You must now create three functions and a mode. Create the first function 8. Click Create Function. The Create New Function dialog box appears. 9. In the Create New Function dialog box, enter the following information: l In the Function name box, enter reset. l In the Control sequence box, enter %-12345X 10. Click OK. Create the second function 11. Return to the Create New Function dialog box. 12.
Creating Triggers Define the mode 17. In the Modify Existing Device dialog box, click Create Mode. 18. In the Name box, enter a meaningful name. For this example, enter Mailing. 19. Select the three functions you just created, in the following order: reset, Force Postscript, call mailing. For each function, select it in the Device functions list, then click Add Below. The order in which you select the functions is important. 20. Click OK. The Print Device is created with its functions and mode. 21.
Creating Triggers 22. Click Print Job Configuration (Non NDPS). 23. Click New. The Print Job Configuration dialog box appears. 24. In the Print Job Configuration dialog box, enter the following: l In the Print job name box, enter a descriptive name. For this example, enter Mailing. l Clear the Print banner and From feed boxes. l In the Printer/Queue box, enter the printer on which you intend to execute the document. The queue can be NDS or Bindery.
Creating Triggers l In the Mode box, select the name of the mode you created. 25. Close the Netware Administrator. 26. You must now configure the client's (user's) portion. First, use the Capture command to direct the network printer to a port such as LPT1. You must also use the J option in the command to include your "job definition". The following command works with the above example: CAPTURE Q=.OPTRA1650-NDS-PQ.PRINTERS.
Creating Triggers Users that perform the capture (with the J option) and have a generic printer pointing towards the LPT1 port can use the document configured in the Print Job Configuration. Note that certain versions of Windows have Generic Text pilots that can cause a well known problem: text aligned vertically instead of horizontally. To solve this problem, access the printer's properties. In the Fonts tab, add a space in every Font codes section.
Creating Triggers Implement a Trigger under Windows with TCP/IP These instructions use a separator page which adds the trigger to any job going through a specific text-only printer queue. This is useful in the case of legacy software or systems that can only print through text-based printers and where no control is possible over the contents of the job file. Step 1 - Create a printer queue Windows 2000/XP/2003 1. Click Start, then Printers and Faxes.
Creating Triggers 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Click Start, then Devices and Printers. Click on Add a printer Click on Add a local printer Select Create a new port , then select the StandardTCP/IP Port option. Click Next. Type in the printer's IP address or network name (for example, 192.168.100.213 or 10.0.0.163) then click Next (the Port Name will fill itself). Wait for the TCP/IP port detection to finish, leave the Device Type to Generic Network Card, then click Next.
Creating Triggers disk of the printer. We name the script mailing.scr and place it in the spool directory. 3. Edit the input filter using a text editor. For example, to edit it in the vi text editor, we issue the command: vi /var/spool/lpd/mailing.scr Enter the following lines in the text editor: #!/bin/sh /bin/echo "%!PS-Adobe" /bin/echo "(MAILING) run MAILING" cat /bin/echo -e \004 The first echo turns the printer to PS mode. The second echo calls the document.
Creating Triggers mailing:\ :sd=/var/spool/lpd/mailing:\ :mx#0:\ :sh:\ :lp=/dev/lp1: If you want to send the print job to a remote LPD server, use rm= to specify the remote print server, and rp= to specify the remote queue name. You specify the remote print server in the rm field using either the IP address or host name. For example: mailing:\ :sd=/var/spool/lpd/mailing:\ :mx#0:\ :sh:\ :rm=192.168.100.147:\ :rp=default: To create a spool directory by hand: l Use the following command, replacing mailing wi
Creating Triggers 4. Select Add a Print Queue. 5. Select Local.
Creating Triggers 6. Select Other, regardless of the type of printer. 7. Select Generic, regardless of the type of printer.
Creating Triggers 8. Select parallel or rs232. 9. Select the appropriate adapter(s).
Creating Triggers . 10. Enter the following values: ASCII: Name of virtual printer that prints from operating systems. GL Emulation: Laser printer configured on a workstation and used for Windows printing. Port number: Number of ports on the serial communication card. Baud rate: Port speed. Parity: Parity type. Flow control: Printer's protocol type. Printer time out: Time a printer can time-out before being DOWN. State to be configured at boot time: Always be at AVAILABLE.
Creating Triggers 1. In the /etc/hosts file, enter the IP address and print server name. 2. Follow step 1 through step 5 in To add a physical or virtual printer in series:. In step 5 select hpJetDirect. 3. Select Other, regardless of the type of printer. 4. Select Generic, regardless of the type of printer.
Creating Triggers 5. Select Do NOT make this system a BOOT/TFTP server. 6. Enter the following values: ASCII: Name of printer for AIX, Basic and Informix printing. GL Emulation: Laser printer configured on a workstation and used for Windows printing. HOSTNAME: Name entered in the /etc/hosts file. Port number: For JetDirect: 9100. For a three-port: Port 1 = 9100, Port 2 = 9101, Port 3 = 9102.
Creating Triggers To add a physical or virtual printer configured on another server: 1. In the /etc/hosts file, enter the IP address and print server name. 2. Follow step 1 through step 5 in To add a physical or virtual printer in series:. 3. Select Remote. 4. Select Local Filtering.
Creating Triggers 5. Select Other. 6. Select Generic.
Creating Triggers 7. Enter the following values: ASCII: Name of printer for AIX, Basic and Informix printing. GL emulation: Laser printer configured on a workstation and used for Windows printing. HOSTNAME: Name entered in the /etc/hosts file. Queue name: Name of the printing queue on the other server. Backend time-out: Length of time, in seconds, the AIX server waits for information from the printer before disconnecting the printer. The recommended value is 30.
Creating Triggers Add new printer: To create a new printer, select Add new printer. Return to step 8 in To add a physical or virtual printer in series:. Existing printer: To edit a new queue on the lp printer/device, select the appropriate printer. 3. Enter the name of the new printer. To modify the attributes of virtual printers: 1. Log in as dyaddm. 2. Execute Smit Printer. 3. Select Programming Tools.
Creating Triggers 4. Select Change / /Show Printer Attribute Database (Virtual Printers). 5. Select the virtual printer to modify.
Creating Triggers 6.
Creating Triggers 1. The following is an example of a command used to create a text library. 2. The following displays the details of the text library. A. VMS executable file (similar to a DOS batch file) 3. The following displays details of the information in the text library. A. Name of the text library (.TLB extension) B.
Creating Triggers 4. The following displays details of a port configuration for a LAT device: 5.
Creating Triggers ©2014 Objectif Lune Inc - 53 -
Creating Triggers Implement a Trigger with AS/400 Systems TCP/IP Printing When you implement a trigger for AS/400 systems, it is important to retrieve, edit and create a Workstation Customizing Object (WSCST). In the following procedure, LUNE is the WSCST name. It is recommended that you use a descriptive name such as the name of your document (for example, INVOICE or CHECK). To retrieve the WSCST source: 1. At the command line, enter RTVWSCST and press ENTER. 2.
Creating Triggers To edit the WSCST source: 1. At the command line, enter STRSEU and press F4. The following window appears. 2. Enter the source file name. For this example, QTXTSRC. 3. Enter the library name. For this example, OBJLUNE. 4. Press ENTER. The following window appears.
Creating Triggers 5. In the Opt column, enter 2 and press ENTER. The following window appears. 6. Replace INITPRT DATA = ' 00 ' X.
Creating Triggers '28464F524D292072756E20464F524D0D0A'X. The INITPRT string is the hexadecimal representation of the trigger. In the example, the trigger is: %-12345X@PJL ENTER LANGUAGE=POSTSCRIPT (FORM) run FORM In the example, the name of the document is FORM. Note: The bold characters in the INITPRT string are the letters FORM in hexadecimal (where 46=F, 4F=O, 52=R and 4D=M). Consult "ASCII Conversion Table" (page 71) for help translating your trigger into hexadecimal. 7.
Creating Triggers 9. Press F3 to save the new WSCST. The following window appears. 10. In the Change/create member line, enter Y, and press ENTER to confirm the save. The following confirmation message appears. Member SRCLUNE in file OBJLUNE/QTXTSRC changed with 19 records.
Creating Triggers To create the WSCST: 1. At the command line, enter CRTWSCST and press F4. The following window appears. 2. Press F10 to display additional parameters. 3. Enter the name of the workstation customizing object that you want to create, and the library name for the customizing object (the one previously changed). 4. In the Additional Parameters section, enter the following: Source file: Enter the name of the source QTXTSRC.
Creating Triggers Library: Enter the name of the library containing the source file. Replace object: Enter *YES or *NO to indicate whether or not this name should replace an object with the same name. The following confirmation message appears. The object LUNE customization has successfully been created. If the creation of the WSCST was not successful, verify that the hexadecimal code for the INITPRT and RESETPRT strings is correct. Once you create the WSCST, you can use it in an output queue.
Creating Triggers 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Click the red pencil icon to change to edit mode. In the Device types section, click Page formats. In the Page Formats window, select LETTER or another format from the list. Select Copy from to copy LETTER to a new format. Enter ZLETTER. Select both Portrait and Landscape orientations. Assign the appropriate width and length values to the paper size. Click the left-pointing checkmark in the toolbar to return to the previous window.
Creating Triggers 13. 14. 15. 16. 17. 18. Click the left-pointing checkmark in the toolbar to return to the previous window. Click Device types to display the list of device types. Select For dev. types and Copy device type from the Utilities menu. Copy device type ASCIIPRI to ZASCIIxx (where xx is a number). Verify the Use references box is cleared. Click the left-pointing checkmark in the toolbar to return to the previous window. Double-click the ZASCIIxx device type to display the corresponding window.
Creating Triggers 19. Click Formats. The Spool Admin.: List of Formats for Device Types (Change) window appears.
Creating Triggers 20. Click the paper icon to add a new format to the list. The Spool Admin.: List of Formats for Device Types (Change) dialog box appears. 21. In the Format box, select ZLETTER. 22. Click the checkmark and close the window. The Spool Administration: Maintain Format for Device Type window appears.
Creating Triggers 23. Double-click Printer initialization. The Print init. window appears. 24. Enter the following PJL codes provided byPlanetPress.
Creating Triggers 25. Save changes. 26. Assign the device type to the output device that you use to print documents. PJL codes are now set up in SAP to control the output from SAP and merge it with the document created and installed in the printer's memory using PlanetPress.
Creating Triggers 1. Enter the required information in the appropriate fields. 2. Click Save Data. 3. Enter ENVPP01.HPENV.SYS (for environment PlanetPress 01) for the environment file. Be careful with the special characters. 4. Enter a name for the document. For example, ARRANGL. The sample job should appear as follows: !JOB P20A07B,…,FICHIER;INPRI=7 !… !… !FILE OUT=TAXEANG;DEV=402,1;ENV=ENVPP05.HPENV.
©2014 Objectif Lune Inc - 68 -
Special Printer Requirements Special Printer Requirements This appendix describes requirements specific to individual printers.
Special Printer Requirements Also note that Optra S 81.10 base code does not support the /Filtering parameter. Base code 85.21 and later in all Optra SC and Optra K code versions do support the /Filtering parameter. Optra + base code 52.04 and later releases all support switching from binary to ASCII mode. Printers with Automatic Emulation Switching A character on the first line of a trigger normally indicates the end of one job and the beginning of another. This prevents mixups in print jobs.
ASCII Conversion Table ASCII Conversion Table This appendix provides a table for converting among ASCII, hexadecimal, decimal and octal values.
ASCII Conversion Table Dec Hx Oct Char 42 2A 052 * 43 2B 053 + 44 2C 054 , 45 2D 055 46 2E 056 .
ASCII Conversion Table Dec Hx Oct Char 88 58 130 X 89 59 131 Y 90 5A 132 Z 91 5B 133 [ 92 5C 134 \ 93 5D 135 ] 94 5E 136 ^ 95 5F 137 _ 96 60 140 97 61 141 a 98 62 142 b 99 63 143 c 100 64 144 d 101 65 145 e 102 66 146 f 103 67 147 g 104 68 150 h 105 69 151 i 106 6A 152 j 107 6B 153 k 108 6C 154 l 109 6D 155 m 110 6E 156 n 111 6F 157 o 112 70 160 p 113 71 161 q 114 72 162 r 115 73 163 s 116 74 164 t 117 75 165 u 118 76 166 v 119 77 167 w 120 78 170 x 121 79 171 y 122 7A 172 z 123 7B 173 { 124 7C 174 | 125 7
©2014 Objectif Lune Inc - 74 -
CL Program for AS/400 Systems CL Program for AS/400 Systems This appendix provides the CL program you use with AS/400 systems. PGM PARM(&WATCHPRTFN &WATCHPRTFL &OUTPUTQS + &OUTPUTQSLB &OUTPUTQD &OUTPUTQDLB + &TRIGGERFN &TRIGGERLIB) /*************************************************************************/ /* WATCH */ /* THIS PROGRAM IS USED TO INTERCEPT SPOOLFILES FROM AN OUTPUT QUEUE AND */ /* TO INSERT A TRIGGER.
CL Program for AS/400 Systems /* CREATE THE TEMPORARY FILE NEEDED DURING THE PROGRAM */ /*************************************************************************/ CRTPF FILE(QTEMP/TRANSITF) RCDLEN(200) + TEXT('file to build the new spoolfile') MONMSG MSGID(CPF7302) /* file already exists */ /*************************************************************************/ /* TAKE A SNAPSHOT OF THE OUTPUT QUEUE IN A FILE AND SEND IT IN THE */ /* WORKFILE FILE. THIS WILL ALLOW US TO MANIPULATE THE CONTENT.
CL Program for AS/400 Systems END ©2014 Objectif Lune Inc - 77 -
©2014 Objectif Lune Inc - 78 -
Index ©2010 Objectif Lune Inc - 79 -