Post on 05-Jun-2018
iForms
© 2008 RJS Software Systems
Document Version 1.01.2
RJS Software Systems2970 Judicial Road, Suite 100
Burnsville, MN 55337
Phn: (952) 736-5800Fax: (952) 736-5801
Sales email: sales@rjssoftware.comSupport email: support@rjssoftware.com
Web Site: http://www.rjssoftware.com
User Guide
All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, ormechanical, including photocopying, recording, taping, or information storage and retrieval systems - without thewritten permission of RJS Software Systems.
RJS iForms is a trademark of RJS Software Systems. Products that are referred to in this document may be eithertrademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim tothese trademarks.
While every precaution has been taken in the preparation of this document, RJS Software Systems assumes noresponsibility for errors or omissions, or for damages resulting from the use of information contained in this documentor from the use of programs and source code that may accompany it. The information contained in this document issubject to change without notice. In no event shall the publisher and the author be liable for any loss of profit or anyother commercial damage caused or alleged to have been caused directly or indirectly by this document.
Printed: August 2008
© 2008 RJS Software Systems
IContents
I
© 2008 RJS Software Systems
Table of Contents
Section 1 Introduction 2
................................................................................................................................... 2What is in this Guide
................................................................................................................................... 4About RJS Software Systems
................................................................................................................................... 4What is not in this Guide
................................................................................................................................... 5Document Conventions and Symbols
................................................................................................................................... 5Contacting RJS Software Systems
Section 2 Overview of iForms 8
................................................................................................................................... 8Definition of Terms
................................................................................................................................... 8Introduction to iForms
................................................................................................................................... 9Licensing Information
Section 3 System Requirements andRecommendations 11
................................................................................................................................... 11System i Recommendations
................................................................................................................................... 11PC Requirements
................................................................................................................................... 11System i Requirements
Section 4 Installation 17
................................................................................................................................... 17License Authorization Code
................................................................................................................................... 17System i Library Installation
................................................................................................................................... 17iReport Installation
................................................................................................................................... 17Print-Server Installation
................................................................................................................................... 30Form Storage
................................................................................................................................... 30Scriptlet Storage
................................................................................................................................... 31Uninstalling iForms
Section 5 Setup 33
................................................................................................................................... 33Adding RJSIFORMS to your Library List
................................................................................................................................... 33The iForms Electronic Forms and Report Writer Screen
................................................................................................................................... 35iForms Initial Setup
................................................................................................................................... 40Processing the Sample Spool File
Section 6 A Quick Reference for Processing Reports 46
Section 7 Creating a Spool-File Form 48
................................................................................................................................... 48The Terms "Report" and "Form" as Used in iReport
iForms User GuideII
© 2008 RJS Software Systems
................................................................................................................................... 49Opening the Form Designer
................................................................................................................................... 49Setting the JDBC Connection
................................................................................................................................... 53Determining the Output Programs
................................................................................................................................... 55Compile Settings
................................................................................................................................... 58Setting the Report Properties
................................................................................................................................... 60Form Page Layout
................................................................................................................................... 63Creating Fields
................................................................................................................................... 65Designing the Form
................................................................................................................................... 69Inserting Fields onto the Form
................................................................................................................................... 74Saving the Form
................................................................................................................................... 74Creating the Parameter
................................................................................................................................... 76Setting Up a Report Query
................................................................................................................................... 78Previewing the Form
Section 8 Extracting Data from the Spool File 83
................................................................................................................................... 83Creating a Text Representation of the Spool File
................................................................................................................................... 88The Text Layer Designer
.......................................................................................................................................................... 88The Toolbar
.......................................................................................................................................................... 90Opening the Form and the Text File
.......................................................................................................................................................... 94Creating the Text Layer
................................................................................................................................... 102iReport's Execute (with active connection)
Section 9 Processing Spool-File Reports 107
................................................................................................................................... 107Individual Spool Files
................................................................................................................................... 107Monitoring Output Queues
.......................................................................................................................................................... 107The Edit Output Queue List Screen
.......................................................................................................................................................... 111The Edit Forms Destinations Screen
Section 10 Creating a Database Report 121
Section 11 Appendices 125
................................................................................................................................... 125Appendix A: System i Commands
.......................................................................................................................................................... 125ADDIFSSHR Add or Remove IFS Share
.......................................................................................................................................................... 128CHKOBJIFS Check for IFS File Existence
.......................................................................................................................................................... 130IFMATR Retrieve Spool-File Attributes
.......................................................................................................................................................... 143IFMATR2 Retrieve Spool-File Attributes 2
.......................................................................................................................................................... 146IFMJAVAEN Restore Java Objects to the IFS
.......................................................................................................................................................... 147IFMLIST List Output Queue Entries
.......................................................................................................................................................... 151IFMMON iForms Output Queue Monitor
.......................................................................................................................................................... 153IFMNUM Retrieve Spool-File Job Name and Number
.......................................................................................................................................................... 156IFMPJL01 IFS File Copy
.......................................................................................................................................................... 159IFMPRINT Print PDF File
.......................................................................................................................................................... 166IFMSPLTXT Copy Spool File to IFS - PRN
.......................................................................................................................................................... 169IFMSPOOL Spool ASCII IFS File
.......................................................................................................................................................... 173IFMSQL Run SQL Query Statement
.......................................................................................................................................................... 181IFMTEST1 Generate Test Report
IIIContents
III
© 2008 RJS Software Systems
.......................................................................................................................................................... 183INSGSOBJ Install Ghostscript and TIFF Library Utilities
.......................................................................................................................................................... 184PRDINFO Display OS/400 Level
.......................................................................................................................................................... 186PRDSEC Enter Access Codes
.......................................................................................................................................................... 188RJSWRKOUTQ RJS Work with Output Queue
.......................................................................................................................................................... 189RJSWRKSPLF RJS Work with Spool Files
.......................................................................................................................................................... 191RSTGSOBJ Restore Ghostscript and TIFF Library Utilities
.......................................................................................................................................................... 193RUNIFORM Generate iForms Report or Form Document
.......................................................................................................................................................... 209RUNIFORMJ Generate iForms Report or Form Document Using the Print Server
.......................................................................................................................................................... 226SPLIFORM Convert Spool File to iForms Document
.......................................................................................................................................................... 238SPLIFORMJ Convert Spool File to iForms Document Using the Print Server
.......................................................................................................................................................... 251TXTTODB Extract Text File to Database
................................................................................................................................... 255Appendix B: Supported Printer-Device Types
................................................................................................................................... 260Appendix C: Supported Printer-Paper Sizes
................................................................................................................................... 262Appendix D: Java Scriptlet Sample
Section 12 Index 271
Introduction 2
© 2008 RJS Software Systems
Introduction
This section provides basic information about the following topics:
What is in this Guide
About RJS Software Systems
What is not in this Guide
Document Conventions and Symbols
Contacting RJS Software Systems
What is in this GuideThis manual is intended for iForms end users and provides detailed information on how to useiForms.
Here is what this book includes:
· Section 1 Introduction describes this user guide, how to find the information you need, andhow to contact RJS Software Systems.
· Section 2 Overview of iForms describes the benefits of using iForms.
· Section 3 System Requirements and Recommendations describes the System i and PCrequirements and recommendations to run iForms.
· Section 4 Installation shows where to find installation instructions for the System i and PC. Itdescribes how to install the optional PC print server. This section also describes uninstallingiForms.
· Section 5 Setup describes the initial iForms setup, which includes generating a sample report.
· Section 6 A Quick Reference for Processing Reports briefly describes the steps in processingspool-file reports.
· Section 7 Creating a Spool-File Form provides step-by-step instructions on creating a form,formatting a form, and defining parameters for a form. This section also includes instructions onhow to preview the form you created.
· Section 8 Extracting Data From the Spool File shows how to create a text representation of thespool file, extract data from that text representation, and examine your form with spool-file dataentered in its fields.
· Section 9 Processing Spool-File Reports shows how to process one report at a time and howto automate report processing by monitoring an output queue.
· Section 10 Creating a Database Report describes how to use iReport's Wizard to createdatabase-query reports.
· Appendix A: System i Commands provides detailed descriptions of and command syntax foreach iForms System i command.
iForms User Guide3
© 2008 RJS Software Systems
· Appendix B: Supported Printer-Device Types lists the Ghostscript-supported printer-devicetypes.
· Appendix C: Supported Printer-Paper Sizes lists the Ghostscript-supported printer-paper sizes.
· Appendix D: Java Scriptlet Sample gives an example of text-formatting functions using Javascriptlet.
· Index The index is another way to find information in this guide. In the PDF version, just like ina traditional book, the index lists topics and concepts in alphabetical order and presents thepage number on which information about that topic or concept appears.
If you are using the HTML version of the manual, the index topics appear in the Keyword Indexin the left panel of the Help window. Click to toggle between the Table of Contents and theKeyword Index.
Introduction 4
© 2008 RJS Software Systems
About RJS Software SystemsRJS Software Systems provides software and service solutions that allow organizations to accessinformation when, where, and how they need it, with superior customer service. Read more aboutus at http://www.rjssoftware.com.
Copyright
© 2008 RJS Software Systems. All rights reserved. This manual and the software described in itare copyrighted with all rights reserved. No part of this publication may be reproduced,transmitted, transcribed, stored in a retrieval system, or translated into any language in any formby any means without the written permission of RJS Software Systems.
Trademarks
iForms is a trademark of RJS Software Systems. Brand names and product names aretrademarks or registered trademarks of their respective companies.
What is not in this GuideThis user guide does not describe the following:
· Configuration and use of individual document-output equipment (for example, a printer). Referto the manufacturer instructions for help.
iForms User Guide5
© 2008 RJS Software Systems
· Use of individual web browsers.
· Use of System i commands not directly related to iForms.
· In-depth instruction of iReport. For detailed information about iReport, refer to The DefinitiveGuide to iReport by Giulio Toffoli, included as a PDF document with your iForms purchase.
Document Conventions and SymbolsThis user guide conforms to the following conventions:
· Titles of documents appear in italics. Italic type also indicates information that varies bycircumstance.
· In step-by-step procedures, the following are in bold type: selections in lists, buttons that youclick, and keys that you press.
· Acceptable hardware server names for iForms could be noted as AS/400, iSeries, i5, or Systemi. For simplicity, all references to the server in this manual will default to the term System iunless the notation is specific to a specific server model.
· The document version, shown on the first page of this manual, denotes both the iFormssoftware version this manual represents and document draft for the release. Document versionwill be in the format of X.YY.N, where X.YY represents the iForms software version and Nrepresents the document draft number. For example, if the document version is noted as 2.17.2then the information in this manual is current as of iForms version 2.17, and is the secondrelease of the manual for software version 2.17.
· Typically, with iForms as with most software applications, there are several ways to accomplishthe same thing. This manual shows one simple way to perform an action: usually by clicking.
Contacting RJS Software SystemsRJS Software Systems offers form-design and other services. Contact us for more details.
Please review the following information before contacting RJS Software Systems for technicalsupport.
Before You Contact RJS
Gather and organize as much information as possible about the problem prior to contacting RJSSoftware Systems for support.
If you have not already done so, check this manual's table of contents and index for informationthat addresses your concern. Also refer to the Troubleshooting page on the RJS website.
Specific troubleshooting links:
iForms library: http://wiki.rjssoftware.com/wiki/index.php/IForms_iSeries_Library_Troubleshooting
iReport:
Introduction 6
© 2008 RJS Software Systems
http://wiki.rjssoftware.com/wiki/index.php/IReport_Form_%26_Report_Designer_Troubleshooting
Text Layer Designer: http://wiki.rjssoftware.com/wiki/index.php/Text_Layer_Designer_Troubleshooting
Contact Information
Telephone support is available on business days from 8:00 a.m. to 5:00 p.m. Central Time.
888-757-7638 Sales/Support
(952) 736-5800 General
(952) 736-5801 Fax
E-mail support is available at support@rjssoftware.com.
For company information go to http://www.rjssoftware.com.
To find code samples, user guides, installation and upgrade procedures, or troubleshootingassistance go to http://support.rjssoftware.com.
Overview of iForms 8
© 2008 RJS Software Systems
Overview of iForms
This section, which provides an overview of iForms, includes the following topics:
Definition of Terms
Introduction to iForms
Licensing Information
Definition of TermsiForms uses the terms report and form in a deliberate way. In iForms:
· a report is information, laid out in a fixed format, that can come from text-based spool files andother data sources.
· a form is a template that may include graphical elements onto which reports are printed ordisplayed.
Introduction to iFormsiForms is a native System i business-report-writing program. Included with iForms is thegraphics-based form designer, iReport.
With iForms you can:
· Extract data from text-based spool files.
· Insert extracted data onto custom-designed forms.
· Output your form in a variety of file formats, including PDF, HTML, CSV, Excel, XML, PCL,RTF, and others.
· Store forms on the System i, the IFS, or both for batch and interactive jobs.
· Output from the System i with built-in, native PDF printing in PostScript and PCL formats.
· Send report PDF documents to an output queue or IFS directory.
· Using RJS Software's iPrint, quickly print PDF documents on any remote PC printer instead ofspooling them through the System i print subsystem. Contact RJS Software to discuss yourprinting needs.
With iReport you can:
· Design forms visually on a PC.
· Extract data from virtually any type of database, including DB2, Microsoft SQL Server, MySQL,
iForms User Guide9
© 2008 RJS Software Systems
Oracle, and JDBC.
· Use multi-colored and adjustable point-size fonts.
· Embed true-type fonts into PDF documents.
· Use MICR true-type fonts.
· Use signature graphics, image files, and bar codes.
· Use charts and graphs.
· Use drawing tools.
· Create sub-reports.
· Include cross tabs.
Licensing InformationiForms is licensed on a per System i partition basis.
iForms User Guide11
© 2008 RJS Software Systems
System Requirements and Recommendations
System requirements for iForms are minimal. Still, for maximum performance, review the Systemi and PC requirements.
This section includes the following topics:
System i Recommendations
PC Requirements
System i Requirements
System i RecommendationsRJS Software recommends an operating-system (OS) level of V5R3 or higher.
iForms can run on lower OS levels, but performance speed suffers. For more information contactRJS Software.
PC RequirementsA PC is required only for form design. But you may want to use a PC for printing. Therequirements for both scenarios are as follows:
For form design the PC requirements are:
· Windows 2000, XP, 2003 Server, or Vista.
· 1 GB memory.
Printing from a PC is optional. If you use System i-based print drivers, you do not need a PC toprint. But if your System i is lower than V5R3, RJS Software recommends using the print server.The PC requirements for the print server are:
· Windows 2000, XP, or Windows 2003 Server.
RJS Software Systems does not recommend Windows Vista for the print server.
· 2 GB memory.
System i RequirementsThe iForms requirements for System i systems are:
· Java Developer Kit V1.4 installed. To determine if the Java Developer Kit V1.4 is installed, referto Confirming Java Developer Kit V1.4 is Installed.
· OS/400 Portable Application Solutions Environment (OS/400 PASE) installed. To determine if
System Requirements and Recommendations 12
© 2008 RJS Software Systems
the OS/400 PASE is installed, refer to Confirming OS/400 PASE is Installed.
For information on the minimum operating-system level, refer to System i Recommendations.
Confirming Java Developer Kit V1.4 is Installed
To confirm Java Developer Kit V1.4 is installed:
1. Sign on to the System i as a security officer.
2. Type GO LICPGM then press Enter.
The Work With Licensed Programs screen displays
Licensed Programs
3. Type 10 then press Enter.
The first page of the Display Installed Licensed Programs screen displays.
iForms User Guide13
© 2008 RJS Software Systems
Display Installed Licensed Progams
4. Scroll down by pressing Page Down until you find one of the following entries:
5722JV1 *INSTALLED Java Developer Kit 1.4 (or higher).
5722JV1 *COMPATIBLE Java Developer Kit 1.4 (or higher).
In this case, Java Developer Kit 1.5 Installed
5. If you do not find one of the above entries, the Java Developer Kit V1.4 is not installed on yoursystem. Find the Java Developer Kit V1.4 on IBM's software disks and install it beforecontinuing.
System Requirements and Recommendations 14
© 2008 RJS Software Systems
Confirming OS/400 PASE is Installed
To determine if the OS/400 PASE is installed:
1. Sign on to the System i as a security officer.
2. Type GO LICPGM then press Enter.
The Work With Licensed Programs screen displays
Licensed Programs
3. Type 10 then press Enter.
The Display Installed Licensed Programs screen displays.
iForms User Guide15
© 2008 RJS Software Systems
Display Installed Licensed Programs
4. Scroll down the options by pressing Page Down until you find one of the following entries:
5722SS1 *INSTALLED OS/400 - Portable App Solutions Environment.
5722SS1 *COMPATIBLE OS/400 - Portable App Solutions Environment.
*COMPATIBLE 0S/400 - PASE
5. If you do not find one of the above entries, the OS/400 PASE is not installed on your system.Find the OS/400 PASE on IBM's software disks and install it before continuing.
iForms User Guide17
© 2008 RJS Software Systems
Installation
This section, which provides information on how to install iForms, includes the following topics:
License Authorization Code
System i Library Installation
iReport Installation
Print-Server Installation
Form Storage
Scriptlet Storage
Uninstalling iForms
License Authorization CodeRJS Software issues your license authorization code in an e-mail message when you purchaseiForms. Follow the instructions in that message to license your copy of iForms.
If you have any questions, contact RJS Technical Support.
System i Library InstallationFor the System i library installation instructions, refer to the RJS Software Support Site article at http://wiki.rjssoftware.com/wiki/index.php/IForms_iSeries_Library_Install.
iReport InstallationFor iReport installation instructions, refer to the RJS Software Support Site article at http://wiki.rjssoftware.com/wiki/index.php/IReport_Form_%26_Report_Designer_Install.
After you have installed iReport:
1. Open the following folder: C:\Program Files\JasperSoft.
In this folder are the subfolders for all the versions of iReport you have installed on the PC. Thefile, jt400.jar, is also in this folder.
2. Cut the file, jt400.jar, and paste it into C:\Program Files\JasperSoft\iReport-x.x.x\lib (where x.x.xis the version of iReport you installed and want to use).
Print-Server InstallationThis topic includes instructions for downloading and installing the software that runs the optional
Installation 18
© 2008 RJS Software Systems
print server.
For more information on whether or not you should install the print server, refer to PCRequirements.
Installing the print server is divided into the following steps:
1. Verifying the version of Java runtime.
2. Downloading Apache Tomcat 5.5.
3. Determining the print-server IP address.
4. Entering the print-server IP address into RJSIFORMS library.
5. Creating the RJS folders.
6. Creating the JDBC-connection-properties file.
7. Entering the Web.XML settings.
Verifying the Version of Java Runtime
To Verify the version of the Java runtime you have installed:
1. Click Start>Run.
2. Type cmd then press Enter.
The DOS prompt displays.
3. Type java -version then press Enter.
The Java runtime version displays.
4. If the Java runtime version is 1.5 or higher skip to Downloading Apache Tomcat 5.5.
If the Java runtime version is lower than 1.5 continue to step 5.
5. Download the Java 1.5 Development Kit at http://downloads.rjssoftware.com/files/rjsiforms/jdk-1_5_0_12-windows-i586-p.exe.
Downloading Apache Tomcat 5.5
Note: Contact RJS Software about testing Apache Tomcat versions above 5.5.
To download Apache Tomcat 5.5:
1. Go to: http://tomcat.apache.org/download-55.cgi#5.5.25.
iForms User Guide19
© 2008 RJS Software Systems
The Binary Distributions section of the Tomcat 5.x Download Page displays.
2. Click Windows Service Installer.
Apache Tomcat Setup Wizard displays.
Installation 22
© 2008 RJS Software Systems
5. Select the type of install or the optional components you want to install then click Next.
Note: RJS Software recommends accepting the default values.
Choose Install Location displays.
iForms User Guide23
© 2008 RJS Software Systems
6. Set the destination folder then click Next.
Configuration displays.
Installation 24
© 2008 RJS Software Systems
7. Set the HTTP/1.1 Connector Port to 9180.
8. Create User Name admin.
9. Create Password tomcatadmin or something meaningful to you.
10.Click Next.
Java Virtual Machine displays.
iForms User Guide25
© 2008 RJS Software Systems
11.Select the path of a J2SE 5.0 JRE then click Install.
Apache Tomcat installs.
Completing the Apache Tomcat Setup Wizard displays.
Installation 26
© 2008 RJS Software Systems
12.Click Finish.
13.In a web browser go to http://localhost:9180.
The following page displays, which shows the successful installation of Apache Tomcat 5.5.
iForms User Guide27
© 2008 RJS Software Systems
Determining the Print-Server IP Address
To determine the print-server IP address:
1. Click Start>Run.
2. Type cmd then press Enter.
The DOS prompt displays.
3. Type ipconfig then press Enter.
The IP address displays.
4. Write down the IP address on a sheet of paper.
Entering the Print-Server IP Address into RJSIFORMS Library
To enter the print-server IP address into RJSIFORMS library:
1. On a System i command line, type CHGDTAARA then press F4.
Installation 28
© 2008 RJS Software Systems
The Change Data Area screen displays.
2. Type the following:
RMTSVRURL into the Data Area parameter.
RJSIFORMS into the Library qualifier.
http://1.1.1.1:9180 (where 1.1.1.1 is the IP address from step 4 in Determining the Print-ServerIP Address) into the New Value parameter.
3. Press Enter.
iForms User Guide29
© 2008 RJS Software Systems
Creating the RJS Folders
1. Open drive C in My Computer.
2. Create the following two folders:
C:\RJSTEMP
C:\RJSIFORMS
Creating the JDBC-Connection-Properties File
To create the JDBC-connection-properties file:
1. Install the iForms Web Server Application athttp://downloads.rjssoftware.com/files/rjsiforms/iformserver.exe.
2. Create the following file C:\jdbc_connection.properties and open it in Microsoft Notepad.
3. While the file is open in Microsoft Notepad, enter the following:
driver_class=com.ibm.as400.AS400JDBCDriver
default_input_file=myAS400Demo.jrxml
use_native-jdbc=false
ip_address=1.1.1.1 (where 1.1.1.1 is a valid System i IP address.)
schema=RJSTEMP
host_type=iseries
driver_manager=jdbc\:as400
parameter_file=
print_exceptions=true
print_info=true
default_output_name=outputFile
default_report_type=-pdf
user_id=user (where user is a valid System i user ID)
password=pass (where pass is a valid System i password)
4. Save the file.
Installation 30
© 2008 RJS Software Systems
Entering the Web.XML Settings
To enter the Web.XML settings:
1. Create the following file C:\program files\Apache Software Foundation\Tomcat 5.5\webapps\iFormsServer\WEB-INF\web.xml and open it in Microsoft Notepad.
2. While the file is open in Microsoft Notepad, enter the following:
<param-name>iserieshost</param-name>
<param-value>1.1.1.1</param-value> (where 1.1.1.1 is a valid System i IP address.)
</context-param>
<context-param>
<param-name>iseriesuser</param-name>
<param-value>user</param-value> (where user is a valid System i user ID)
</context-param>
<context-param>
<param-name>iseriespass</param-name>
<param-value>pass</param-value> (where pass is a vaild System i password)
</context-param>
3. Save the file.
Form StorageOn the PC store forms in C:\RJSIFORMS.
On the IFS store forms in /RJSIFORMS.
Scriptlet StorageCreate iForms custom user code in the following scriptlet file: IFormsScriptlets.jar.
Store IFormsScriptlets .jar in the following folder: C:\program files\Apache Software Foundation\Tomcat 5.5\webapps\iFormsServer\WEB-INF\LIB
Edit scriptlet Java code via WDSC or Eclipse.
For more information on scriptlet class files, refer to Appendix D: Java Scriptlet Sample.
iForms User Guide31
© 2008 RJS Software Systems
Uninstalling iFormsTo remove iForms from a System i:
1. Ensure the RJSIFORMS library is not being used.
2. On a System i command line type DLTLIB LIB(RJSIFORMS) then press Enter.
The library is deleted from the System i when the command returns.
To remove iReport or Apache Tomcat 5.5 from a PC:
1. Click Start>My Computer>Control Panel>Add or Remove Programs.
2. Click the icon of the program you want to uninstall.
3. Click the Change/Remove button.
4. Follow the instructions to remove the program.
The program is uninstalled from the PC.
iForms User Guide33
© 2008 RJS Software Systems
Setup
This section, which provides information on setting up iForms and generating a sample report,includes the following topics:
Adding RJSIFORMS to your Library List
The iForms Electronic Forms and Report Writer Screen
iForms Initial Setup
Processing the Sample Spool File
Adding RJSIFORMS to your Library ListAfter you have installed the iForms library, add RJSIFORMS to your library list:
On a System i command line type ADDLIBLE RJSIFORMS then press Enter.
Enter ADDLIBLE RJSIFORMS
The message Library RJSIFORMS added to library list displays at the bottom of the screen.
The iForms Electronic Forms and Report Writer ScreenAfter the RJSIFORMS library has been added to your library list type GO RJSIFORMS then pressEnter.
Setup 34
© 2008 RJS Software Systems
Enter GO RJSIFORMS
Page one (of two pages) of the iForms Electronic Forms and Report Writer screen displays. Thisscreen is the iForms main menu, to which you will return again and again.
Page One
Pressing Page Down takes you to page two of the iForms Electronic Forms and Report Writerscreen.
iForms User Guide35
© 2008 RJS Software Systems
Page Two
· If you are in the iForms setup process, continue to the next topic, iForms Initial Setup.
· If you have already completed the setup section and you were referenced here from anothersection or topic, return now to that section or topic.
iForms Initial SetupComplete the iForms initial setup by typing going through the steps of the iForms Initial SetupMenu:
Type 51 on the command line of the iForms Electronic Forms and Report Writer screen thenpress Enter.
The iForms Initial Setup Menu screen displays.
Setup 36
© 2008 RJS Software Systems
Initial Setup Menu
The iForms Initial Setup Menu is divided into the following steps:
1. Checking for Java runtime.
2. Checking for Portable Application Solutions Environment (PASE).
3. Restoring iForms Java objects to the IFS.
4. Restoring Ghostscript PASE printing environment.
5. Creating the Windows IFS share.
Checking for Java Runtime
1. On the command line of the iForms Initial Setup Menu Type 1 then press Enter.
The following screen displays, showing that in this example Java version 1.4.2 is installed.
iForms User Guide37
© 2008 RJS Software Systems
Java Version 1.4.2
Warning: If the Java version is not 1.4 or higher, find the Java Developer Kit V1.4 on IBM'ssoftware disks and install it before continuing.
2. Press F3.
The iForms Initial Setup Menu screen displays.
Checking for Portable Application Solutions Environment (PASE)
1. On the command line of the iForms Initial Setup Menu type 2 then press Enter.
If the message It appears the Portable Apps Solution Environment is loaded-OK displays at thebottom of the screen PASE is installed. Continue to Restoring iForms Java Objects to the IFS.
If the message It appears the Portable Apps Solution Environment is loaded-OK does notdisplay at the bottom of the screen, PASE is not installed. Find the OS/400 PASE on IBM'ssoftware disks and install it before continuing.
Restoring iForms Java Objects to the IFS
1. On the command line of the iForms Initial Setup Menu type 3 then press Enter.
The Restore Java Objects screen displays.
Setup 38
© 2008 RJS Software Systems
Restore Java Objects
Note: Option 3 also adds two sample forms, invoice.jrxml and invoice-saved.jrxml, to the IFSdirectory.
2. Press Enter.
Java objects are restored, and the iForms Initial Setup Menu screen displays.
Restoring Ghostscript PASE Printing Environment
1. On the command line of the iForms Initial Setup Menu type 4 then press Enter.
The Call Program screen displays.
iForms User Guide39
© 2008 RJS Software Systems
Call Program
2. Press Enter.
The following screen displays, showing a log of the files that the program installed on the IFS.
Display Physical File Member
3. Press F3 repeatedly until the iForms Initial Setup Menu displays. When the menu displays, theGhostscript PASE printing environment is restored.
Creating the Windows IFS Share
1. On the command line of the iForms Initial Setup Menu type 5 then press Enter.
The Add/Remove IFS Share screen (the ADDIFSSHR command) displays.
Setup 40
© 2008 RJS Software Systems
Add/Remove IFS Share
2. Press Enter.
The IFS folder /RJSIFORMS is created, and the iForms Initial Setup Menu screen displays.
You have completed the iForms initial setup.
Processing the Sample Spool FileTo confirm the proper setup of iForms process the sample spool file by going through the SampleReport steps of the iForms Spool Overlay Setup and Testing Menu:
Type 50 on the command line of the iForms Electronic Forms and Report Writer screen thenpress Enter.
The iForms Spool Overlay Setup and Testing Menu screen displays.
iForms User Guide41
© 2008 RJS Software Systems
Setup and Testing
The Sample Report section of the iForms Spool Overlay Setup and Testing Menu for processingthe sample spool file is divided into the following steps:
1. Generating the sample spool file INVOICE in the RJSIFORMS output queue.
2. Converting the spool file to a PDF document with the SPLIFORM command.
3. Displaying the sample report Invoice.
Generating the Sample Spool File INVOICE in the RJSIFORMS Output Queue
1. On the command line of the iForms Spool Overlay Setup and Testing Menu type 20 then pressEnter.
The Generate Test Report screen (the IFMTEST1 command) displays.
Setup 42
© 2008 RJS Software Systems
Generate Test Report
2. Press Enter.
The command creates INVOICE in the RJSIFORMS output queue and the iForms SpoolOverlay Setup and Testing Menu screen displays.
Converting the Spool File to a PDF Document with the SPLIFORM Command
1. On the command line of the iForms Spool Overlay Setup and Testing Menu type 22 then pressEnter.
The Convert Spool to iForms Doc screen (the SPLIFORM command) displays.
iForms User Guide43
© 2008 RJS Software Systems
Convert Spool to iForms Doc
2. Press Enter.
The command maps data from the spool file INVOICE to the sample form invoice.jrxml as aPDF document.
The iForms Spool Overlay Setup and Testing Menu screen displays.
Displaying the Sample Report Invoice
Caution: Before completing this step, you must Create the Windows IFS Share.
1. Click Start>Run... then type \\1.1.1.1\rjsiforms\invoice.pdf (where 1.1.1.1 is your System i IPaddress).
2. Click OK.
The sample report Invoice displays in your PDF viewer. (Only the first of five pages is shownbelow.)
Setup 44
© 2008 RJS Software Systems
Viewing the sample Invoice confirms that both the spool-file conversion and System i installationwere successful.
A Quick Reference for Processing Reports 46
© 2008 RJS Software Systems
A Quick Reference for Processing Reports
Now that you have finished Installation and Setup you are ready to turn your spool files intoprofessional business reports. This brief section gives a step-by-step, high-level overview of thatprocess.
1. Create a spool-file form. This section includes how to format a form and define parameters forit
2. Extract data from the spool file. This step shows you how to create a text representation of thespool file, extract data from that text representation, and examine your form with spool-file dataentered in its fields.
3. Process spool-file reports from the System i. You can process one report at a time or monitoran output queue to process reports.
If your data does not come from a spool file, refer to Creating a Database Report.
Creating a Spool-File Form 48
© 2008 RJS Software Systems
Creating a Spool-File Form
This section provides basic guidelines on creating a form using iReport. For detailed informationon iReport use and features, refer to The Definitive Guide to iReport by Giulio Toffoli, included asa PDF document with your iForms purchase. Before you create a spool-file form, you mustcomplete Installation and Setup.
Note: RJS Software Systems offers form-design and other services. Contact us for moreinformation.
This section includes the following topics:
The Terms Report and Form as Used in iReport
Opening the Form Designer
Setting the JDBC Connection
Determining the Output Programs
Compile Settings
Setting the Report Properties
Form Page Layout
Creating Fields
Designing the Form
Inserting Fields onto the Form
Saving the Form
Creating the Parameter
Setting Up a Report Query
Previewing the Form
The Terms "Report" and "Form" as Used in iReportRJS Software did not develop iReport. So iReport does not use the terms report and form in thesame way that this user guide does.
In this section, "Creating a Spool-File Form," both of the words report and form take on themeaning of form as described in Definition of Terms.
In other words, whenever you see report or form in this section, they both mean "a template thatmay include graphical elements."
iForms User Guide49
© 2008 RJS Software Systems
Opening the Form DesignerTo open the form designer, iReport, click Start>All Programs>iForms>Launch iReportDesigner.
iReport opens.
Setting the JDBC ConnectionTo set the JDBC connection:
1. On the Data menu click Connections/Data Sources.
Connections / Datasources displays.
Creating a Spool-File Form 50
© 2008 RJS Software Systems
2. Click New.
Connections Properties displays.
iForms User Guide51
© 2008 RJS Software Systems
3. Highlight Database JDBC Connection then click Next.
Connections Properties-Database JDBC Connection displays.
Creating a Spool-File Form 52
© 2008 RJS Software Systems
4. Type the following:
iSeries JT400 in the Name text box.
com.ibm.as400.access.AS400JDBCDriver in the JDBC Driver text box.
jdbc:as400://1.1.1.1;database name=QIWS;naming=system; (where 1.1.1.1 is a validSystem i IP address) in the JDBC URL text box.
<User Name> (where <User Name> is your System i user name) in the User Name text box.
<Password> (where <Password> is your System i password) in the Password text box.
Your completed Connections Properties-Database JDBC Connection dialog looks like to theone below. But be sure to note that every user's System i IP address, System i user name, andSystem i password are unique and will not be the same as the example below.
iForms User Guide53
© 2008 RJS Software Systems
5. Click Save.
Determining the Output ProgramsTo preview your form, you must set the file paths of the output programs.
Caution: You must set these file paths after installing iForms and before previewing the form,using the text layer designer, using iReport's Execute (with active connection), or processingspool-file reports.
To set the file paths of the output programs:
1. On the Options menu click Settings...
iReport - Options displays.
Creating a Spool-File Form 54
© 2008 RJS Software Systems
iReport - Options
2. Click the External Programs tab.
External Programs tab displays.
iForms User Guide55
© 2008 RJS Software Systems
External Programs Tab
3. In each of the Viewer headings enter the file path for the type of viewer that you want to openthe form. Most crucial is the PDF Viewer.
Note: If the file paths are already correct, click the Close button and skip step 4.
4. When the file paths are correctly entered, click Apply.
Compile SettingsTo set the compile settings:
1. On the Options menu click Settings...
iReport - Options opens.
Creating a Spool-File Form 56
© 2008 RJS Software Systems
iReport Options
2. Click the Compiler tab.
The Compiler tab displays.
iForms User Guide57
© 2008 RJS Software Systems
Compiler Tab
3. Do the following:
Type C:\RJSIFORMS in the Default Compilation Directory text box.
Select to turn on the Use Reports Directory to Compile check box.
Select to turn on the Auto-Save Before Compiling check box.
Clear to turn off the Keep .java File (If Available) check box.
Note: Selecting the Use Reports Directory to Compile check box makes unavailable theDefault Compilation Directory text box. This change is normal.
When you have finished step 3, the Compiler tab looks like this:
Creating a Spool-File Form 58
© 2008 RJS Software Systems
How the Compiler Tab Should Look
4. Click Save.
Setting the Report PropertiesNow you can begin creating a form by setting the report properties.
Note: So you are not confused, review the topic The Terms Report and Form as Used in iReportbefore continuing.
To set the report properties:
1. On the File menu click New Document.
Report Properties displays.
iForms User Guide59
© 2008 RJS Software Systems
Report Properties
2. Name the report.
Caution: When naming a report, use a letter as the first character otherwise the mergebetween the form and the spool file will fail.
Caution: When naming a report, do not put spaces between words otherwise the mergebetween the form and the spool file will fail.
Note: RJS Software recommends using the spool-file name for the report.
3. Set the page size.
Note: The size for most forms is letter. You can find this setting in the Preset Sizes text box.
4. Set the page margin sizes.
Note: RJS Software recommends setting all margins to 0.25 inches so that the form's marginsmatch those of the PDF viewer.
5. Click OK.
Creating a Spool-File Form 60
© 2008 RJS Software Systems
Form Page LayoutWhen you have set the report properties, a representation of the form page displays.
Representation of the form
The form is divided into bands, named title, pageHeader, columnHeader, detail, columnFooter,pageFooter, lastPageFooter, and summary.
Set the height of every band except detail to zero.
To set a band height to zero:
1. Right click in any band.
iForms User Guide61
© 2008 RJS Software Systems
Right click in any band
2. Click Band Properties.
Band Properties displays with the bands listed on the left side.
Creating a Spool-File Form 62
© 2008 RJS Software Systems
Set the Band Height to Zero
3. Select a band other than detail and set the Band Height to 0.
4. Click Apply.
Note: To confirm having set a band height to zero, look at the Document Structure box on theleft side of the screen. The color of the band of which you just set the height to zero changes togray. In the example below the band with a height of zero is pageHeader.
Band with Height Zero is Gray
5. Select another band other than detail and set the Band Height to 0.
iForms User Guide63
© 2008 RJS Software Systems
6. Click Apply.
Note: iReport will not let you change the Band Height for every band and then click Apply. Youmust highlight one band, set the height to zero, click Apply, and then highlight another band.
7. Set the height of every band except detail to zero.
8. Click the Band Properties Close button.
When you have set the height of every band except detail to zero, the form will look similar tothis one:
Every Band Except "detail" has Height Zero
Lengthening a Form
Setting the height of every band except detail to zero makes the page length too short. Assumingyou are working with letter-size paper, lengthen the form to 11 inches.
To lengthen a form:
1. Right click in the band detail.
2. Click Band Properties.
Band Properties displays.
3. Assuming top- and bottom-margin sizes of .25 inches, enter a Band Height of 756.
Note: For those creating forms with either a different page size or different margin sizes thanthe example given here, iReport's display resolution is 72 dots per inch.
4. Click Apply.
The page expands to 11 inches.
5. Click the Band Properties Close button.
Creating FieldsAfter the form page has been laid out, create the fields that you want to use on the form. Thesefields will be place holders for spool-file data that gets mapped into the form at run time.
Creating a Spool-File Form 64
© 2008 RJS Software Systems
To create fields:
1. On the View menu click Fields.
Values... displays.
New Field
2. Click New.
Add/Modify Field displays.
Add/Modify
iForms User Guide65
© 2008 RJS Software Systems
3. Type meaningful field names into the Field Name box.
Examples of meaningful field names include: BILLTO, SHIPTO, UNITPRICE, or TAX. In otherwords, form field names should correspond to the spool-file data that you want to appear in theform. For instance, if your spool file has the heading Quantity Ordered, create a field with thatname (noting the two Cautions below). Naming fields in this way eases the process ofextracting data from the text-representation of the spool file later.
Caution: Do not put spaces between words when naming fields.
Caution: Field names must be 30 characters or less.
Note: Field names are not case sensitive.
The field names display on the left side of the screen in Document Structure. The examplebelow shows the fields BILLTO and SHIPTO.
BILLTO and SHIPTO Display
Designing the FormNote: RJS Software Systems offers form-design and other services. Contact us for moreinformation.
Giulio Toffoli in The Definitive Guide to iReport, included in your iForms purchase, defines anelement as a "graphic object, such as a text box or a rectangle."
iReport's graphical-element tools are buttons on the toolbar, shown below.
iReport Graphical-Element Tools
Creating a Spool-File Form 66
© 2008 RJS Software Systems
The following are the names and descriptions of iReport's graphical-element tools:
Pointer: Selects, resizes, and moves lines, rectangles, and ellipses. Also places the cursor.
Line: Draws lines.
Rectangle: Draws rectangles and squares.
Ellipse: Draws ellipses and circles.
iReport's graphical-element tools will probably seem familiar to those who have used graphics-design programs before. This user guide discusses the Rectangle.
To insert a Rectangle:
1. Click the Rectangle button on the toolbar.
When you move the cursor into the form, it changes to cross hairs .
2. In the form click where you want the rectangle to begin.
3. Drag the cross hairs to where you want the rectangle to end.
iForms User Guide67
© 2008 RJS Software Systems
4. Release the mouse button, and sizing handles display on the rectangle.
Manipulating a Rectangle
Creating a Spool-File Form 68
© 2008 RJS Software Systems
To manipulate a rectangle:
· Click and drag a sizing handle to adjust the size of the rectangle.
· Click and drag inside the rectangle to move it while maintaining its size.
iForms User Guide69
© 2008 RJS Software Systems
For every new rectangle, click the Rectangle button on the toolbar.
Note: After any inserting any graphical element in a form, iReport automatically activates thepointer.
Use the graphical-element tools to design your form.
For detailed information on inserting elements into a form, see chapter four, "Report Elements,"in Giulio Toffoli's The Definitive Guide to iReport. But before you read The Definitive Guide toiReport, refer to The Terms Report and Form as used in iReport.
Inserting Fields onto the FormTo insert fields onto the form:
1. Create the fields that will be on your form. For more information, refer to Creating Fields.
The example below shows two newly created fields, BILLTO and SHIPTO. They display inDocument Structure on the left of the screen.
2. Design a form. For more information, refer to Designing the Form.
The example below is invoice.jrxml. It includes the following graphical elements: rectangles,lines, static text, and an image.
Creating a Spool-File Form 70
© 2008 RJS Software Systems
invoice.jrxml
3. Click and drag the field from Document Structure to the form.
Click and Drag the Field
The field displays in the form.
iForms User Guide71
© 2008 RJS Software Systems
The Field Displays
4. Move and re-size the field the same way you manipulate a rectangle. For information, refer toManipulating a Rectangle.
5. Insert all fields onto the form.
6. Holding Shift, click every field in the form.
Every field is now selected and displays with sizing handles.
7. Right click in one of the selected fields.
8. Click Properties.
The Properties dialog box opens.
Note: The Properties dialog box takes the name of the form, in this example invoice.
Creating a Spool-File Form 72
© 2008 RJS Software Systems
Properties for "invoice"
9. Click the Text Field tab.
The Text Field attributes display.
iForms User Guide73
© 2008 RJS Software Systems
Text Field Tab
10.Select to turn on the Blank When Null check box.
Creating a Spool-File Form 74
© 2008 RJS Software Systems
Activate Blank When Null
Saving the FormTo save your form:
1. Click File>Save as...
The Save Report as XML jasperreports File as ... dialog box displays.
2. Save the form on the IFS with a JRXML extension.
For example: \1.1.1.1\RJSIFORMS\invoice.jrxml (where 1.1.1.1 is your System i IP address).
Creating the ParameterWhen the you have designed a form and inserted fields onto it, create the parameter, whichallows your form to accept spool-file data:
1. On the View menu click Parameters.
Values... displays:
iForms User Guide75
© 2008 RJS Software Systems
Parameters
2. In the Parameters tab, click New.
Add/Modify Parameter displays:
Add/Modify
3. In the Parameter Name text box, type REPORTSQL.
Creating a Spool-File Form 76
© 2008 RJS Software Systems
4. Select to turn on the Use as a Prompt check box.
How Add/Modify Parameter Should Look
5. Click OK.
Setting Up a Report QueryYou must set up a report query for every form you create.
To set up a report query:
1. On the Edit menu click Report Query.
The Report Query page displays.
iForms User Guide77
© 2008 RJS Software Systems
Report Query
1. Type SELECT * FROM $P!{REPORTSQL} in the Report Query page.
Creating a Spool-File Form 78
© 2008 RJS Software Systems
Enter "SELECT * FROM $P!{REPORTSQL}"
Note: The image above displays the message Error: Please set a default value for theparameter 'REPORTSQL'. If you get this message in this step, disregard it. It has no bearingon your form.
2. Click OK.
Previewing the FormThere are three ways to preview a form.
Note: Before previewing, you must set the JDBC connection, determine the output programs,and set the Compile Settings.
iReport's preview buttons are on the toolbar, shown below.
iReport Preview Buttons
iForms User Guide79
© 2008 RJS Software Systems
The buttons are:
Compile.
Execute (empty data source).
Execute (with active connection).
The Compile Button
Clicking the Compile button compiles the form. The compilation displays in Output Console inthe lower left-hand corner of the screen. It shows any discrepancies or issues with the formdesign that you need to address before testing it with the data source.
The following shows the output console after having compiled the form invoice.jrxml. Thisexample shows no discrepancies or issues with the form design.
Compiled Form
The Execute (empty data source) Button
Creating a Spool-File Form 80
© 2008 RJS Software Systems
Clicking the Execute (empty data source) button compiles the form and takes you throughthe steps to display the form as a PDF document without values in the fields.
Note: You can set how to preview your form on the Build menu.
To display the sample form invoice.jrxml as a PDF document without values in the fields:
1. Click the Execute (empty data source) button.
The form compiles.
Then Parameter Prompt displays.
Do not enter a value
2. Without entering a value for the parameter, click OK.
The sample form Invoice displays as a PDF document without values in the fields.
iForms User Guide81
© 2008 RJS Software Systems
Null Values
The Execute (with active connection) Button
Clicking the Execute (with active connection) button compiles the form and takes you throughthe steps to display the form with values in the fields. But before you can preview the form thisway, you must set the JDBC connections, create a text representation of the spool file, and thenuse the Text Layer Designer to map spool-file data to the form.
iForms User Guide83
© 2008 RJS Software Systems
Extracting Data from the Spool File
This section shows you how to extract data from a spool file so you can examine the data as itappears in your form and, later, process reports. Before you extract data from a spool file, though,you must go through the installation and setup processes and you must create a spool-file form.
This section includes the following topics:
Creating a Text Representation of the Spool File
The Text Layer Designer
iReport's Execute (with active connection)
Creating a Text Representation of the Spool FileThis section shows you how to turn the spool file INVOICE into a text file:
1. On a System i command line type WRKOUTQ <MY OUTQ NAME> (where <MY OUTQNAME> is the name of the output queue in which the spool file is located).
In the following example the output queue is RJSIFORMS.
2. Press Enter.
The Work with Output Queue screen displays.
Extracting Data from the Spool File 84
© 2008 RJS Software Systems
Work With Output Queue
3. Without closing this System i session (session A), open another System i session (session B).
4. In session B after adding RJSIFORMS to your library list type IFMSPLTXT then press F4.
The Copy Spool to IFS - PRN screen (the IFMSPLTXT command) displays.
Copy Spool to IFS - PRN
5. In the IFS Output File Name parameter type '/RJSIFORMS/REPORT.TXT'.
iForms User Guide85
© 2008 RJS Software Systems
6. In session A in the Opt line of the spool file you want to work with, type 8.
7. Press Enter.
The attributes of spool file INVOICE display on the Work with Spooled File Attributes screen.
Extracting Data from the Spool File 86
© 2008 RJS Software Systems
8. Copy and paste the following spool-file attributes from session A into the correspondingparameters in session B:
Copy from Session A Paste into Session B
File Spool file name
Job Job name
User User name
Number (Indented under Job) Job number
Number (Indented under File) Spool file number
iForms User Guide87
© 2008 RJS Software Systems
Copy and Pase Attributes from Session A to Session B
9. In Session B press Enter.
The OS/400 Main Menu screen displays with the message CPYOKY: Report has been copiedto file: /RJSIFORMS/REPORT.TXT.
Extracting Data from the Spool File 88
© 2008 RJS Software Systems
The Text Layer DesignerThis topic provides information on extracting data from a text representation of the spool file andinserting it into a form using the Text Layer Designer.
This topic covers the following sub-topics:
The Toolbar
Opening the Form and the Text File
Creating the Text Layer
The Toolbar
Below is the Text Layer Designer toolbar with the names and descriptions of its buttons and field.
New Report Text LayerNote: iForms users should ignore this button.
Open: Opens the form template.
iForms User Guide89
© 2008 RJS Software Systems
Save Report Text Layer: Saves the current text layer.
Close Report Text File: Closes the current text file.
Launch Form Designer: This button has no purpose for iForms users. Note: iForms users should ignore this button.
Launch Form Filler: This button has no purpose for iForms users. Note: iForms users should ignore this button.
Test Merge: Creates a PDF document of the spool-file data appearing in the formtemplate.
Add Field: Changes the mouse button to cross hairs with which you insert fields into thetext layer.
Pointer: Selects, moves, re-shapes, and—by double clicking in a field—opens the FieldProperties dialog box.
Check for Unmatched Form Fields: Checks for two things:
1. Fields found in the text layer but not in the form template.
2. Fields found in the form template but not in the text layer.
First Page: Jumps to the first page of the report currently open.
Previous Page: Moves to the previous page of the report currently open.
Page of Page field: Shows the current page displayed of the total number ofpages. Also, click in the field to type which page you want to display.
Next Page: Moves to the next page of the report currently open.
Extracting Data from the Spool File 90
© 2008 RJS Software Systems
Last Page: Jumps to the last page of the report currently open.
Opening the Form and the Text File
Before working with the Text Layer Designer, you must create a text representation of the spoolfile.
To open the Text Layer Designer:
1. Click Start>All Programs>iForms>Launch Text Layer Designer.
The Text Layer Designer opens.
2. Click the Open button.
Select Form Template displays.
iForms User Guide91
© 2008 RJS Software Systems
3. Change Files of Type to Jasper Reports Template (*JRXML).
4. In the Look In text box enter the System i Windows share where you saved the form youdesigned in iReport.
The templates display.
Extracting Data from the Spool File 92
© 2008 RJS Software Systems
5. Open the form.
Open Report Text File displays.
6. Click Yes.
Open Report Text File displays.
iForms User Guide93
© 2008 RJS Software Systems
7. In the Look In text box enter the System i Windows share where you stored the spool file thatyou converted to a text file in Creating a Text Representation of the Spool File.
8. Open the text file.
The data from your spool file displays. The example below is invoice.txt.
Extracting Data from the Spool File 94
© 2008 RJS Software Systems
Creating the Text Layer
This topic is divided into the following steps:
1. Adding text-layer fields.
2. Checking for unmatched form fields.
3. Test merging.
Adding Text-Layer Fields
Open a form and a text file. For more information, refer to Opening the Form and the Text File.
The sample text file shown here is invoice.txt.
iForms User Guide95
© 2008 RJS Software Systems
1. Click the Add Field button.
When you move the mouse pointer into the text layer, it changes to cross hairs .
2. Add the same number of fields to the text layer as is in the form. Adding fields to the text layeris like inserting a Rectangle into the form in iReport. For more information on inserting aRectangle into the form in iReport, refer to Designing the Form.
It will be easier for you to create a text layer if you add fields in the general location of the datato which they will correspond.
Note: Adding more than one field in the Text Layer Designer is different from inserting morethan one Rectangle in iReport: In the Text Layer Designer you do not have to click the AddField button for every new field.
The example below shows 21 randomly added fields since there are 21 fields in the form invoice.jrxml.
Extracting Data from the Spool File 96
© 2008 RJS Software Systems
3. Click the Pointer button.
The cross hairs change back into a pointer .
4. Move and re-size the fields to fit around the text they will correspond to. Moving and re-sizingfields is like manipulating a Rectangle in iReport.
Note: You can use the coordinates at the bottom of the screen to precisely place and size text-layer fields.
The example below shows the 21 text-layer fields, five of which appear off-screen, moved andre-sized around text.
iForms User Guide97
© 2008 RJS Software Systems
5. Using the Pointer tool, double click inside a field.
Field Properties displays.
Note: iForms users should ignore all check boxes and text fields except Field Name.
Extracting Data from the Spool File 98
© 2008 RJS Software Systems
Note: The Text Layer Designer assigns default names to fields in the order they were created.In the example above, the default name is Field1 because it was the first field created.
6. Click the Field Name drop-down arrow and assign one of the form fields that corresponds tothe selected text-layer field.
Selecting a Field
7. Continue assigning form fields to corresponding text-layer fields until all form fields have beenassigned.
iForms User Guide99
© 2008 RJS Software Systems
Checking for Unmatched Form Fields
Confirm that all the form fields have been assigned to corresponding text-layer fields by clicking
the Check for Unmatched Form Fields button.
Check Unmatched Form Fields displays.
This example shows that:
· Every form field has been assigned to a text-layer field.
· Every text-layer field has been assigned to a form field.
Test Merging
When all form fields have been assigned to text-layer fields:
1. Click the Test Merge button.
Run Test Merge displays, asking if you would like to save the current text layer before runningthe test merge.
Extracting Data from the Spool File 100
© 2008 RJS Software Systems
2. Click Yes to save any changes you have made to the current text layer.
Note: By clicking Yes you save the text layer under the same name as the form but with anRJSXML extension. For instance, the form shown here, invoice.jrxml, appears as text layerinvoice.rjsxml.
Test Merge in Progress displays.
When the test merge ends, the spool-file data displays in the form as a PDF file. Below is a sample report Invoice based on the form invoice.jrxml and the text file invoice.txt. (Only the firstof five pages is shown.)
iForms User Guide101
© 2008 RJS Software Systems
3. Examine the PDF document carefully.
If you like the form layout and how the extracted data looks, you are ready to process thereport. Continue to the next topic Processing Spool-File Reports.
If the form layout needs adjustment, open it in iReport and make the necessary changes. Thentest merge again.
Extracting Data from the Spool File 102
© 2008 RJS Software Systems
iReport's Execute (with active connection)This section shows another way to examine your form with extracted data. Clicking the Execute
(with active connection) button in iReport compiles the form and takes you through the stepsto display it as a PDF document with values in the fields. For more information, refer to Previewing the Form.
Note: Before previewing your form with Execute (with active connection), you must first set theJDBC connection, determine the output programs, and set the Compile Settings. Then you mustcreate a text representation of the spool file and use the Text Layer Designer.
The instructions in this section show how to use the Exectue (with active connection) button withthe sample invoice.jrxml:
1. On the System i type 50 on the command line of the iForms Electronic Forms and ReportWriter screen then press Enter.
The iForms Spool Overlay Setup and Testing Menu screen displays.
iForms Spool Overlay Setup and Testing Menu
2. Type 5 then press Enter.
The Extract Text file to Database screen (the TXTTODB command) displays.
iForms User Guide103
© 2008 RJS Software Systems
Extract Text File to Database
Note: RJS Software recommends that your Output Database Table parameter entry is thesame as the name of the form you are testing, as shown in this example.
3. Open your form in iReport.
4. Click the Execute (with active connection) button:
The form compiles.
Then Parameter Prompt displays.
5. Copy from the TXTTODB command the following two parameter entries:
Default Database Schema/Lib
Output Database Table
Extracting Data from the Spool File 104
© 2008 RJS Software Systems
and paste them into the REPORTSQL text box separated with /.
6. The following example shows the Default Database Schema/Lib RJSTEMP and the OutputDatabase Table INVOICE.
Value entered
7. Click OK
8. The sample form Invoice displays as a PDF document with values in the fields. (Only the firstfive pages is shown in the example Invoice below.)
iForms User Guide107
© 2008 RJS Software Systems
Processing Spool-File Reports
This section shows you how to process spool-file reports. But before you process reports, youmust go through the installation and setup processes, create a spool-file form, and extract datafrom the spool file.
This section includes the following topics:
Individual Spool Files to process one report at a time
Monitoring Output Queues to automate report processing
Individual Spool FilesThe System i commands to process individual spool files are SPLIFORM and SPLIFORMJ.
For more information on these and other iForms System i commands, refer to Appendix A:System i Commands.
Monitoring Output QueuesMonitoring output queues is a nice way to automatically process reports.
To automate report processing, complete the steps in the following two sub-topics:
The Edit Output Queue List Screen
The Edit Forms Destinations Screen
The Edit Output Queue List Screen
The first steps to automate report processing are getting to the Edit Output Queue List screen andthen filling in the parameters there.
1. On the System i type 40 on the command line of the iForms Electronic Forms and ReportWriter screen then press Enter.
The Edit Output Queue List screen displays.
Processing Spool-File Reports 108
© 2008 RJS Software Systems
Edit Output Queue List
This screen is where you configure the output queues that the IFMMON command monitors.But before you configure output queues, you must create a new output-queue entry to monitor.
2. Press F6 to create a new output-queue entry.
The Edit Output Queue List - Create screen displays.
Edit Output Queue List - Create
3. Enter information into the parameters.
The following are descriptions of the parameters of the Edit Output Queue List - Create screenand instructions on what to enter in them:
iForms User Guide109
© 2008 RJS Software Systems
Output Queue
Specifies the output queue that you want to monitor.
QPRINTSpecifies output queue QPRINT.nameSpecify the name of the output queue.
Library
Specifies the library where the output queue is located.
QGPLSpecifies library QGPL.nameSpecify the name of the library.
Description
Specifies a description of the output queue.
character-valueEnter a description.
Note: Entering information in this parameter is optional and has no effect on the settings.
Activate Queue Y/N
Specifies whether or not to activate the output queue. By activating an output queue you canmonitor it.
YActivates the output queue.N Does not activate the output queue.
After Processing Option
Specifies deleting, marking, moving, or doing nothing to the original spool file after it has beensuccessfully processed by the monitor
*DELETEDeletes the original spool file after it has been successfully processed by the monitor.*MARK
Processing Spool-File Reports 110
© 2008 RJS Software Systems
Changes the user-data tag on the original spool file to *SENT. This entry also prevents thespool file from being processed on subsequent passes by the monitor.*MOVEMoves the original spool file to a different output queue after it has been successfullyprocessed by the monitor.*NONEDoes nothing to the original spool file. The spool file will be processed on the next passing ofthe monitor.
Move to Output Queue
If you enter *MOVE in the After Processing Option parameter, this parameter, Move to OutputQueue, specifies the output queue to which you want to send the report .
nameSpecifies the name of the output queue.
Move to Library
If you enter *MOVE in the After Processing Option parameter, this parameter, Move to Library,specifies the library in which the output queue from the Move to Output Queue parameter islocated.
nameSpecifies the name of the library.
Output Queue Group
Specifies processing a group of queues with a unique IFMMON job.
nameSpecify the name of the output-queue group of which you want this entry to be a part. TheOutput Queue Dist Group (QGROUP) parameter field of the IFMMON command referencesthis entry.
For Example: If you have a large number of output queues to monitor, use this option to helpload balance those output queues among multiple IFMMON jobs.
4. After you have entered information in the parameters on the Edit Output Queue List - Createscreen, press Enter to accept the parameter entries.
5. Press F12 to return to the Edit Output Queue List screen. Once there, you can configureentries from the create screen. Or you can refresh by pressing F5.
After you have finished with the Edit Output Queue List screen, press F3, which displays TheiForms Electronic Forms and Report Writer screen, and continue to the sub-topic, The EditForms Destination Screen.
iForms User Guide111
© 2008 RJS Software Systems
The Edit Forms Destinations Screen
Before going through the steps in this sub-topic, complete the steps in The Edit Output Queue ListScreen.
1. On the command line of The iForms Electronic Forms and Report Writer screen type 41 thenpress Enter.
The Edit Forms Destinations screen displays.
Edit Forms Destinations
This screen is where you configure how each spool file or group of spool files are processedwhen found in the output-queue configuration that you set up on the Edit Output Queue Listscreen. But before you configure how spool files are processed, you must create a new spoolfile-configuration entry.
2. Press F6 to create a new spool file-configuration entry.
The Edit Forms Destinations - Create screen displays.
Processing Spool-File Reports 112
© 2008 RJS Software Systems
Edit Forms Destinations - Create
3. Enter information into the parameters.
The following are descriptions of the parameters of the Edit Forms Destinations - Createscreen and instructions on what to enter in them:
Output Queue
Specifies the output queue from the Output Queue parameter on the Edit Output Queue List -Create screen.
nameSpecify the name of the output queue.
Library
Specifies the library from the Library parameter on the Edit Output Queue List - Create screen.
nameSpecify the name of the library.
Activate Entry
Specifies whether or not to activate processing reports with the parameters on this screen, EditForms Destinations - Create.
YProcesses reports with the parameters on this screen.NDoes not process reports with the parameters on this screen.
iForms User Guide113
© 2008 RJS Software Systems
Use Extended Select Y/N
Specifies whether or not to use the Extended Selection criteria, the parameters of which arenoted on this screen, Edit Forms Destinations - Create, with the abbreviation Ext.
NDoes not use the Extended Selection criteria.YUses the Extended Selection criteria.
Ext Spool File
Specifies processing spool-file reports that match this name.
nameSpecify the name of the spool file.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Ext Spool Userdata
Specifies processing spool-file reports that match this user-defined data.
character-valueSpecify the user-defined data.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Ext Spool UserID
Specifies processing spool-file reports that match this user ID.
nameSpecify the name of the user who produced the spool file.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Ext Spool Job
Specifies processing spool-file reports that match this job name.
Processing Spool-File Reports 114
© 2008 RJS Software Systems
nameSpecify the name of the job.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Ext Spool Form
Specifies processing spool-file reports that match this form type.
character-valueSpecify the form type.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Ext Pgm
Specifies processing spool-file reports that match the program that opened the spool file.
character-valueSpecify the program that opened the file.
Note: This parameter will only function if you enter Y in the Use Extended Select Y/Nparameter. If you enter Y in the Use Extended Select Y/N parameter, you can use any or all ofthe Extended Select criteria.
Output Type:
Specifies which file-format type is used to create the report.
PDFCreates the report as a PDF document.XMLCreates the report as an XML document.HTMLCreates the report as an HTML document.
Replace Output
Specifies whether or not to replace the output IFS file if it already exists.
YReplaces an existing IFS output file.NDoes not replace an existing IFS output file.
iForms User Guide115
© 2008 RJS Software Systems
Remove Last PDF Page
Specifies whether or not to delete the last page of a PDF document. This parameter is useful ifyour report generates a blank last page.
NDoes not delete the last page of a PDF document.YDeletes the last page of a PDF document.
Caution: Enter N unless you are absolutely certain you will not lose any data from your report.
Delete IFS After Respool/Print
Specifies whether or not to delete the temporary IFS file after re-spooling or printing the report.
YDelete the temporary IFS file after re-spooling or printing the report.NDoes not delete the temporary IFS file after re-spooling or printing the report.
Respool output
Specifies whether or not to re-spool the final document to an output queue. The documentre-spools in its raw, converted form.
For example: If you processed a report as a PDF, the PDF file is re-spooled as a PDF. It doesnot convert to PCL or PostScript print format.
NDoes not re-spool the report to an output queue.YRe-spools the report to an output queue.
Print Output
Specifies whether or not to print the report.
NDoes not print the report.YPrints the report.
Respool queue/lib
Processing Spool-File Reports 116
© 2008 RJS Software Systems
Specifies the output queue and library to which you want to re-spool the report.
nameSpecify the name of the output queue and library.
Note: This parameter will only function if you enter Y in the Respool Output parameter.
Copies
Specifies the number of copies of the report to print.
1Prints one copy.1-255Enter the number of copies between 1-255.
Note: This parameter will only function if you enter Y in the Print Output parameter.
Print queue/lib.
Specifies the print queue and library to which you want to send the report.
nameSpecify the name of the print queue and library.
Note: This parameter will only function if you enter Y in the Print Output parameter.
Device Type
Specifies the Ghostscript-supported printer-device type.
lj5graySpecifies printer-device type lj5gray.character-valueSpecify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Note: This parameter will only function if you enter Y in the Print Output parameter.
Paper Size
Specifies the Ghostscript-supported printer-paper size.
letterSpecifies printer-paper size letter.character-valueSpecify the printer-paper size.
iForms User Guide117
© 2008 RJS Software Systems
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Duplex
Specifies whether or not to print on both sides of the page.
NDoes not print on both sides of the page.YPrints on both sides of the page.
Note: This parameter will only function if you enter Y in the Print Output parameter.
TumbleSpecifies how data is printed on both sides of the page. To use this parameter correctly, youmust know if you are printing in landscape or portrait orientation, which you determine in thePaper Size parameter.
*LONGEDGEWhen printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound at thetop, which is still the long edge. But the difference is that in landscape orientation this settingprints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Dsp Stdout
Specifies whether or not to display Java errors after processing a report.
NDoes not display Java errors.YDisplays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Processing Spool-File Reports 118
© 2008 RJS Software Systems
Print Stdout
Specifies whether or not to print Java errors after processing a report.NDoes not print Java errors.YPrints Java errors.
Note: Use this entry primarily for testing and troubleshooting.
New Spool File
Specifies the next spool file to go to an output queue.
nameSpecify the name of the next spool file.
Note: This parameter will only function if you enter Y in the Respool Output parameter.
GS Parm
Specifies the Ghostscript dots-per-inch (DPI) parameters or other parameters.
character-valueSpecify the Ghostscript dots-per-inch parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Softwarerecommends trying -r300 and experimenting from there.
Note: Lower resolution can increase printing speed.
JRXML
Specifies the file path of the form template created in iReport.
character-valueSpecify the file path and name with a JRXML extension.
For example: /RJSIFORMS/INVOICE.JRXML
RJSXML
Specifies the text-layer file path. You create this file with the Text Layer Designer.
character-valueSpecify the file path and name with an RJSXML extension.
iForms User Guide119
© 2008 RJS Software Systems
For example: /RJSIFORMS/INVOICE.RJSXML
IFS Out
Specifies the output file path.
*AUTOGENAuto-generates the naming convention.character-valueSpecify the file path and name.
For example: /RJSIFORMS/INVOICE.PDF
4. After you have entered information in the parameters on the Edit Forms Destinations - Createscreen, press Enter to accept the parameter entries.
5. Press F12 to return to the Edit Forms Destinations screen. Once there, you can configureentries from the Create screen.
6. The final step in monitoring output queues to process reports is running the command, IFMMON.
For more information on this and other iForms System i commands, refer to Appendix A:System i Commands.
iForms User Guide121
© 2008 RJS Software Systems
Creating a Database Report
With iForms you can also create database-query reports.
To create a report from the sample table QCUSTCDT in library QIWS:
1. Open the form designer, iReport.
2. Set the JDBC conncection.
3. Determine the output programs.
4. Set the compile settings.
5. On the File menu click Report Wizard.
The iReport Wizard displays.
iReport Wizard
6. Type SELECT * FROM QIWS/QCUSTCDT in the SQL Query text box then click Next.
7. Continue following the steps of the iReport Wizard.
The template displays. The example shown here is classic_landscapeT.xml in Tabular Layout,which you can set in step 4 of the iReport Wizard.
Creating a Database Report 122
© 2008 RJS Software Systems
classic_landscapeT.xml
8. Click the Execute (with active connection) button. (Refer to Previewing the Form for animage of where to find the button on the toolbar.)
The report compiles then displays in the format you set when you determined the outputprograms. The example shown here displays as a PDF document.
For more information on creating, improving the design of, and processing your owndatabase-query reports:
· Refer to Designing the Form.
· Refer to the "Creating Your First Report" section of Chapter 1 in The Definitive Guide to iReport.
iForms User Guide123
© 2008 RJS Software Systems
· View an on-line report-wizard tutorial at http://www.jasperforge.org/jaspersoft/opensource/business_intelligence/ireport/page.php?id=8.While the version of iReport in the tutorial is not current, the information in the tutorial is stillhelpful.
· Contact RJS Software. We offer report-design, report-processing, and other services.
iForms User Guide125
© 2008 RJS Software Systems
Appendices
The appendices provide supplemental reference information for iForms users.
The appendices are:
Appendix A: System i Commands
Appendix B: Supported Printer-Device Types
Appendix C: Supported Printer-Paper Sizes
Appendix D: Java Scriptlet Sample
Appendix A: System i CommandsThis section contains detailed descriptions of and command syntax for each iForms System icommand.
The formatting of these commands is similar to IBM's formatting for their i5/OS control-languagecommands.
Note the following about iForms System i commands:
· Parameter-entry types are in lowercase, bold, italic type.
For example: name means that the parameter entry should be a name, like a spool-file name oran output-queue name.
· Parameter-entry options are in bold, non-italic type.
For example: *SHORTEDGE means that you can enter "*SHORTEDGE" into its parameter.
· Default parameter entries are in bold, non-italic type and underlined.
For example: lj5gray means that, unless you change it, "lj5gray" is that parameter's entry.
Note: Regardless of how they appear in this user guide or in the command itself, parameterentries are not case sensitive.
ADDIFSSHR Add or Remove IFS Share
Add/Remove IFS Share (ADDIFSSHR)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Add/Remove IFS Share (ADDIFSSHR) command creates or deletes an IFS Windows share.
Appendices 126
© 2008 RJS Software Systems
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
SHARENAME Share name Character value Required,Positional 1
ACTION Add/Remove Share Logical value, *ADD, *REMOVE Optional,Positional 2
PATHNAME Path name (startingwith '/')
Path name Required,Positional 3
TEXT Text description forthe Share
Character value Optional,Positional 4
PERMISSION Permissions on theShare
1-2, *READONLY, *READWRITE Optional,Positional 5
MAXUSERS Max number ofconcurrent users
Integer, *NOMAX Optional,Positional 6
CCSID CCSID encoding ofpath name
Integer, *JOB Optional,Positional 7
Top
Share name (SHARENAME)
Specifies the share you will create or delete.
This is a required parameter.character-value
Specify the name of the share.
Top
Add/Remove Share (ACTION)
Specifies the creation or deletion of the share.*ADD
Creates the share.*REMOVE
iForms User Guide127
© 2008 RJS Software Systems
Deletes the share.
Top
Path name (starting with '/') (PATHNAME)
Specifies the path to the IFS folder that you want to share.
This is a required parameter.path-name
Specify the path name of the IFS folder, starting with '/'.
Top
Text description for the Share (TEXT)
Specifies any optional, descriptive information you want assigned to the share.character-value
Specify the optional, descriptive information.
Top
Permissions on the Share (PERMISSION)
Specifies what you or other users can do with the share.*READONLY
This entry allows only viewing files or directories within the share.*READWRITE
This entry allows viewing, adding, and deleting files or directories within the share.
Top
Max number of concurrent users (MAXUSERS)
Specifies the maximum number of users who can browse the share at the same time.*NOMAX
Does not assign a maximum number of users who can browse the share at the same time.integer
Specify the maximum number of users who can browse the share at the same time.
Top
CCSID encoding of path name (CCSID)
Specifies the coded character set ID (CCSID) used for the Path name (PATHNAME) parameter.
Note: CCSID is related to language settings and language conversions.
Appendices 128
© 2008 RJS Software Systems
*JOBSpecifies the CCSID of the current job.
integerSpecify the CCSID.
Top
Examples for ADDIFSSHR
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleADDIFSSHR SHARENAME(RJSIFORMS)
This command creates the share RJSIFORMS.
Example 2: More Complex Command ExampleADDIFSSHR SHARENAME(RJSIFORMS) ACTION(*ADD) PATHNAME('/RJSIFORMS')MAXUSERS(*NOMAX)
This command creates the share RJSIFORMS on the file path /RJSIFORMS with no maximumnumber of contiguous users.
Top
Error messages for ADDIFSSHR
*ESCAPE MessagesCPF9898
&1.
Top
CHKOBJIFS Check for IFS File Existence
Check for IFS File Existence (CHKOBJIFS)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Check for IFS File Existence (CHKOBJIFS) command checks for the existence of an IFSdirectory or file. The command returns a CPF9898 message if the IFS file is not found. Thecommand returns a CPF9897 message if the IFS file is found.
iForms User Guide129
© 2008 RJS Software Systems
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
FILNAM IFS file name Character value Required,Positional 1
Top
IFS file name (FILNAM)
Specifies the IFS file or directory of which you want to check the existence.
This is a required parameter.character-value
Specify the name of the IFS file path, starting with '/'.
Top
Example for CHKOBJIFS
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
CHKOBJIFS FILNAM(/RJSIFORMS/INVOICE.PDF)
This command checks for the existence of the file /RJSIFORMS/INVOICE.PDF.
Top
Error messages for CHKOBJIFS
*ESCAPE MessagesCPF9898
&1.
Top
Appendices 130
© 2008 RJS Software Systems
IFMATR Retrieve Spool-File Attributes
Retrieve Spooled File Attr (IFMATR)
Where allowed to run:
· Batch program (*BPGM)· Interactive program (*IPGM)
Threadsafe: No
ParametersExamples
Error messages
The Retrieve Spooled File Attr (IFMATR) command retrieves attributes for a selected spool file.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must retrieve all parameters when calling this command or you will get an error.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
SPLF Spooled file Name Required,Positional 1
JOB Job name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: Jobname
Name
Qualifier 2: Username
Name
Qualifier 3: Number Character value
SPLNBR Spooled filenumber
Decimal number, *ONLY, *LAST Optional,Positional 3
FORMTYPE Form type (10) Character value Optional,Positional 4
OUTPTY Output priority (2) Character value Optional,Positional 5
COPIES Total number ofcopies (5 0)
Decimal number Optional,Positional 6
iForms User Guide131
© 2008 RJS Software Systems
MAXRCDS Maximum records(10 0)
Decimal number Optional,Positional 7
FILESEP File separators (50)
Decimal number Optional,Positional 8
SCHEDULE Schedule (8) Character value Optional,Positional 9
HOLD Hold file (10) Character value Optional,Positional10
SAVE Save after output(10)
Character value Optional,Positional11
DEVTYPE Device type (10) Character value Optional,Positional12
PRTTYPE Printer type (10) Character value Optional,Positional13
DEVFILE Device file (10) Character value Optional,Positional14
DEVFILEL Device file library(10)
Character value Optional,Positional15
USRDTA User data (10) Character value Optional,Positional16
ACGCDE Accounting code(15)
Character value Optional,Positional17
OPNPGM Program whichopened file (10)
Character value Optional,Positional18
OPNPGML Pgm lib whichopened file (10)
Character value Optional,Positional19
OPNDAT Open date (7) Character value Optional,Positional20
OPNTIM Open time (6) Character value Optional,Positional21
PAGWTN Page being written(5 0)
Decimal number Optional,Positional22
Appendices 132
© 2008 RJS Software Systems
TOTPAG Total pages (5 0) Decimal number Optional,Positional23
RCDLEN Record length (5 0) Decimal number Optional,Positional24
PAGLEN Page length (5 0) Decimal number Optional,Positional25
PAGWDT Page width (5 0) Decimal number Optional,Positional26
LPI Lines per inch (5) Character value Optional,Positional27
CPI Characters per inch(5)
Character value Optional,Positional28
OVRFLW Overflow line (5 0) Decimal number Optional,Positional29
FOLD Fold print line (10) Character value Optional,Positional30
CTLCHAR Control character(10)
Character value Optional,Positional31
RPLUNPRT Replaceunprintable char (4)
Character value Optional,Positional32
ALIGN Align forms (10) Character value Optional,Positional33
PRTQLTY Print quality (10) Character value Optional,Positional34
FORMFEED Form feed (10) Character value Optional,Positional35
DRAWER Drawer (5 0) Decimal number Optional,Positional36
FONT Printer font (10) Character value Optional,Positional37
iForms User Guide133
© 2008 RJS Software Systems
PAGRTT Page rotation (5 0) Decimal number Optional,Positional38
JUSTIFY Justification (5 0) Decimal number Optional,Positional39
DUPLEX Print on both sides(10)
Character value Optional,Positional40
Top
Spooled file (SPLF)
Specifies the spool file of which you want to retrieve the attributes.
This is a required parameter.name
Specify the name of the spool file.
Top
Job name (JOB)
Specifies the job that created the spool file.
Single values*
Use this entry for the current job.
Qualifier 1: Job namename
Specify the name of the job.
Qualifier 2: User namename
Specify the user name that identifies the user profile under which the job is run.
Qualifier 3: Numbercharacter-value
Specify the system-assigned job number.
Top
Spooled file number (SPLNBR)
Specifies the spool-file number.*ONLY
Appendices 134
© 2008 RJS Software Systems
Selects a spool file if it is the only one in a selected job.*LAST
Selects the most recent spool file.decimal-number
Specify the number of the spool file.
Top
Form type (10) (FORMTYPE)
Specifies the name of a CL variable that receives the form type of the selected spool file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Output priority (2) (OUTPTY)
Specifies the name of a CL variable that receives the output priority of the selected spool file.character-value
The variable must be a character variable with a minimum length of two characters.
Top
Total number of copies (5 0) (COPIES)
Specifies the name of a CL variable that receives the value for the number of copies of the spoolfile to print.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Maximum records (10 0) (MAXRCDS)
Specifies the name of a CL variable that receives the value for the number of maximum recordsof the spool file.decimal-number
The variable must be a 10-digit decimal variable with no decimal positions.
Top
File separators (5 0) (FILESEP)
Specifies the name of a CL variable that receives the value for the number of file-separator pagesthat are placed at the beginning of each copy of the spool file.decimal-number
iForms User Guide135
© 2008 RJS Software Systems
The variable must be a five-digit decimal variable with no decimal positions.
Top
Schedule (8) (SCHEDULE)
Specifies the name of a CL variable that receives the value for the availablitiy of the spool-fileoutput.character-value
The variable must be a character variable with a minimum length of eight characters.
Top
Hold file (10) (HOLD)
Specifies the name of a CL variable that receives the value for whether or not the spool file isplaced on hold.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Save after output (10) (SAVE)
Specifies the name of a CL variable that receives the value for whether or not the spool file issaved after the output has been produced.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Device type (10) (DEVTYPE)
Specifies the name of a CL variable that receives the value for the device type for which the filewas intended.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Printer type (10) (PRTTYPE)
Specifies the name of a CL variable that receives the value for the type of data stream used torepresent the file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Appendices 136
© 2008 RJS Software Systems
Top
Device file (10) (DEVFILE)
Specifies the name of a CL variable that receives the value for the name of the device file thatwas used to create the spool file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Device file library (10) (DEVFILEL)
Specifies the name of a CL variable that receives the value for the name of the library thatcontains the device file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
User data (10) (USRDTA)
Specifies the name of a CL variable that receives the value for the 10 characters of user-specifieddata that describe the file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Accounting code (15) (ACGCDE)
Specifies the name of a CL variable that receives the value for the accounting code that is usedwhen logging the resources used to write the file.character-value
The variable must be a character variable with a minimum length of 15 characters.
Top
Program which opened file (10) (OPNPGM)
Specifies the name of a CL variable that receives the value for the name of the program thatopened the spool file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
iForms User Guide137
© 2008 RJS Software Systems
Pgm lib which opened file (10) (OPNPGML)
Specifies the name of a CL variable that receives the value for the name of the library thatcontains the program that opened the spool file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Open date (7) (OPNDAT)
Specifies the name of a CL variable that receives the value for the date that the file was opened.character-value
The variable must be a character variable with a minimum length of seven characters.
Top
Open time (6) (OPNTIM)
Specifies the name of a CL variable that receives the value for the time that the file was opened.character-value
The variable must be a character variable with a minimum length of six characters.
Top
Page being written (5 0) (PAGWTN)
Specifies the name of a CL variable that receives the value for the page number in the spool filethat the writer is currently processing.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Total pages (5 0) (TOTPAG)
Specifies the name of a CL variable that receives the value for the total number of pages in thespool file.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Appendices 138
© 2008 RJS Software Systems
Record length (5 0) (RCDLEN)
Specifies the name of a CL variable that receives the value for the the length of the file records.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Page length (5 0) (PAGLEN)
Specifies the name of a CL variable that receives the value for the length of the page.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Page width (5 0) (PAGWDT)
Specifies the name of a CL variable that receives the value for the width of the page.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Lines per inch (5) (LPI)
Specifies the name of a CL variable that receives the value for the number of lines per verticalinch as defined in the spool file.character-value
The variable must be a character variable with a minimum length of five characters.
Top
Characters per inch (5) (CPI)
Specifies the name of a CL variable that receives the value for the number of characters perhorizontal inch as defined in the spool file.character-value
The variable must be a character variable with a minimum length of five characters.
Top
Overflow line (5 0) (OVRFLW)
Specifies the name of a CL variable that receives the value for the line number at which a
iForms User Guide139
© 2008 RJS Software Systems
message indicates that the placement of print data has reached the overflow area on the page.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Fold print line (10) (FOLD)
Specifies the name of a CL variable that receives the value for whether or not records exceedingthe printer-forms width are folded, or wrapped, to the next line.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Control character (10) (CTLCHAR)
Specifies the name of a CL variable that receives the value for whether or not this spool file usesthe first-character forms-control characters.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Replace unprintable char (4) (RPLUNPRT)
Specifies the name of a CL variable that receives the value for whether or not unprintablecharacters are to be replaced with another character.character-value
The variable must be a character variable with a minimum length of four characters.
Top
Align forms (10) (ALIGN)
Specifies the name of a CL variable that receives the value for whether or not a forms-alignmentmessage will be sent prior to printing this spool file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Print quality (10) (PRTQLTY)
Specifies the name of a CL variable that receives the value for the print quality that is used whenprinting this output.
Appendices 140
© 2008 RJS Software Systems
character-valueThe variable must be a character variable with a minimum length of 10 characters.
Top
Form feed (10) (FORMFEED)
Specifies the name of a CL variable that receives the value for the manner in which forms are fedto the printer.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Drawer (5 0) (DRAWER)
Specifies the name of a CL variable that receives the value for the drawer to be used when theform-feed-attribute value is *AUTOCUT.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Printer font (10) (FONT)
Specifies the name of a CL variable that receives the value for the printer font.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Page rotation (5 0) (PAGRTT)
Specifies the name of a CL variable that receives the value for the degree of rotation of the text onthe page with respect to the way the form is loaded into the printer.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
Top
Justification (5 0) (JUSTIFY)
Specifies the name of a CL variable that receives the value for the percentage that the output isright-justified.decimal-number
The variable must be a five-digit decimal variable with no decimal positions.
iForms User Guide141
© 2008 RJS Software Systems
Top
Print on both sides (10) (DUPLEX)
Specifies the name of a CL variable that receives the value for how the printed output will appearon the printed page.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Example for IFMATR
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMATR SPLF(INVOICE) JOB(000001/TEST/QPADEV0001) SPLNBR(123456) FORMTYPE(&FORMTYPE) OUTPTY(&OUTPTY) COPIES(&COPIES) MAXRCDS(&MAXRCDS) FILESEP(&FILESEP) SCHEDULE(&SCHEDULE) HOLD(&HOLD) SAVE(&SAVE) DEVTYPE(&DEVTYPE) PRTTYPE(&PRTTYPE) DEVFILE(&DEVFILE) DEVFILEL(&DEVFILEL) USRDTA(&USRDTA) ACGCDE(&ACGCDE) OPNPGM(&OPNPGM) OPNPGML(&OPNPGML) OPNDAT(&OPNDAT) PAGWTN(&PAGWTN) TOTPAG(&TOTPAG) RCDLEN(&RCDLEN) PAGLEN(&PAGLEN) PAGWDT(&PAGWDT) LPI(&LPI) CPI(&CPI) OVRFLW(&OVRFLW) FOLD(&FOLD) CTLCHAR(&CTLCHAR) RPLUNPRT(&RPLUNPRT) ALIGN(&ALIGN) PRTQLTY(&PRTQLTY) FORMFEED(&FORMFEED) DRAWER(&DRAWER) FONT(&FONT) PAGRTT(&PAGRTT) JUSTIFY(&JUSTIFY)
Appendices 142
© 2008 RJS Software Systems
DUPLEX(&DUPLEX)
For the spool file INVOICE with job name QPADEV0001, user name TEST, job number 000001,and spool-file number 123456, this command retrieves the following:
· The form type.· The output priority.· The total number of copies to print.· The maximum number of records.· The number of file-separator pages at the beginning of each copy of the spool file.· The availability of the spool-file output.· Whether or not the spool file is placed on hold.· Whether or not the spool file is saved after the output has been produced.· The device type for which the file was intended.· The type of data stream used to represent the file.· The name of the device file that was used to create the spool file.· The name of the library that contains the device file.· The 10 characters of user-specified data that describe the file.· The accounting code that is used when logging the resources used to write the file.· The name of the program that opened the spool file.· The name of the library that contains the program that opened the spool file.· The date that the file was openend.· The time that the file was openend.· The page number in the spool file that the writer is currently processing.· The total number of pages in the spool file.· The length of the file records.· The length of the page.· The width of the page.· The number of lines per vertical inch as defined in the spool file.· The number of characters per horizontal inch as defined in the spool file.· The line number at which a message indicates that the placement of print data has reached
the overflow area on the page.· Whether or not records exceeding the printer-forms width are folded, or wrapped, to the
next line.· Whether or not this spool file uses the first-character forms-control characters.· Whether or not unprintable characters are to be replaced with another character.· Whether or not a forms-alignment message will be sent prior to printing this spool file.· The print quality that is used when printing this output.· The manner in which forms are fed to the printer.· The drawer to be used when the form-feed-attributive value is *AUTOCUT.· The printer font.· The degree of rotation of the text on the page, with repsect to the way the form is loaded
into the printer.· The percentage that the output is right-justified.· How the printed output will appear on the printed page.
Top
Error messages for IFMATR
*ESCAPE MessagesCPF9898
iForms User Guide143
© 2008 RJS Software Systems
&1.
Top
IFMATR2 Retrieve Spool-File Attributes 2
Retrieve Spooled File Attr (IFMATR2)
Where allowed to run:
· Batch program (*BPGM)· Interactive program (*IPGM)
Threadsafe: No
ParametersExamples
Error messages
The Retrieve Spooled File Attr (IFMATR2) command retrieves attributes for a selected spool file.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must retrieve all parameters when calling this command or you will get an error.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
SPLF Spooled file Name Required,Positional 1
JOB Job name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: Jobname
Name
Qualifier 2: Username
Name
Qualifier 3: Number Character value
SPLNBR Spooled filenumber
Decimal number, *ONLY, *LAST Optional,Positional 3
OUTQ Output queue (10) Character value Optional,Positional 4
OUTQLIB Output queuelibrary (10)
Character value Optional,Positional 5
Appendices 144
© 2008 RJS Software Systems
USRDFNDTA User defined data(255)
Character value Optional,Positional 6
STATUS Status (10) Character value Optional,Positional 7
Top
Spooled file (SPLF)
Specifies the spool file of which you want to retrieve the attributes.
This is a required parameter.name
Specify the name of the spool file.
Top
Job name (JOB)
Specifies the job that created the spool file.
Single values*
Use this entry for the current job.
Qualifier 1: Job namename
Specify the name of the job.
Qualifier 2: User namename
Specify the user name that identifies the user profile under which the job is run.
Qualifier 3: Numbercharacter-value
Specify the system-assigned job number.
Top
Spooled file number (SPLNBR)
Specifies the spool-file number.*ONLY
Selects a spool file if it is the only one in a selected job.*LAST
Selects the most recent spool file.decimal-number
Specify the number of the spool file.
iForms User Guide145
© 2008 RJS Software Systems
Top
Output queue (10) (OUTQ)
Specifies the name of a CL variable that receives the value for the name of the output queue inwhich the spool file is located.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Output queue library (10) (OUTQLIB)
Specifies the name of a CL variable that receives the value for the name of the library in which theoutput queue is located.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
User defined data (255) (USRDFNDTA)
Specifies the name of a CL variable that receives the value for the user-defined data of the spoolfile.character-value
The variable must be a character variable with a minimum length of 255 characters.
Top
Status (10) (STATUS)
Specifies the name of a CL variable that receives the value for the status of the file.character-value
The variable must be a character variable with a minimum length of 10 characters.
Top
Example for IFMATR2
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMATR2 SPLF(INVOICE) JOB(000001/TEST/QPADEV0001) SPLNBR(123456)
Appendices 146
© 2008 RJS Software Systems
OUTQ(&OUTQ) OUTQLIB(&OUTQLIB) USRDFNDTA(&USRDFNDTA) STATUS(&STATUS)
This command retrieves the output queue, output-queue library, user-defined data, and status forthe following spool file: INVOICE with job name QPADEV0001, user name TEST, job number000001, and spool-file number 123456.
Top
Error messages for IFMATR2
*ESCAPE MessagesCPF9898
&1.
Top
IFMJAVAEN Restore Java Objects to the IFS
Restore Java Objects (IFMJAVAEN)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Restore Java Objects (IFMJAVAEN) command restores iForms Java objects to the IFS.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
There are no parameters for this command.
Top
Parameters
None
Top
iForms User Guide147
© 2008 RJS Software Systems
Example for IFMJAVAEN
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMJAVAEN
This command restores iForms Java objects.
Top
Error messages for IFMJAVAEN
*ESCAPE MessagesCPF9898
&1.
Top
IFMLIST List Output Queue Entries
List Output Queue Entries (IFMLIST)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The List Output Queue Entries (IFMLIST) command lists, in an output queue, information aboutspool files in selected output queues.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
Appendices 148
© 2008 RJS Software Systems
OUTQ Output queue to list Qualified object name Required,Positional 1
Qualifier 1: Outputqueue to list
Name
Qualifier 2: Library Name, *LIBL
OUTFILE File to receiveoutput
Qualified object name Optional,Positional 2
Qualifier 1: File toreceive output
Name, IFMSLIST
Qualifier 2: Library Name, QTEMP
SELSPLF Select spool file Character value Optional,Positional 3
SELUSRDTA Select user data Character value Optional,Positional 4
SELUSER Select user ID Character value Optional,Positional 5
SELJOB Select job name Character value Optional,Positional 6
SELFORM Select form type Character value Optional,Positional 7
SELPGM Select program Character value Optional,Positional 8
SELUSRDFN Select user defineddata
Character value Optional,Positional 9
Top
Output queue to list (OUTQ)
Specifies the output queue about which to retrieve information.
This is a required parameter.
Qualifier 1: Output queue to listname
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library list where the output queue is located.
Top
iForms User Guide149
© 2008 RJS Software Systems
File to receive output (OUTFILE)
Specifies the file that receives the output-queue information.
Qualifier 1: File to receive outputIFMSLIST
Specifies file IFMSLISTname
Specify the name of the file.
Qualifier 2: LibraryQTEMP
Specifies library QTEMP.name
Specify the name of the library.
Top
Select spool file (SELSPLF)
Specifies returning information on spool files that have this name.character-value
Specify the spool-file name.
Top
Select user data (SELUSRDTA)
Specifies returning information on spool files that have this user-data tag.character-value
Specify the user-data tag.
Top
Select user ID (SELUSER)
Specifies returning information on spool files that have this user ID.character-value
Specify the user ID.
Top
Select job name (SELJOB)
Specifies returning information on spool files that have this job name.character-value
Specify the job name.
Appendices 150
© 2008 RJS Software Systems
Top
Select form type (SELFORM)
Specifies returning information on spool files that have this form type.character-value
Specify the form type.
Top
Select program (SELPGM)
Specifies returning information on spool files that were opened by this program.character-value
Specify the program.
Top
Select user defined data (SELUSRDFN)
Specifies returning information on spool files that have this user-defined data.character-value
Specify the user-defined data.
Top
Examples for IFMLIST
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleIFMLIST OUTQ(QGPL/RJSIFORMS)
This command lists information about spool files in the output queue RJSIFORMS in the libraryQGPL.
Example 2: More Complex Command ExampleIFMLIST OUTQ(QGPL/RJSIFORMS) OUTFILE(QTEMP/IFMSLIST) SELSPLF(INVOICE) SELUSRDTA(SAMPLE) SELJOB(TEST)
This command lists information about the spool file INVOICE with user data SAMPLE and jobname TEST, which is in the output queue RJSIFORMS and in the library QGPL. The fileIFMSLIST in the library QTEMP receives the information.
iForms User Guide151
© 2008 RJS Software Systems
Top
Error messages for IFMLIST
*ESCAPE MessagesCPF9898
&1.
Top
IFMMON iForms Output Queue Monitor
iForms Output Queue Monitor (IFMMON)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The iForms Output Queue Monitor (IFMMON) command automatically monitors the selectedoutput queues for reports to process.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
DELAY Delay processingor run once
*DELAY, *ONCE Optional,Positional 1
DLYTIM Delay betweencycles (seconds)
1-999999, 300 Optional,Positional 2
ENDTIME Time to endprogram(HHMMSS)
000000-235900, 160000 Optional,Positional 3
Appendices 152
© 2008 RJS Software Systems
QGROUP Output queue distgroup
Character value Optional,Positional 4
Top
Delay processing or run once (DELAY)
Specifies running the output-queue monitor continuously or running it once.*DELAY
Runs the output-queue monitor continuously from the time you run the command until the endtime.
*ONCERuns the output-queue monitor once.
Top
Delay between cycles (seconds) (DLYTIM)
Specifies the number of seconds between processing cylces.300
Specifies 300 seconds, which equals five minutes.1-999999
Enter the number of seconds between one and 999,999.
Top
Time to end program (HHMMSS) (ENDTIME)
Specifies the time the program ends.160000
Specifies 160000, which is 16:00:00 (4:00 p.m.) on the 24-hour clock.000000-235900
Enter the time, based on the 24-hour clock, in the range of 000000 (midnight) - 235900 (11:59p.m.).
Top
Output queue dist group (QGROUP)
Specifies the output-queue distribution group, which only runs whatever output queues are in it.character-value
Specify the name of the output-queue distribution group. The Output Queue Group parameterof the Edit Output Queue List - Create screen references this entry.
Top
iForms User Guide153
© 2008 RJS Software Systems
Example for IFMMON
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMMON DELAY(*DELAY) DLYTIM(600) ENDTIME(173000) QGROUP(MONTHEND)
This command runs the output-queue distribution group MONTHEND every 600 seconds, or 10minutes, until 17:30:00, or 5:30 p.m.
Top
Error messages for IFMMON
*ESCAPE MessagesCPF9898
&1.
Top
IFMNUM Retrieve Spool-File Job Name and Number
Retrieve Spool Name/Number (IFMNUM)
Where allowed to run:
· Batch program (*BPGM)· Interactive program (*IPGM)
Threadsafe: No
ParametersExamples
Error messages
The Retrieve Spool Name/Number (IFMNUM) command retrieves job information for a selectedspool file before you process it as a report with the SPLIFORM command.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must return all parameters when calling this command or you will get an error.· This command is not threadsafe.
Top
Parameters
Appendices 154
© 2008 RJS Software Systems
Keyword Description Choices Notes
SPLF Spooled file Name Required,Positional 1
JOB Job name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: Jobname
Name
Qualifier 2: Username
Name
Qualifier 3: Number Character value
SPLNBR Spooled filenumber
Decimal number, *ONLY, *LAST Optional,Positional 3
RTNSPLF Return Spool File(10)
Character value Optional,Positional 4
RTNJOBNAME Return Job Name(10)
Character value Optional,Positional 5
RTNJOBUSER Return Job User(10)
Character value Optional,Positional 6
RTNJOBNUM Return JobNumber (6)
Character value Optional,Positional 7
RTNSPLNUM Return SpoolNumber (6)
Character value Optional,Positional 8
Top
Spooled file (SPLF)
Specifies the spool file about which you want to retrieve information.
This is a required parameter.name
Specify the name of the spool file.
Top
Job name (JOB)
Specifies the job that created the spool file.
Single values*
Use this entry for the current job.
Qualifier 1: Job name
iForms User Guide155
© 2008 RJS Software Systems
nameSpecify the name of the job.
Qualifier 2: User namename
Specify the name that identifies the user profile under which the job is run.
Qualifier 3: Numbercharacter-value
Specify the system-assigned job number
Top
Spooled file number (SPLNBR)
Specifies the spool-file number.*ONLY
Processes a spool file if it is the only one in a selected job.*LAST
Processes the most recent spool file.decimal-number
Enter the spool-file number.
Top
Return Spool File (10) (RTNSPLF)
This parameter returns a 10-character spool-file name for the selected spool file.
Top
Return Job Name (10) (RTNJOBNAME)
This parameter returns a 10-character job name for the selected spool file.
Top
Return Job User (10) (RTNJOBUSER)
This parameter returns a 10-character user name for the selected spool file.
Top
Return Job Number (6) (RTNJOBNUM)
This parameter returns a six-character job number for the selected spool file.
Appendices 156
© 2008 RJS Software Systems
Top
Return Spool Number (6) (RTNSPLNUM)
This parameter returns a six-character spool-file number for the selected spool file.
Top
Example for IFMNUM
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMNUM SPLF(INVOICE) RTNSPLF(&RTNSPLF) RTNJOBNAME(&RTNJOBNAME) RTNJOBUSER(&RTNJOBUSER) RTNJOBNUM(&RTNJOBNUM) RTNSPLNUM(&RTNSPLNUM)
This command retrieves the spool-file name, the job name, job user, job number, and spool-filenumber for the spool file INVOICE.
Top
Error messages for IFMNUM
*ESCAPE MessagesCPF9898
&1.
Top
IFMPJL01 IFS File Copy
IFS File Copy (IFMPJL01)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Add PJL Commands to PCL Report (IFMPJL01) command adds PJL operation codes to aPCL report.
iForms User Guide157
© 2008 RJS Software Systems
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· The IFS file must be a PCL report.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
FROMIFS From IFS file Character value Required,Positional 1
TOIFS To IFS file Character value Required,Positional 2
DUPLEX Duplex *NO, *YES Optional,Positional 3
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional 4
REPLACE Replace file *NO, *YES Optional,Positional 5
Top
From IFS file (FROMIFS)
Specifies the IFS path and name of the PCL file to modify.
This is a required parameter.character-value
Specify the IFS file path and name.
Top
To IFS file (TOIFS)
Specifies the new IFS file path and name.
This is a required parameter.character-value
Specify the new IFS file path and name.
Top
Appendices 158
© 2008 RJS Software Systems
Duplex (DUPLEX)
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Top
Replace file (REPLACE)
Specifies whether or not to replace an existing IFS file if it has the same name as the file youentered in the To IFS File (TOIFS) parameter.*NO
Does not replace an existing IFS file with the same name.*YES
Replaces an existing IFS file with the same name.
Top
Examples for IFMPJL01
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
iForms User Guide159
© 2008 RJS Software Systems
Example 1: Simple Command ExampleIFMPJL01 FROMIFS('/RJSIFORMS/INVOICE.PCL') TOIFS('/RJSIFORMS/INVOICENEW.PCL')
This command copies the the IFS file INVOICE.PCL from the RJSIFORMS directory toINVOICENEW.PCL in the RJSIFORMS directory.
Example 2: More Complex Command ExampleIFMPJL01 FROMIFS('/RJSIFORMS/INVOICE.PCL') TOIFS('/RJSIFORMS/INVOICENEW.PCL') DUPLEX(*YES) TUMBLE(*LONGEDGE) REPLACE(*YES)
This command copies the IFS file INVOICE.PCL from the RJSIFORMS directory toINVOICENEW.PCL in the RJSIFORMS directory with the following settings:
· The file INVOICENEW prints on both sides of the page.· The pages are bound on the long edge. In this case pages bound on the long edge means
that the top of one side of a printed page is on the same end as the other side.· The file INVOICENEW replaces an existing file of the same name.
Top
Error messages for IFMPJL01
*ESCAPE MessagesCPF9898
&1.
Top
IFMPRINT Print PDF File
Print PDF File (IFMPRINT)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Print PDF File (IFMPRINT) command prints a document in either Postscript or PCL format.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Appendices 160
© 2008 RJS Software Systems
Parameters
Keyword Description Choices Notes
IFSFILE PDF file to print Character value Required,Positional 1
OUTQ Destination outputqueue
Qualified object name Required,Positional 2
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
DEVICE Printer device type Character value, lj5gray Optional,Positional 3
PAPERSIZE Paper size Character value, letter Optional,Positional 4
DUPLEX Duplex *NO, *YES Optional,Positional 5
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional 6
GSPARMS Additional printparameters
Character value Optional,Positional 7
SPOOL Spool file name Character value, PDFDOC Optional,Positional 8
USERDATA User data Character value, PDFDOC Optional,Positional 9
FORMTYPE Form type Character value, PDFDOC Optional,Positional10
USRDFNDTA User defined data Character value, *NONE, *IFSFILENAME Optional,Positional11
HOLD Hold spooled file *NO, *YES Optional,Positional12
SAVE Save spooled file *NO, *YES Optional,Positional13
COPIES Copies 1-255, 1 Optional,Positional14
OUTPTY Output priority Character value, 9 Optional,Positional15
iForms User Guide161
© 2008 RJS Software Systems
DSPLOG Display conversionlog
*NO, *YES Optional,Positional16
CONVERROR Escape msg onconvert error
*NO, *YES Optional,Positional17
DLTTEMP Delete temp files *NO, *YES Optional,Positional18
Top
PDF file to print (IFSFILE)
Specifies the IFS file path for the PDF document to print.
This is a required parameter.character-value
Specify the IFS file path and name.
For example: /RJSIFORMS/INVOICE.PDF
Top
Destination output queue (OUTQ)
Specifies the destination output queue.
This is a required parameter.
Qualifier 1: Destination output queuename
Specify the name of the destination output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the destination library.
Top
Printer device type (DEVICE)
Specifies the Ghostscript-supported printer-device type.lj5gray
Specifies printer-device type lj5gray.
Appendices 162
© 2008 RJS Software Systems
character-valueSpecify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Top
Paper size (PAPERSIZE)
Specifies the Ghostscript-supported printer-paper size.letter
Specifies printer-paper size letter.character-value
Specify the printer-paper size.
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Top
Duplex (DUPLEX)
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation, which you determine in the Paper Size(PAPERSIZE) parameter.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation this
iForms User Guide163
© 2008 RJS Software Systems
setting prints the top of one side of a page on the same end as the other side.
Top
Additional print parameters (GSPARMS)
Specifies the Ghostscript dots-per-inch (DPI) parameters or other additional parameters.character-value
Specify the Ghostscript dots-per-inch parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Softwarerecommends trying -r300 and experimenting from there. If you do not specify DPI parameters,the document processes at 1200 DPI by default.
Note: Lower resolution can increase printing speed.
Top
Spool file name (SPOOL)
Specifies the new spool-file name after printing.PDFDOC
Specifies spool-file name PDFDOC.character-value
Specify the new spool-file name.
Top
User data (USERDATA)
Specifies the new user-data tag after printing.PDFDOC
Specifies user-data tag PDFDOC.character-value
Specify the new user-data tag.
Top
Form type (FORMTYPE)
Specifies the new form type after printing.PDFDOC
Specifies form type PDFDOC.character-value
Specify the new form type.
Top
Appendices 164
© 2008 RJS Software Systems
User defined data (USRDFNDTA)
Specifies the new user-defined data after printing.*NONE
Does not specify user-defined data.*IFSFILENAME
Specifies the name of the IFS file.character-value
Specify the new user-defined data.
Top
Hold spooled file (HOLD)
Specifies whether or not to place the new spool file on hold.*NO
Does not place the new spool file on hold.*YES
Place the new spool file on hold.
Top
Save spooled file (SAVE)
Specifies whether or not to save the new spool file after printing.*NO
Does not save the new spool file after printing.*YES
Saves the new spool file after printing.
Top
Copies (COPIES)
Specifies the number of copies to print.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority.
iForms User Guide165
© 2008 RJS Software Systems
9Specifies the output priority 9.
character-valueSpecify the output priority.
Top
Display conversion log (DSPLOG)
Specifies whether or not to display the conversion log.*NO
Does not display the conversion log.*YES
Displays the conversion log.
Top
Escape msg on convert error (CONVERROR)
Specifies whether or not to display an escape message if the conversion fails.*NO
Does not display an escape message if the conversion fails.*YES
Displays an escape message if the conversion fails.
Top
Delete temp files (DLTTEMP)
Specifies whether or not to delete temporary files.*NO
Does not delete temporary files. Use this option for debugging.*YES
Deletes temporary files.
Top
Examples for IFMPRINT
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleIFMPRINT IFSFILE('/RJSIFORMS/INVOICE.PDF') OUTQ(PRINTER1)
This command sends the IFS file INVOICE.PDF to the output queue PRINTER1 for printing.
Example 2: More Complex Command Example
Appendices 166
© 2008 RJS Software Systems
IFMPRINT IFSFILE('/RJSIFORMS/INVOICE.PDF') OUTQ(PRINTER1) DEVICE('lj5gray') GSPARMS('-r300')
This command sends the IFS file INVOICE.PDF to the output queue PRINTER1 for printing in HPLaserJet 5 format with a resolution of 300 DPI.
Top
Error messages for IFMPRINT
*ESCAPE MessagesCPF9898
&1.
Top
IFMSPLTXT Copy Spool File to IFS - PRN
Copy Spool To IFS - PRN (IFMSPLTXT)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Copy Spool To IFS - PRN (IFMSPLTXT) command copies a spool file to the IFS as an ASCIItext file with line and page breaks.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
FILE Spool file name Name Required,Positional 1
iForms User Guide167
© 2008 RJS Software Systems
JOB Job name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: Jobname
Name
Qualifier 2: Username
Name
Qualifier 3: Jobnumber
000000-999999
SPLNBR Spool file number Decimal number, *ONLY, *LAST Optional,Positional 3
CTLCHAR Control character Character value, *PRTCTL Optional,Positional 4
FILNAM IFS output filename
Character value, /REPORT.TXT Optional,Positional 5
Top
Spool file name (FILE)
Specifies the spool file to copy to the IFS.
This is a required parameter.name
Specify the name of the spool file.
Top
Job name (JOB)
Specifies the job that created the spool file.
Single values*
Use this entry for the current job.
Qualifier 1: Job namename
Specify the name of the job.
Qualifier 2: User namename
Specify the name that identifies the user profile under which the job is run.
Qualifier 3: Job number000000-999999
Specify the system-assigned job number.
Top
Appendices 168
© 2008 RJS Software Systems
Spool file number (SPLNBR)
Specifies the spool-file number.*ONLY
Copies a spool file if it is the only one in a selected job.*LAST
Copies the most recent spool file from a specified job.decimal-number
Enter a specific spool-file number.
Top
Control character (CTLCHAR)
Specifies which print-control characters (if any) replace the spool file's internal print-controlcharacters.*PRTCTL
Specifies that the first four characters of every record contain skip- and space-before valuesuseful in high-level language programs. This code can be viewed as SSSL, where SSS is theskip-before line value and L is the space-before value.
character-valueSpecify the print-control characters.
Top
IFS output file name (FILNAM)
Specifies the IFS output file name and path./REPORT.TXT
Creates /REPORT.TXT on the root of the IFS.character-value
Specify the file name and path.
Top
Examples for IFMSPLTXT
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleIFMSPLTXT FILE(INVOICE)
This command copies the spool file INVOICE to the IFS as a text file.
Example 2: More Complex Command ExampleIFMSPLTXT FILE(INVOICE) JOB(123456/TEST/QPADEV0001) FILNAM('/REPORT.TXT')
iForms User Guide169
© 2008 RJS Software Systems
This command copies the spool file INVOICE with job name QPADEV0001, user name TEST,and job number 123456 to the IFS as the text file REPORT.
Top
Error messages for IFMSPLTXT
*ESCAPE MessagesCPF9898
&1.
Top
IFMSPOOL Spool ASCII IFS File
Spool ASCII IFS File (IFMSPOOL)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Spool ASCII IFS File (IFMSPOOL) command copies the contents of an IFS file to a spool file.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
IFSFILE Input File Character value Required,Positional 1
Appendices 170
© 2008 RJS Software Systems
OUTQ Destination outputqueue
Qualified object name Required,Positional 2
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
SPOOL Spool file name Character value, IFSDOC Optional,Positional 3
USERDATA User data Character value, IFSDOC Optional,Positional 4
FORMTYPE Form type Character value, IFSDOC Optional,Positional 5
USRDFNDTA User defined data Character value, *NONE, *IFSFILENAME Optional,Positional 6
HOLD Hold spooled file *NO, *YES Optional,Positional 7
SAVE Save spooled file *NO, *YES Optional,Positional 8
COPIES Copies 1-255, 1 Optional,Positional 9
OUTPTY Output priority Character value, 9 Optional,Positional10
Top
Input File (IFSFILE)
Specifies the IFS file to copy to a spool file.
This is a required parameter.character-value
Specify the file path and name.
Top
Destination output queue (OUTQ)
Specifies the output queue in which to put the spool file.
This is a required parameter.
Qualifier 1: Destination output queuename
Specify the name of the output queue
iForms User Guide171
© 2008 RJS Software Systems
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Spool file name (SPOOL)
Specifies the name of the spool file to which the IFS file is copied.IFSDOC
Specifies spool-file IFSDOC.character-value
Specify the spool-file name.
Top
User data (USERDATA)
Specifies the user-data tag.IFSDOC
Specifies user-data tag IFSDOC.character-value
Specify the user-data tag.
Top
Form type (FORMTYPE)
Specifies the form type.IFSDOC
Specifies form type IFSDOC.character-value
Specify the form type.
Top
User defined data (USRDFNDTA)
Specifies the user-defined data.*NONE
Does not assign user-defined data.*IFSFILENAME
Specifies the name of the IFS file.character-value
Specify the user-defined data.
Appendices 172
© 2008 RJS Software Systems
Top
Hold spooled file (HOLD)
Specifies whether or not to place the spool file on hold after copying.*NO
Does not place the spool file on hold.*YES
Places the spool file on hold.
Top
Save spooled file (SAVE)
Specifies whether or not to save the spool file after copying.*NO
Does not save the spool file.*YES
Saves the spool file.
Top
Copies (COPIES)
If printing the spool file, specifies how many copies to print.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority.9
Assigns the output priority 9.character-value
Specify the output priority.
Top
Examples for IFMSPOOL
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise you
iForms User Guide173
© 2008 RJS Software Systems
must qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleIFMSPOOL IFSFILE('/RJSIFORMS/INVOICE.TXT') OUTQ(RJSIFORMS)
This command copies the IFS file INVOICE in the RJSIFORMS folder to a spool file in the ouptutqueue RJSIFORMS. The command copies data in ASCII-text format without change.
Example 2: More Complex Command ExampleIFMSPOOL IFSFILE('/RJSIFORMS/INVOICE.TXT') OUTQ(RJSIFORMS) SPOOL(INVOICENEW) SAVE(*YES) OUTPTY(2)
This command copies the IFS file INVOICE in the RJSIFORMS folder to the spool fileINVOICENEW in the output queue RJSIFORMS. It saves the spool file after copying and assignsan output priority of 2. The command copies data in ASCII-text format without change.
Top
Error messages for IFMSPOOL
*ESCAPE MessagesCPF9898
&1.
Top
IFMSQL Run SQL Query Statement
Run SQL Query Statement (IFMSQL)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
This utility command can be used to run SQL record selection and record update operations suchas INSERT, UPDATE and DELETE. SQL can be a very useful way to update information inselected fields within a file.
The statement will be checked for syntax before being run.
Note: Do not use this command unless you are familiar with using SQL.
For additional information, see the DataExport/400 manual at http://www.rjssoftware.com/docs/rjsexport/index.htm
Top
Appendices 174
© 2008 RJS Software Systems
Parameters
Keyword Description Choices Notes
SQLSTM SQL statement Character value, *SOURCE Optional,Positional 1
OUTPUT Output *, *PRINT, *OUTFILE Optional,Positional 2
SRCF Query source file Qualified object name Optional,Positional 3
Qualifier 1: Querysource file
Name, QQMQRYSRC
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Query sourcemember
Name, *FIRST Optional,Positional 4
EDIT Edit query sourcemember
*NO, *YES Optional,Positional 5
OUTFILE File to receiveoutput
Qualified object name Optional,Positional 6
Qualifier 1: File toreceive output
Name, SQLTEMP
Qualifier 2: Library Name, QTEMP, *LIBL, *CURLIB
OUTMBR Output memberoptions
Element list Optional,Positional 7
Element 1:Member
Name, *FIRST
Element 2: Replaceor add records
*REPLACE, *ADD
NAMING Naming convention *SYS, *SQL Optional,Positional 8
SRTSEQ Sort sequence Single values: *JOB, *HEX,*LANGIDSHR, *LANGIDUNQOther values: Qualified object name
Optional,Positional 9
Qualifier 1: Sortsequence
Name
Qualifier 2: Library Name, *LIBL, *CURLIB
LANGID Language ID *JOB Optional,Positional10
Top
iForms User Guide175
© 2008 RJS Software Systems
SQL statement (SQLSTM)
Specifies the SQL statement.
See examples
Possible values are:*SOURCE
The SQL statements will be read in from the specified query source file member. Themaximum length is 32,767.
character-valueEnter the SQL statement. The maximum length is 5,000.
Note: From a command line the limit is 512.
Top
Output (OUTPUT)
Specifies where the output produced by the query is placed.
Possible values are:*
In interactive mode, the output produced by the query is displayed on the screen. In batchmode, the output is sent to the default printer.
*PRINTThe output produced by the query is sent to the default printer.
*OUTFILEThe output produced by the query is written to the database file specified in the OUTFILE
parameter.
Top
Query source file (SRCF)
Specifies the qualified name of the source file where the query source member is stored when*SOURCE is specified for the SQL statement.
Note: The maximum record length is 240.
Possible values are:
Qualifier 1: Query source fileQQMQRYSRC
QQMQRYSRC contains the source for the SQL statement.name
Specify the name of the file that contains the source for the SQL statement.
Qualifier 2: Library*LIBL
All libraries in the user and system portions of the job's library list are searched until the first
Appendices 176
© 2008 RJS Software Systems
match is found.*CURLIB
The current library for the job is searched. If no library is specified as the current library for thejob, the QGPL library is used.
nameSpecify the name of the library to be searched.
Top
Query source member (SRCMBR)
Specifies the name of the query source member that contains the source for the SQL statement.
Possible values are:*FIRST
The SQL statement is contained in the first member of the query source file.name
Specify the name of the member that contains the source for the SQL statement.
Top
Edit query source member (EDIT)
Specifies whether the query source member will be opened so that the user can manually enter ormodify an SQL statement and save the source member for future use.
Note: This parameter is ignored in batch mode.
Possible values are:*NO
Do not open the source member for editing.*YES
Open the source member for editing.
Top
File to receive output (OUTFILE)
Specifies the database file that receives the query output when *OUTFILE is specified as theoutput destination. If the file specified does not exist, the system creates it in the specified library.
Note: Running this command multiple times with different SQL statements may produce differentlayouts of the rows in the result set. You will need to delete this file before running an SQLstatement with a different result set layout.
Possible values are:
Qualifier 1: File to receive outputSQLTEMP
SQLTEMP is the name of the database file that receives the output of the command.name
iForms User Guide177
© 2008 RJS Software Systems
Specify the name of the database file that receives the output of the command.
Qualifier 2: LibraryQTEMP
The library QTEMP will be used.*LIBL
All libraries in the user and system portions of the job's library list are searched until the firstmatch is found.
*CURLIBThe current library for the job is searched. If no library is specified as the current library for thejob, the QGPL library is used.
nameSpecify the name of the library to be searched.
Top
Output member options (OUTMBR)
Specifies the name of the database file member to which the output is directed when *OUTFILE isspecified as the output destination. If the member specified does not exist, the system creates it.
Possible values are:
Element 1: Member*FIRST
The first member in the file receives the output.name
Specify the name of the database file member that receives the output of the command.
Element 2: Replace or add records*REPLACE
The member is cleared before new records are inserted.*ADD
New records are added after the existing records.
Top
Naming convention (NAMING)
Specifies the naming convention used for naming objects.
Possible values are:*SYS
The system naming convention is used (database-name/object-name).*SQL
The SQL naming convention is used (database-name.object-name). If NAMING(*SQL) isspecified, the *LIBL value cannot be specified or allowed to be a default value for locating anyof the objects specified on other parameters on this command.
Top
Appendices 178
© 2008 RJS Software Systems
Sort sequence (SRTSEQ)
Specifies the sort sequence table to be used for string comparisons in this query.
Possible values are:
Single values*JOB
The SRTSEQ value for the job at the time the query is run is used.*HEX
A sort sequence table is not used, and the hexadecimal values of the characters are used todetermine the sort sequence.
*LANGIDUNQThe unique-weight sort table for the language specified on the LANGID parameter is used.
*LANGIDSHRThe shared-weight sort table for the language specified on the LANGID parameter is used.
Qualifier 1: Sort sequencename
Specify the name of the sort sequence table to be used when this query is run.
Qualifier 2: Library*LIBL
All libraries in the user and system portions of the job's library list are searched until the firstmatch is found.
*CURLIBThe current library for the job is searched. If no library is specified as the current library for thejob, the QGPL library is used.
nameSpecify the name of the library to be searched.
Top
Language ID (LANGID)
Specifies the language identifier to be used when SRTSEQ(*LANGIDUNQ) or SRTSEQ(*LANGIDSHR) is specified.
Possible values are:*JOB
The LANGID value for the job is used when the query is run.language-ID
Specify the language identifier to be used for the query.ID
LanguageAFR
AfrikaansSQI
AlbanianARA
ArabicNLB
Belgian DutchFRB
iForms User Guide179
© 2008 RJS Software Systems
Belgian FrenchENB
Belgian EnglishPTB
Brazilian PortugueseBGR
BulgarianBEL
ByelorussianFRC
Canadian FrenchCAT
CatalanHRV
CroatianCSY
CzechDAN
DanishNLD
DutchENA
English AustralianENP
English Upper CaseEST
EstonianFAR
FarsiFIN
FinnishFRA
FrenchDEU
GermanELL
GreekHEB
HebrewHUN
HungarianISL
IcelandicGAE
Irish GaelicITA
ItalianJPN
Japanese KatakanaKOR
KoreanLAO
LaoLVA
LatvianLTU
Lithuanian
Appendices 180
© 2008 RJS Software Systems
MKDMacedonian
NORNorwegian - Bokmal
NONNorwegian - Nynorsk
PLKPolish
PTGPortuguese
RMSRhaeto-Romanic
ROMRomanian
RUSRussian
SRBSerbian
SRBSerbian Cyrillic
SRLSerbian Latin
CHSSimplified Chinese
SKYSlovakian
SLOSlovenian
ESPSpanish
SVESwedish
FRSSwiss French
DESSwiss German
ITSSwiss Italian
THAThai
CHTTraditional Chinese
TRKTurkish
UKRUkrainian
URDUrdu
ENGUK English
ENUUS English
VIEVietnamese
Top
iForms User Guide181
© 2008 RJS Software Systems
Examples for IFMSQL
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Select all records from file QCUSTCDT in library QIWSIFMSQL SQLSTM('SELECT * FROM QIWS/QCUSTCDT')
Example 2: Update all records from file QCUSTCDT in library QIWS and set balance due =0IFMSQL SQLSTM('UPDATE QIWS/QCUSTCDT SET BALDUE = 0')
Example 3: Delete all records from file QCUSTCDT in library QIWSIFMSQL SQLSTM('DELETE FROM QIWS/QCUSTCDT')
Example 4: Create file TEMPFILE in library QTEMP with 2 fieldsIFMSQL SQLSTM('CREATE TABLE QTEMP/TEMPFILE CHARFLD CHAR (25) NOT NULL WITH DEFAULT, PCKDFLD DECIMAL (9, 0) NOT NULL WITH DEFAULT')
Top
Error messages
Unknown
Top
IFMTEST1 Generate Test Report
Generate Test Report (IFMTEST1)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Generate Test Report (IFMTEST1) command creates the spool-file sample, INVOICE, in anoutput queue.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Appendices 182
© 2008 RJS Software Systems
Parameters
Keyword Description Choices Notes
OUTQ Dest output queue Character value, RJSIFORMS Optional,Positional 1
OUTQLIB Dest output queuelibrary
Character value, QGPL Optional,Positional 2
FILE Sample report file Character value, SPOOLTEST Optional,Positional 3
LIBRARY Sample reportlibrary
Character value, RJSIFORMS Optional,Positional 4
Top
Dest output queue (OUTQ)
Specifies the output queue to which to send INVOICERJSIFORMS
Specifies output queue RJSIFORMS.character-value
Specify the name of the output queue.
Top
Dest output queue library (OUTQLIB)
Specifies the library in which the output queue is located.QGPL
Specifies library QGPL.character-value
Specify the name of the library.
Top
Sample report file (FILE)
Specifies the physical file from which the data comes.SPOOLTEST
Specifies physical file SPOOLTEST.character-value
Specify the name of the physical file.
Top
iForms User Guide183
© 2008 RJS Software Systems
Sample report library (LIBRARY)
Specifies the library in which the physical file is located.RJSIFORMS
Specifies library RJSIFORMS.character-value
Specify the name of the library.
Top
Example for IFMTEST1
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
IFMTEST1 OUTQ(RJSIFORMS) OUTQLIB(QGPL) FILE(SPOOLTEST) LIBRARY(RJSIFORMS)
This command takes data from the physical file SPOOLTEST in the library RJSIFORMS andcreates the spool-file sample, INVOICE, in the output queue RJSIFORMS in the library QGPL.
Top
Error messages for IFMTEST1
*ESCAPE MessagesCPF9898
&1.
Top
INSGSOBJ Install Ghostscript and TIFF Library Utilities
Install Ghostscript/TIFFLIB (INSGSOBJ)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Install Ghostscript/TIFFLIB (INSGSOBJ) command installs Ghostscript and the TIFF library
Appendices 184
© 2008 RJS Software Systems
and utilities into Qopensys.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
There are no parameters for this command.
Top
Parameters
None
Top
Example for INSGSOBJ
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
INSGSOBJ
This command installs Ghostscript and the TIFF library and utilities into Qopensys.
Top
Error messages for INSGSOBJ
*ESCAPE MessagesCPF9898
&1.
Top
PRDINFO Display OS/400 Level
Display OS/400 Level (PRDINFO)
iForms User Guide185
© 2008 RJS Software Systems
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Display OS/400 Level (PRDINFO) command displays the following information about yourSystem i:
· The operating-system level.· The serial number.· The model number.· The logical partition (LPAR) number.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
There are no parameters for this command.
Top
Parameters
None
Top
Example for PRDINFO
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
PRDINFO
This command displays the following information about your System i:· The operating-system level.· The serial number.· The model number.· The LPAR number.
Top
Error messages for PRDINFO
Appendices 186
© 2008 RJS Software Systems
*ESCAPE MessagesCPF9898
&1.
Top
PRDSEC Enter Access Codes
Enter Access Codes (PRDSEC)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Enter Access Codes (PRDSEC) command enters access codes for iForms.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have the license key that RJS Software provides upon purchasing iForms.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
SECURITY Enter securityaccess code
Character value Required,Positional 1
DTAARA Enter data areaname
Character value Required,Positional 2
DTALIB Enter data arealibrary name
Character value Required,Positional 3
Top
Enter security access code (SECURITY)
Specifies the 50-character security code that RJS Software provides with the license key.
This is a required parameter.character-value
iForms User Guide187
© 2008 RJS Software Systems
Specify the security code.
Top
Enter data area name (DTAARA)
Specifies the data area that contains the security code. RJS Software provides this informationwith the license key.
This is a required parameter.character-value
Specify the name of the data area.
Top
Enter data area library name (DTALIB)
Specifies the data-area library. RJS Software provides this information with the license key.
This is a required parameter.character-value
Specify the data-area library name.
Top
Example for PRDSEC
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
PRDSEC SECURITY(XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) DTAARA(RJSIFORMS) DTALIB(RJSIFORMS)
This command enters a 50-character security-access code in the data area RJSIFORMS in thedata-area library RJSIFORMS.
Top
Error messages for PRDSEC
*ESCAPE MessagesCPF9898
&1.
Top
Appendices 188
© 2008 RJS Software Systems
RJSWRKOUTQ RJS Work with Output Queue
RJS Work with Output Queue (RJSWRKOUTQ)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The RJS Work with Output Queue (RJSWRKOUTQ) command displays output queues andallows you to work with them.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
OUTQ Output queue Qualified object name Required,Positional 1
Qualifier 1: Outputqueue
Name
Qualifier 2: Library Name, *LIBL, *CURLIB
Top
Output queue (OUTQ)
Specifies the output queue with which you want to work.
This is a required parameter.
Qualifier 1: Output queuename
Specify the name of the output queue of which you want to display the detailed statusinformation. A list of all spool files on the output queue also displays with information abouteach spool file.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.
iForms User Guide189
© 2008 RJS Software Systems
*CURLIBSearches the current library for the output queue.
nameSpecify the name of the library in which the output queue is located.
Top
Example for RJSWRKOUTQ
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
RJSWRKOUTQ OUTQ(*CURLIB/RJSIFORMS)
This command displays and allows you to work with the output queue RJSIFORMS in the currentlibrary.
Top
Error messages for RJSWRKOUTQ
*ESCAPE MessagesCPF9898
&1.
Top
RJSWRKSPLF RJS Work with Spool Files
RJS Work with Spooled Files (RJSWRKSPLF)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The RJS Work with Spooled Files (RJSWRKSPLF) command displays a list of spool files for aselected user and allows you to work with those spool files, using iForms-specific options.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have *SPLCTL authority to have access to users other than yourself.· This command is not threadsafe.
Top
Appendices 190
© 2008 RJS Software Systems
Parameters
Keyword Description Choices Notes
SELECT Select files for Element list Optional,Positional 1
Element 1: User Name, *CURRENT, *ALL
Element 2: Outputqueue
Single values: *ALLOther values: Qualified object name
Qualifier 1: Outputqueue
Name
Qualifier 2: Library Name, *LIBL, *CURLIB
Element 3: Formtype
Character value, *ALL, *STD
Element 4: Userdata
Character value, *ALL
Top
Select files for (SELECT)
Specifies which spool files to display.
Element 1: User*CURRENT
Selects only files that the current user created.*ALL
Selects files created by all users.name
Specify the user name, which selects only files that that user created.
Element 2: Output queue
Single values*ALL
Selects spool files for the specified user in all output queues.
Qualifier 1: Output queuename
Specify the name of the output queue in which to look for spool files for the specified user.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.*CURLIB
Searches the current library for the output queue.name
Specify the name of the library in which the output queue is located.
iForms User Guide191
© 2008 RJS Software Systems
Element 3: Form type*ALL
Selects files for all form types.*STD
Selects only files that specify the standard form type.character-value
Specify the form type to select the file.
Element 4: User data*ALL
Selects files with any user-data tag.character-value
Specify the user-data tag to select the file.
Top
Examples for RJSWRKSPLF
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleRJSWRKSPLF SELECT(TEST)
This command displays and allows you to work with spool files assigned to the user TEST.
Example 2: More Complex Command ExampleRJSWRKSPLF SELECT(TEST QGPL/RJSIFORMS *STD)
This command displays and allows you to work with spool files with the standard form typeassigned to the user TEST in the output queue RJSIFORMS in the library QGPL.
Top
Error messages for RJSWRKSPLF
*ESCAPE MessagesCPF9898
&1.
Top
RSTGSOBJ Restore Ghostscript and TIFF Library Utilities
Restore Ghostscript/TIFFLIB (RSTGSOBJ)
Appendices 192
© 2008 RJS Software Systems
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Restore Ghostscript/TIFFLIB (RSTGSOBJ) command extracts various PASE utilites so thatthe installation can function properly when the INSGSOBJ command is run.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
LIB Library for save file Character value, RJSIFORMS Optional,Positional 1
Top
Library for save file (LIB)
Specifies the library to which to send the save file.RJSIFORMS
Specifies library RJSIFORMScharacter-value
Specify the name of the library.
Top
Example for RSTGSOBJ
Note: This example assumes you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
RSTGSOBJ LIB(RJSIFORMS)
This command sends the save file to the library RJSIFORMS.
Top
iForms User Guide193
© 2008 RJS Software Systems
Error messages for RSTGSOBJ
*ESCAPE MessagesCPF9898
&1.
Top
RUNIFORM Generate iForms Report or Form Document
Gen iForms Report or Form Doc (RUNIFORM)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Gen iForms Report or Form Doc (RUNIFORM) command processes a database-query reportusing a specified form template. The JRXML file stores the SQL query. You can pass parametersto the report at runtime if you defined them in the JRXML file.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
TEMPLATE JRXML report/formtemplate
Character value Required,Positional 1
OUTPUTFILE Output IFS file Character value, *AUTOGEN Optional,Positional 2
OUTPUTTYPE Output type PDF, XML, HTML, TXT, CSV, XLS, RTF Optional,Positional 3
PARMFILE Parm File-Optional Character value Optional,Positional 4
SCHEMA Default databaseschema
Character value, RJSTEMP Optional,Positional 5
Appendices 194
© 2008 RJS Software Systems
P1NAME Parm 1 name Character value Optional,Positional 6
P1VALUE Parm 1 value Character value Optional,Positional 7
P2NAME Parm 2 name Character value Optional,Positional 8
P2VALUE Parm 2 value Character value Optional,Positional 9
P3NAME Parm 3 name Character value Optional,Positional10
P3VALUE Parm 3 value Character value Optional,Positional11
P4NAME Parm 4 name Character value Optional,Positional12
P4VALUE Parm 4 value Character value Optional,Positional13
P5NAME Parm 5 name Character value Optional,Positional14
P5VALUE Parm 5 value Character value Optional,Positional15
P6NAME Parm 6 name Character value Optional,Positional16
P6VALUE Parm 6 value Character value Optional,Positional17
P7NAME Parm 7 name Character value Optional,Positional18
P7VALUE Parm 7 value Character value Optional,Positional19
P8NAME Parm 8 name Character value Optional,Positional20
P8VALUE Parm 8 value Character value Optional,Positional21
iForms User Guide195
© 2008 RJS Software Systems
P9NAME Parm 9 name Character value Optional,Positional22
P9VALUE Parm 9 value Character value Optional,Positional23
P10NAME Parm 10 name Character value Optional,Positional24
P10VALUE Parm 10 value Character value Optional,Positional25
REPLACE Replace output file *NO, *YES Optional,Positional26
RMVLASTPAG Remove last PDFpage
*NO, *YES Optional,Positional27
RESPOOL Respool finaldocument to outq
*YES, *NO Optional,Positional28
DLTIFSSPL Delete IFS file afterrespool
*YES, *NO Optional,Positional29
OUTQ Destination outputqueue
Qualified object name Optional,Positional30
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
SPOOL Spool file name Character value, IFORMS Optional,Positional31
USRDTA User data Character value, IFORMS Optional,Positional32
FORMTYPE Form type Character value, IFORMS Optional,Positional33
USRDFNDTA User defined data Character value, *NONE Optional,Positional34
HOLD Hold spooled file *NO, *YES Optional,Positional35
Appendices 196
© 2008 RJS Software Systems
SAVE Save spooled file *NO, *YES Optional,Positional36
COPIES Copies 1-255, 1 Optional,Positional37
OUTPTY Output priority Character value, 9 Optional,Positional38
PRINT Print finaldocument to outq
*YES, *NO Optional,Positional39
PRINTOUTQ Print output queue Qualified object name Optional,Positional40Qualifier 1: Print
output queueName
Qualifier 2: Library Name, *LIBL
DEVICE Printer device type Character value, lj5gray Optional,Positional41
PAPERSIZE Paper size Character value, letter Optional,Positional42
DUPLEX Duplex *NO, *YES Optional,Positional43
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional44
GSPARMS Additional printparameters
Character value Optional,Positional45
DSPSTDOUT Display StandardOutput Result
*NO, *YES Optional,Positional46
PRTSTDOUT Print StandardOutput Result
*NO, *YES Optional,Positional47
DLTSTDOUT Delete StandardOutput Result
*NO, *YES Optional,Positional48
Top
JRXML report/form template (TEMPLATE)
iForms User Guide197
© 2008 RJS Software Systems
Specifies the file path of the form template, created in iReport.
This is a required parameter.character-value
Specify the file path and name with a JRXML extension.
For example: /RJSIFORMS/INVOICE.JRXML
Top
Output IFS file (OUTPUTFILE)
Specifies the output file path.*AUTOGEN
Auto-generates the naming convention.character-value
Specify the file path and name.
For example: /RJSIFORMS/INVOICE.PDF
Top
Output type (OUTPUTTYPE)
Specifies which file-format type is used to create the report.PDF
Creates the report as a PDF document.XML
Creates the report as an XML document.HTML
Creates the report as an HTML document.TXT
Creates the report as a TXT document.CSV
Creates the report as a CSV document.XLS
Creates the report as an XLS document.RTF
Creates the report as an RTF document.
Top
Parm File-Optional (PARMFILE)
This command, RUNIFORM, does not use this parameter. iForms users should ignore thisparameter. Leave it blank.character-value
Do not enter a character-value. Leave this parameter blank.
Appendices 198
© 2008 RJS Software Systems
Top
Default database schema (SCHEMA)
Specifies the library in which temporary tables are generated.RJSTEMP
Assigns library RJSTEMPcharacter-value
Specify the name of the library.
Top
Parm 1 name (P1NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 1 value (P1VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 2 name (P2NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 2 value (P2VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
iForms User Guide199
© 2008 RJS Software Systems
Top
Parm 3 name (P3NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 3 value (P3VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 4 name (P4NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 4 value (P4VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 5 name (P5NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Appendices 200
© 2008 RJS Software Systems
Top
Parm 5 value (P5VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 6 name (P6NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 6 value (P6VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 7 name (P7NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 7 value (P7VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
iForms User Guide201
© 2008 RJS Software Systems
For example: RJSTEMP/INVOICE
Top
Parm 8 name (P8NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 8 value (P8VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 9 name (P9NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 9 value (P9VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 10 name (P10NAME)
Specifies the corresponding iReport parameter.
Appendices 202
© 2008 RJS Software Systems
character-valueSpecify the parameter name.
Top
Parm 10 value (P10VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Replace output file (REPLACE)
Specifies whether or not to replace the IFS output file.*NO
Does not replace the IFS output file.*YES
Replaces the IFS output file.
Top
Remove last PDF page (RMVLASTPAG)
Specifies whether or not to delete the last page of a PDF document. This parameter is useful ifyour report generates a blank last page.*NO
Does not delete the last page of a PDF document.*YES
Deletes the last page of a PDF document.
Caution: Enter *NO unless you are absolutely certain you will not lose any data from yourreport.
Top
Respool final document to outq (RESPOOL)
Specifies whether or not to re-spool the final document to an output queue. The document re-spools in its raw, converted form.
For example: If you process a report as a PDF, the PDF file re-spools as a PDF. It does notconvert to PCL or PostScript print format.*YES
iForms User Guide203
© 2008 RJS Software Systems
Re-spools the final document to an output queue. You can use *YES in conjunction with the Print Final Document to Outq (PRINT) parameter.
*NODoes not re-spool the final document to an output queue.
Top
Delete IFS file after respool (DLTIFSSPL)
Specifies whether or not to delete the output IFS file after it has been re-spooled to an outputqueue.*YES
Deletes the output IFS file after it has been re-spooled.*NO
Does not delete the output IFS file after it has been re-spooled.
Top
Destination output queue (OUTQ)
Specifies the output queue to which you want to re-spool the report.
Qualifier 1: Destination output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Spool file name (SPOOL)
Specifies the spool-file name if you re-spool or print the output IFS file.IFORMS
Specifies the name IFORMS.character-value
Specify the new name.
Top
User data (USRDTA)
Specifies the user-data tag if you re-spool or print the output IFS file.IFORMS
Specifies user-data tag IFORMS.
Appendices 204
© 2008 RJS Software Systems
character-valueSpecify the new user-data tag.
Top
Form type (FORMTYPE)
Specifies the form type if you re-spool or print the output IFS file.IFORMS
Specifies form type IFORMS.character-value
Specify the new form type.
Top
User defined data (USRDFNDTA)
Specifies the user-defined data if you re-spool or print the output IFS file.*NONE
Does not assign user-defined data.character-value
Specify the new user-defined data.
Top
Hold spooled file (HOLD)
Specifies whether or not to place the re-spooled spool file on hold.*NO
Does not place the re-spooled spool file on hold.*YES
Places the re-spooled spool file no hold.
Top
Save spooled file (SAVE)
Specifies whether or not or not to save the re-spooled spool file after printing from the selectedoutput queue.*NO
Does not save the re-spooled spool file.*YES
Saves the re-spooled spool file.
Top
Copies (COPIES)
iForms User Guide205
© 2008 RJS Software Systems
Specifies how many copies of the report to print when re-spooling or printing.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority when re-spooling or printing.9
Specifies the output priority 9.character-value
Specify the output priority.
Top
Print final document to outq (PRINT)
Specifies whether or not to print a final PDF document to Postscript or PCL format and then placeit into an output queue to print it via the standard System i print spooling. You can use this settingwith or without the Respool Final Document to Outq (RESPOOL) parameter.*YES
Prints the final PDF document.*NO
Does not print the final PDF document.
Top
Print output queue (PRINTOUTQ)
Specifies the destination output queue when printing a document after generation.
Qualifier 1: Print output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Printer device type (DEVICE)
Appendices 206
© 2008 RJS Software Systems
Specifies the Ghostscript-supported printer-device type.lj5gray
Specifies printer-device type lj5gray.character-value
Specify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Top
Paper size (PAPERSIZE)
Specifies the Ghostscript-supported printer-paper size.letter
Specifies printer-paper size letter.character-value
Specify the printer-paper size.
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Top
Duplex (DUPLEX)
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation, which you determine in the Paper Size(PAPERSIZE) parameter.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,
iForms User Guide207
© 2008 RJS Software Systems
or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Top
Additional print parameters (GSPARMS)
Specifies the Ghostscript dots-per-inch (DPI) parameters or other parameters.character-value
Specify the the Ghostscript DPI parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Softwarerecommends trying -r300 and experimenting from there. If you do not specify DPI parameters,the document processes at 1200 DPI by default.
Note: Lower resolution can increase printing speed.
Top
Display Standard Output Result (DSPSTDOUT)
Specifies whether or not to display Java errors after processing a report.*NO
Does not display Java errors.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Print Standard Output Result (PRTSTDOUT)
Specifies whether or not to print Java errors after processing a report.*NO
Does not print Java errors.*YES
Prints Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Appendices 208
© 2008 RJS Software Systems
Delete Standard Output Result (DLTSTDOUT)
Specifies whether or not to delete the IFS file STDOUT after processing a report.*NO
Does not delete the IFS file STDOUT.*YES
Deletes the IFS file STDOUT.
Top
Examples for RUNIFORM
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleRUNIFORM TEMPLATE('/RJSIFORMS/ INVOICE.JRXML') P1NAME(REPORTSQL) P1VALUE('RJSTEMP/INVOICE')
This command uses the form template INVOICE.JRXML with the parameter REPORTSQL andparameter value RJSTEMP/INVOICE to process a report.
Example 2: More Complex Command ExampleRUNIFORM TEMPLATE('/RJSIFORMS/ INVOICE.JRXML') OUTPUTFILE('/RJSIFORMS/INVOICE.PDF') P1NAME(REPORTSQL) P1VALUE('RJSTEMP/INVOICE') RESPOOL(*YES) DLTIFSSPL(*NO) SPOOL(IFORMSNEW) USRDTA(TEST) PRINT(*YES) DEVICE('lj5gray') PAPERSIZE('letter') DUPLEX(*YES) TUMBLE(*LONGEDGE)
This command:· Uses the form template INVOICE.JRXML with the parameter REPORTSQL and parameter
value RJSTEMP/INVOICE to process a report.· Outputs the file to /RJSIFORMS/INVOICE.PDF.· Re-spools the final document to an output queue.· Deletes the output IFS file after it has been re-spooled.· Assigns the spool-file name IFORMSNEW.· Assigns the user data TEST.· Prints a final PDF document to Postscript or PCL format and then places that document into
an output queue to print it via the standard System i print spooling.· Prints the document in HP LaserJet 5 format.· Prints the document on letter-size paper.· Prints the document on both sides of the page.· Prints the top of one side of a page on the same end as the other side. In other words, it
prints pages so they can be bound on the side, or long edge.
iForms User Guide209
© 2008 RJS Software Systems
Top
Error messages for RUNIFORM
*ESCAPE MessagesCPF9898
&1.
Top
RUNIFORMJ Generate iForms Report or Form Document Usingthe Print Server
Gen iForms Report or Form Doc (RUNIFORMJ)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Gen iForms Report or Form Doc (RUNIFORMJ) command differs from RUNIFORM in thatRUNIFORM assumes that the System i processes the report. However, if your System i Javaperformance is slow or if appropriate print drivers (for example, certain label printers) are notavailable, you can use a PC to process all reports. RUNIFORMJ processes the report on theremote PC server and then returns the completed and properly formatted report back to theSystem i.
Note: RUNIFORMJ will greatly outperform RUNIFORM in most cases.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
TEMPLATE JRXML report/formtemplate
Character value Required,Positional 1
Appendices 210
© 2008 RJS Software Systems
OUTPUTFILE Output IFS file Character value, *AUTOGEN Optional,Positional 2
OUTPUTTYPE Output type PDF, XML, HTML, TXT, CSV, XLS, RTF,PRT
Optional,Positional 3
PARMFILE Parm File-Optional Character value Optional,Positional 4
SCHEMA Default databaseschema
Character value, RJSTEMP Optional,Positional 5
P1NAME Parm 1 name Character value Optional,Positional 6
P1VALUE Parm 1 value Character value Optional,Positional 7
P2NAME Parm 2 name Character value Optional,Positional 8
P2VALUE Parm 2 value Character value Optional,Positional 9
P3NAME Parm 3 name Character value Optional,Positional10
P3VALUE Parm 3 value Character value Optional,Positional11
P4NAME Parm 4 name Character value Optional,Positional12
P4VALUE Parm 4 value Character value Optional,Positional13
P5NAME Parm 5 name Character value Optional,Positional14
P5VALUE Parm 5 value Character value Optional,Positional15
P6NAME Parm 6 name Character value Optional,Positional16
P6VALUE Parm 6 value Character value Optional,Positional17
P7NAME Parm 7 name Character value Optional,Positional18
iForms User Guide211
© 2008 RJS Software Systems
P7VALUE Parm 7 value Character value Optional,Positional19
P8NAME Parm 8 name Character value Optional,Positional20
P8VALUE Parm 8 value Character value Optional,Positional21
P9NAME Parm 9 name Character value Optional,Positional22
P9VALUE Parm 9 value Character value Optional,Positional23
P10NAME Parm 10 name Character value Optional,Positional24
P10VALUE Parm 10 value Character value Optional,Positional25
REPLACE Replace output file *NO, *YES Optional,Positional26
RMVLASTPAG Remove last PDFpage
*NO, *YES Optional,Positional27
RESPOOL Respool finaldocument to outq
*YES, *NO Optional,Positional28
DLTIFSSPL Delete IFS file afterrespool
*YES, *NO Optional,Positional29
OUTQ Destination outputqueue
Qualified object name Optional,Positional30
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
SPOOL Spool file name Character value, IFORMS Optional,Positional31
USRDTA User data Character value, IFORMS Optional,Positional32
Appendices 212
© 2008 RJS Software Systems
FORMTYPE Form type Character value, IFORMS Optional,Positional33
USRDFNDTA User defined data Character value, *NONE Optional,Positional34
HOLD Hold spooled file *NO, *YES Optional,Positional35
SAVE Save spooled file *NO, *YES Optional,Positional36
COPIES Copies 1-255, 1 Optional,Positional37
OUTPTY Output priority Character value, 9 Optional,Positional38
PRINT Print finaldocument to outq
*YES, *NO Optional,Positional39
PRINTOUTQ Print output queue Qualified object name Optional,Positional40Qualifier 1: Print
output queueName
Qualifier 2: Library Name, *LIBL
DEVICE Printer device type Character value, lj5gray Optional,Positional41
PAPERSIZE Paper size Character value, letter Optional,Positional42
DUPLEX Duplex *NO, *YES Optional,Positional43
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional44
GSPARMS Additional printparameters
Character value Optional,Positional45
RMTSVRURL Remote serverURL
Character value, http://1.1.1.1:8080 Optional,Positional46
iForms User Guide213
© 2008 RJS Software Systems
RMTPRTDRIV Remote WindowsPrt Driver Name
Character value Optional,Positional47
DSPSTDOUT Display StandardOutput Result
*NO, *YES Optional,Positional48
PRTSTDOUT Print StandardOutput Result
*NO, *YES Optional,Positional49
DLTSTDOUT Delete StandardOutput Result
*NO, *YES Optional,Positional50
Top
JRXML report/form template (TEMPLATE)
Specifies the file path of the form template, created in iReport.
This is a required parameter.character-value
Specify the the file path and name with a JRXML extension.
For example: /RJSIFORMS/ INVOICE.JRXML
Top
Output IFS file (OUTPUTFILE)
Specifies the output file path.*AUTOGEN
Auto-generates the naming convention.character-value
Specify the file path and name.
For example: /RJSIFORMS/INVOICE.PDF
Top
Output type (OUTPUTTYPE)
Specifies which file-format type is used to create the report.PDF
Creates the report as a PDF document.XML
Appendices 214
© 2008 RJS Software Systems
Creates the report as an XML document.HTML
Creates the report as an HTML document.TXT
Creates the report as a TXT document.CSV
Creates the report as a CSV document.XLS
Creates the report as an XLS document.RTF
Creates the report as an RTF document.PRT
Creates the report as a PRT document.
Top
Parm File-Optional (PARMFILE)
This command, RUNIFORMJ, does not use this parameter. iForms users should ignore thisparameter. Leave it blank.character-value
Do not enter a character-value. Leave this parameter blank.
Top
Default database schema (SCHEMA)
Specifies the library in which temporary tables are generated.RJSTEMP
Specifies the library RJSTEMP.character-value
Specify the name of the library.
Top
Parm 1 name (P1NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 1 value (P1VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
iForms User Guide215
© 2008 RJS Software Systems
For example: RJSTEMP/INVOICE
Top
Parm 2 name (P2NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 2 value (P2VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 3 name (P3NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 3 value (P3VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 4 name (P4NAME)
Specifies the corresponding iReport parameter.
Appendices 216
© 2008 RJS Software Systems
character-valueSpecify the parameter name.
Top
Parm 4 value (P4VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 5 name (P5NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 5 value (P5VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 6 name (P6NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 6 value (P6VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
iForms User Guide217
© 2008 RJS Software Systems
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 7 name (P7NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 7 value (P7VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 8 name (P8NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 8 value (P8VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 9 name (P9NAME)
Appendices 218
© 2008 RJS Software Systems
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 9 value (P9VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Parm 10 name (P10NAME)
Specifies the corresponding iReport parameter.character-value
Specify the parameter name.
Top
Parm 10 value (P10VALUE)
Specifies the value to be passed into the parameter field as defined in iReport.character-value
Specify the value.
For example: RJSTEMP/INVOICE
Top
Replace output file (REPLACE)
Specifies whether or not to replace the IFS output file.*NO
Does not replace the IFS output file.*YES
Replaces the IFS output file
Top
iForms User Guide219
© 2008 RJS Software Systems
Remove last PDF page (RMVLASTPAG)
Specifies whether or not to delete the last page of a PDF document. This parameter is useful ifyour report generates a blank last page.*NO
Does not delete the last page of a PDF document.*YES
Deletes the last page of a PDF document.
Caution: Enter *NO unless you are absolutely certain you will not lose any data from yourreport.
Top
Respool final document to outq (RESPOOL)
Specifies whether or not to re-spool the final document to an output queue. The document re-spools in its raw, converted form.
For example: If you process a report as a PDF, the PDF file re-spools as a PDF. It does notconvert to PCL or PostScript print format.*YES
Re-spools the final document to an output queue. You can use *YES in conjunction with the Print Final Document to Outq (PRINT) parameter.
*NODoes not re-spool the final document to an output queue.
Top
Delete IFS file after respool (DLTIFSSPL)
Specifies whether or not to delete the output IFS file after it has been re-spooled to an outputqueue.*YES
Deletes the output IFS file after it has been re-spooled.*NO
Does not delete the output IFS file after it has been re-spooled.
Top
Destination output queue (OUTQ)
Specifies the output queue to which you want to re-spool the report.
Qualifier 1: Destination output queuename
Specify the name of the output queue.
Qualifier 2: Library
Appendices 220
© 2008 RJS Software Systems
*LIBLSearches all libraries in the current library list until the first match is found.
nameSpecify the name of the library where the output queue is located.
Top
Spool file name (SPOOL)
Specifies the spool-file name if you re-spool or print the output IFS file.IFORMS
Specifies the name IFORMS.character-value
Specify the new name.
Top
User data (USRDTA)
Specifies the user-data tag if you re-spool or print the output IFS file.IFORMS
Specifies the user-data tag IFORMS.character-value
Specify the new user-data tag.
Top
Form type (FORMTYPE)
Specifies the form type if you re-spool or print the output IFS file.IFORMS
Specifies the form type IFORMS.character-value
Specify the new form type.
Top
User defined data (USRDFNDTA)
Specifies user-defined data if you re-spool or print the output IFS file.*NONE
Does not assign user-defined data.character-value
Specify the new user-defined data.
Top
iForms User Guide221
© 2008 RJS Software Systems
Hold spooled file (HOLD)
Specifies whether or not to place the re-spooled spool file on hold.*NO
Does not place the re-spooled spool file on hold.*YES
Places the re-spooled spool file on hold.
Top
Save spooled file (SAVE)
Specifies whether or not or not to save the re-spooled spool file after printing from the selectedoutput queue.*NO
Does not save the re-spooled spool file.*YES
Saves the re-spooled spool file.
Top
Copies (COPIES)
Specifies how many copies of the report to print when re-spooling or printing.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority when re-spooling or printing.9
Specifies the output priority 9.character-value
Specify the output priority.
Top
Print final document to outq (PRINT)
Specifies whether or not to print a final PDF document to Postscript or PCL format and then placeit into an output queue to print it via the standard System i print spooling. You can use this settingwith or without the Respool Final Document to Outq (RESPOOL) parameter.*YES
Appendices 222
© 2008 RJS Software Systems
Prints the final PDF document.*NO
Does not print the final PDF document.
Top
Print output queue (PRINTOUTQ)
Specifies the destination output queue when printing a document after generation.
Qualifier 1: Print output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Printer device type (DEVICE)
Specifies the Ghostscript-supported printer-device type.lj5gray
Specifies printer-device type lj5gray.character-value
Specify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Top
Paper size (PAPERSIZE)
Specifies the Ghostscript-supported printer-paper size.letter
Specifies printer-paper size letter.character-value
Specify the printer-paper size.
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Top
Duplex (DUPLEX)
iForms User Guide223
© 2008 RJS Software Systems
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation, which you determine in the Paper Size(PAPERSIZE) parameter.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Top
Additional print parameters (GSPARMS)
Specifies the Ghostscript dots-per-inch (DPI) parameters or other parameters.character-value
Specify the the Ghostscript DPI parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Softwarerecommends trying -r300 and experimenting from there. If you do not specify DPI parameters,the document processes at 1200 DPI by default.
Note: Lower resolution can increase printing speed.
Top
Remote server URL (RMTSVRURL)
Appendices 224
© 2008 RJS Software Systems
Specifies the URL address of the remote PC print server.http://1.1.1.1:8080
If you specify *DEFUALT, it looks for 1024-byte data named RMTSVRURL in theRJSIFORMS library.
character-valueSpecify the print-server URL address in the format of http://1.1.1.1:9180 (where 1.1.1.1 is anIP address and 9180 is a TCP/IP port for the Apache Tomcat Server.
Top
Remote Windows Prt Driver Name (RMTPRTDRIV)
Specifies the Windows print driver on the print server that will process an iForms report into theselected printer format before returning the report to the System i and placing it into an outputqueue for printing.character-value
Specify the name of the print driver.
Warning: Do not put spaces in the print-driver name. Two examples of print-driver names areHP4 and ZEBRA40XiIII.
Top
Display Standard Output Result (DSPSTDOUT)
Specifies whether or not to display Java errors after a report is processed.*NO
Does not display Java errors after processing a report.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Print Standard Output Result (PRTSTDOUT)
Specifies whether or not to print Java errors after processing a report.*NO
Does not print Java errors.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
iForms User Guide225
© 2008 RJS Software Systems
Delete Standard Output Result (DLTSTDOUT)
Specifies whether or not to delete the IFS file STDOUT after processing a report.*NO
Does not delete the IFS file STDOUT.*YES
Deletes the IFS file STDOUT.
Top
Examples for RUNIFORMJ
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleRUNIFORM TEMPLATE('/RJSIFORMS/ INVOICE.JRXML') P1NAME(REPORTSQL) P1VALUE('RJSTEMP/INVOICE') RMTSVRURL('HTTP://1.1.1.1:9180') RMTPRTDRIV(HP4)
This command uses the form template INVOICE.JRXML with the parameter REPORTSQL andparameter value RJSTEMP/INVOICE to process a report. It specifies HTTP://1.1.1.1:9180 as theURL address of the remote PC print server and specifies HP4 as the name of the print driver.
Example 2: More Complex Command ExampleRUNIFORM TEMPLATE('/RJSIFORMS/ INVOICE.JRXML') OUTPUTFILE('/RJSIFORMS/INVOICE.PDF') P1NAME(REPORTSQL) P1VALUE('RJSTEMP/INVOICE') RESPOOL(*YES) DLTIFSSPL(*NO) SPOOL(IFORMSNEW) USRDTA(TEST) PRINT(*YES) DEVICE('lj5gray') PAPERSIZE('letter') DUPLEX(*YES) TUMBLE(*LONGEDGE) RMTSVRURL('HTTP://1.1.1.1:9180') RMTPRTDRIV(HP4)
This command:· Uses the form template INVOICE.JRXML with the parameter REPORTSQL and parameter
value RJSTEMP/INVOICE to process a report.· Outputs the file to /RJSIFORMS/INVOICE.PDF.· Re-spools the final document to an output queue.· Deletes the output IFS file after it has been re-spooled.· Assigns the spool-file name IFORMSNEW.· Assigns the user data TEST.
Appendices 226
© 2008 RJS Software Systems
· Prints a final PDF document to Postscript or PCL format and then places that document intoan output queue to print it via the standard System i print spooling.
· Prints the document in HP LaserJet 5 format.· Prints the document on letter-size paper.· Prints the document on both sides of the page.· Prints the top of one side of a page on the same end as the other side. In other words, it
prints pages so they can be bound on the side, or long edge.· Specifies HTTP://1.1.1.1:9180 as the URL address of the remote PC print server.· Specifies HP4 as the name of the print driver.
Top
Error messages for RUNIFORMJ
*ESCAPE MessagesCPF9898
&1.
Top
SPLIFORM Convert Spool File to iForms Document
Convert Spool to iForms Doc (SPLIFORM)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Convert Spool to iForms Doc (SPLIFORM) command converts data from a spool file to aniForms document. In other words this command processes spool-file reports and applies a formoverlay during processing.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
iForms User Guide227
© 2008 RJS Software Systems
FILE Spooled file Character value Required,Positional 1
JOB Job Name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: JobName
Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR Spooled filenumber
1-999999, *ONLY, *LAST Optional,Positional 3
TEMPLATE JRXML report/formtemplate
Character value Optional,Positional 4
XMLDEFFILE RJSXML spool filetext layer
Character value Optional,Positional 5
OUTPUTFILE Output IFS file Character value, *AUTOGEN Optional,Positional 6
OUTPUTTYPE Output type PDF, XML, HTML Optional,Positional 7
PARMFILE Parm File-Optional Character value Optional,Positional 8
SCHEMA Default databaseschema
Character value, RJSTEMP Optional,Positional 9
REPLACE Replace output file *NO, *YES Optional,Positional10
RMVLASTPAG Remove last PDFpage
*NO, *YES Optional,Positional11
RESPOOL Respool finaldocument to outq
*YES, *NO Optional,Positional12
DLTIFSSPL Delete IFS file afterrespool
*YES, *NO Optional,Positional13
OUTQ Destination outputqueue
Qualified object name Optional,Positional14
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
SPOOL Spool file name Character value, *SAME Optional,Positional15
Appendices 228
© 2008 RJS Software Systems
USRDTA User data Character value, *SAME Optional,Positional16
FORMTYPE Form type Character value, *SAME Optional,Positional17
USRDFNDTA User defined data Character value, *SAME Optional,Positional18
HOLD Hold spooled file *NO, *YES Optional,Positional19
SAVE Save spooled file *NO, *YES Optional,Positional20
COPIES Copies 1-255, 1 Optional,Positional21
OUTPTY Output priority Character value, 9 Optional,Positional22
PRINT Print finaldocument to outq
*YES, *NO Optional,Positional23
PRINTOUTQ Print output queue Qualified object name Optional,Positional24Qualifier 1: Print
output queueName
Qualifier 2: Library Name, *LIBL
DEVICE Printer device type Character value, lj5gray Optional,Positional25
PAPERSIZE Paper size Character value, letter Optional,Positional26
DUPLEX Duplex *NO, *YES Optional,Positional27
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional28
GSPARMS Additional printparameters
Character value Optional,Positional29
iForms User Guide229
© 2008 RJS Software Systems
DSPSTDOUT Display StandardOutput Result
*NO, *YES Optional,Positional30
PRTSTDOUT Print StandardOutput Result
*NO, *YES Optional,Positional31
DLTSTDOUT Delete StandardOutput Result
*NO, *YES Optional,Positional32
Top
Spooled file (FILE)
Specifies the spool file to process.
This is a required parameter.character-value
Specify the spool-file name.
Top
Job Name (JOB)
Specifies the job that created the spool file.
Single values*
Use this entry for the current job.
Caution: Only your company's developer should use this entry.
Qualifier 1: Job Namename
Specify the name of the job.
Qualifier 2: Username
Specify the name of the user or leave this qualifier blank for the current user.
Caution: Only leave this qualifier blank if you entered * in the Job Name (JOB) parameter.
Qualifier 3: Number000000-999999
Enter the job number or leave this qualifier blank for the current number.
Caution: Only leave this qualifier blank if you entered * in the Job Name (JOB) parameter.
Top
Appendices 230
© 2008 RJS Software Systems
Spooled file number (SPLNBR)
Specifies the spool-file number.*ONLY
Processes a spool file if it is the only one in a selected job.*LAST
Processes the most recent spool file from a selected job.1-999999
Enter a specific spool-file number.
Top
JRXML report/form template (TEMPLATE)
Specifies the file path of the form template created in iReport.character-value
Specify the file path and name with a JRXML extension.
For example: /RJSIFORMS/INVOICE.JRXML
Top
RJSXML spool file text layer (XMLDEFFILE)
Specifies the text-layer file path. You create this file with the Text Layer Designer.character-value
Specify the file path and name with an RJSXML extension.
For example: /RJSIFORMS/INVOICE.RJSXML
Top
Output IFS file (OUTPUTFILE)
Specifies the output file path.*AUTOGEN
Auto-generates the naming convention.character-value
Specify the file path and name.
For example: /RJSIFORMS/INVOICE.PDF
Top
iForms User Guide231
© 2008 RJS Software Systems
Output type (OUTPUTTYPE)
Specifies which file-format type is used to create the report.PDF
Creates the report as a PDF document.XML
Creates the report as an XML document.HTML
Creates the report as an HTML document.
Top
Parm File-Optional (PARMFILE)
This command, SPLIFORM, does not use this parameter. iForms users should ignore thisparameter. Leave it blank.character-value
Do not enter a character-value. Leave this parameter blank.
Top
Default database schema (SCHEMA)
Specifies the library in which temporary tables are generated.RJSTEMP
Specifies library RJSTEMP.character-value
Specify the name of the library.
Top
Replace output file (REPLACE)
Specifies whether or not to replace the IFS output file.*NO
Does not replace the IFS output file.*YES
Replaces the IFS output file.
Top
Remove last PDF page (RMVLASTPAG)
Specifies whether or not to delete the last page of a PDF document. This parameter is useful ifyour report generates a blank last page.*NO
Does not delete the last page of a PDF document.
Appendices 232
© 2008 RJS Software Systems
*YESDeletes the last page of a PDF document.
Caution: Enter *NO unless you are absolutely certain you will not lose any data from yourreport.
Top
Respool final document to outq (RESPOOL)
Specifies whether or not to re-spool the final document to an output queue. The document re-spools in its raw, converted form.
For example: If you processed a report as a PDF, the PDF file is re-spooled as a PDF. It does notconvert to PCL or PostScript print format.*YES
Re-spools the report to an output queue. You can use *YES in conjunction with the Print FinalDocument to Outq (PRINT) parameter.
*NODoes not re-spool the report to an output queue.
Top
Delete IFS file after respool (DLTIFSSPL)
Specifies whether or not to delete the output IFS file after it has been re-spooled to an outputqueue.*YES
Deletes the ouptut IFS file after it has been re-spooled.*NO
Does not delete the output IFS file after it has been re-spooled.
Top
Destination output queue (OUTQ)
Specifies the output queue to which you want to re-spool the report.
Qualifier 1: Destination output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
iForms User Guide233
© 2008 RJS Software Systems
Spool file name (SPOOL)
Specifies the spool-file name if you re-spool or print the output IFS file.*SAME
Specifies the original name.character-value
Specify the new name.
Top
User data (USRDTA)
Specifies the user-data tag if you re-spool or print the output IFS file.*SAME
Specifies the original user-data tag.character-value
Specify the new user-data tag.
Top
Form type (FORMTYPE)
Specifies the form type if you re-spool or print the output IFS file.*SAME
Specifies the original form type.character-value
Specify the new form type.
Top
User defined data (USRDFNDTA)
Specifies the user-defined data if you re-spool or print the output IFS file.*SAME
Specifies the original user-defined data.character-value
Specify the new user-defined data.
Top
Hold spooled file (HOLD)
Specifies whether or not to place the re-spooled spool file on hold.*NO
Does not place the re-spooled spool file on hold.*YES
Places the re-spooled spool file on hold.
Appendices 234
© 2008 RJS Software Systems
Top
Save spooled file (SAVE)
Specifies whether or not to save the re-spooled spool file after printing from the selected outputqueue.*NO
Does not save the re-spooled spool file.*YES
Saves the re-spooled spool file.
Top
Copies (COPIES)
Specifies how many copies of the spool file report to print when re-spooling or printing.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority when re-spooling or printing.9
Specifies the output priority 9.character-value
Specify the output priority.
Top
Print final document to outq (PRINT)
Specifies whether or not to print a final PDF document to Postscript or PCL format and then placeit into an output queue to print it via the standard System i print spooling. You can use this settingwith or without the Respool Final Document to Outq (RESPOOL) parameter.*YES
Prints the final PDF document.*NO
Does not print the final PDF document.
Top
Print output queue (PRINTOUTQ)
iForms User Guide235
© 2008 RJS Software Systems
Specifies the destination output queue when printing a document after generation.
Qualifier 1: Print output queuename
Specify the name of of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Printer device type (DEVICE)
Specifies the Ghostscript-supported printer-device type.lj5gray
Specifies printer-device type lj5gray.character-value
Specify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Top
Paper size (PAPERSIZE)
Specifies the Ghostscript-supported printer-paper size.letter
Specifies printer-paper size letter.character-value
Specify the printer-paper size.
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Top
Duplex (DUPLEX)
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Appendices 236
© 2008 RJS Software Systems
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation, which you determine in the Paper Size(PAPERSIZE) parameter.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Top
Additional print parameters (GSPARMS)
Specifies the Ghostscript dots-per-inch (DPI) parameters or other parameters.character-value
Specify the Ghostscript dots-per-inch parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Softwarerecommends trying -r300 and experimenting from there. If you do not specify DPI parameters,the document processes at 1200 DPI by default.
Note: Lower resolution can increase printing speed.
Top
Display Standard Output Result (DSPSTDOUT)
Specifies whether or not to display Java errors after processing a report.*NO
Does not display Java errors.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
iForms User Guide237
© 2008 RJS Software Systems
Top
Print Standard Output Result (PRTSTDOUT)
Specifies whether or not to print Java errors after processing a report.*NO
Does not print Java errors.*YES
Prints Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Delete Standard Output Result (DLTSTDOUT)
Specifies whether or not to delete the IFS file STDOUT after processing a report.*NO
Does not delete the IFS file STDOUT.*YES
Deletes the IFS file STDOUT.
Top
Examples for SPLIFORM
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleSPLIFORM FILE(INVOICE) TEMPLATE('/RJSIFORMS/INVOICE.JRXML') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML')
This command processes the spool file INVOICE using the form template INVOICE.JRXML andthe text layer INVOICE.RJSXML.
Example 2: More Complex Command ExampleSPLIFORM FILE(INVOICE) JOB(000001/TEST/QPADEV0001) TEMPLATE('/RJSIFORMS/INVOICE.JRXML') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML') RMVLASTPAG(*YES) RESPOOL(*YES) DLTIFSSPL(*NO) SAVE(*YES) COPIES(10) PRINT(*YES) DEVICE('lj5gray')
Appendices 238
© 2008 RJS Software Systems
PAPERSIZE('letter') DUPLEX(*YES) TUMBLE(*SHORTEDGE)
This command:· Processes the spool file INVOICE with job name QPADEV0001, user TEST, and job
number 000001 using the form template INVOICE.JRXML and the text layer INVOICE.RJSXML.
· Removes the last page.· Re-spools the report to allow priting the document via the standard System i print spooling.· Does not delete the output IFS file after it has been re-spooled.· Saves the re-spooled spool file after printing.· Prints 10 copies.· Prints a final PDF document to Postscript or PCL format and then places that document into
an output queue to print it via the standard System i print spooling.· Prints the document in HP LaserJet 5 format.· Prints the document on letter-size paper.· Prints the document on both sides of the page.· Prints the top of one side of a page on the opposite end of the other side. In other words, it
print the pages so they can be bound on the top, or short edge.
Top
Error messages for SPLIFORM
*ESCAPE MessagesCPF9898
&1.
Top
SPLIFORMJ Convert Spool File to iForms Document Using thePrint Server
Convert Spool to iForms Doc (SPLIFORMJ)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Convert Spool to iForms Doc (SPLIFORMJ) command differs from SPLIFORM in thatSPLIFORM assumes that the System i processes the report. But if your System i Javaperformance is slow or if appropriate print drivers (for example: certain label printers) are notavailable, you can use a PC to process all reports. SPLIFORMJ processes the report on theremote PC server and then returns the completed and properly formatted report back to theSystem i.
Restrictions:
iForms User Guide239
© 2008 RJS Software Systems
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have OS/400 PASE installed.· This command is not threadsafe.
Top
Parameters
Keyword Description Choices Notes
FILE Spooled file Character value Required,Positional 1
JOB Job Name Single values: *Other values: Qualified job name
Optional,Positional 2
Qualifier 1: JobName
Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR Spooled filenumber
1-999999, *ONLY, *LAST Optional,Positional 3
TEMPLATE JRXML report/formtemplate
Character value Optional,Positional 4
XMLDEFFILE RJSXML spool filetext layer
Character value Optional,Positional 5
OUTPUTFILE Output IFS file Character value, *AUTOGEN Optional,Positional 6
OUTPUTTYPE Output type PDF, XML, HTML Optional,Positional 7
PARMFILE Parm File-Optional Character value Optional,Positional 8
SCHEMA Default databaseschema
Character value, RJSTEMP Optional,Positional 9
REPLACE Replace output file *NO, *YES Optional,Positional10
RMVLASTPAG Remove last PDFpage
*NO, *YES Optional,Positional11
RESPOOL Respool finaldocument to outq
*YES, *NO Optional,Positional12
Appendices 240
© 2008 RJS Software Systems
DLTIFSSPL Delete IFS file afterrespool
*YES, *NO Optional,Positional13
OUTQ Destination outputqueue
Qualified object name Optional,Positional14
Qualifier 1:Destination outputqueue
Name
Qualifier 2: Library Name, *LIBL
SPOOL Spool file name Character value, *SAME Optional,Positional15
USRDTA User data Character value, *SAME Optional,Positional16
FORMTYPE Form type Character value, *SAME Optional,Positional17
USRDFNDTA User defined data Character value, *SAME Optional,Positional18
HOLD Hold spooled file *NO, *YES Optional,Positional19
SAVE Save spooled file *NO, *YES Optional,Positional20
COPIES Copies 1-255, 1 Optional,Positional21
OUTPTY Output priority Character value, 9 Optional,Positional22
PRINT Print finaldocument to outq
*YES, *NO Optional,Positional23
PRINTOUTQ Print output queue Qualified object name Optional,Positional24Qualifier 1: Print
output queueName
Qualifier 2: Library Name, *LIBL
DEVICE Printer device type Character value, lj5gray Optional,Positional25
iForms User Guide241
© 2008 RJS Software Systems
PAPERSIZE Paper size Character value, letter Optional,Positional26
DUPLEX Duplex *NO, *YES Optional,Positional27
TUMBLE Tumble *LONGEDGE, *SHORTEDGE Optional,Positional28
GSPARMS Additional printparameters
Character value Optional,Positional29
RMTSVRURL Remote serverURL
Character value, *DEFAULT Optional,Positional30
RMTPRTDRIV Remote WindowsPrt Driver Name
Character value Optional,Positional31
DSPSTDOUT Display StandardOutput Result
*NO, *YES Optional,Positional32
PRTSTDOUT Print StandardOutput Result
*NO, *YES Optional,Positional33
DLTSTDOUT Delete StandardOutput Result
*NO, *YES Optional,Positional34
Top
Spooled file (FILE)
Specifies the spool file to process.
This is a required parameter.character-value
Specify the spool-file name.
Top
Job Name (JOB)
Specifies the job that created the spool file.
Single values*
Appendices 242
© 2008 RJS Software Systems
Use this entry for the current job.
Caution: Only your company's developer should use this entry.
Qualifier 1: Job Namename
Specify the name of the job.
Qualifier 2: Username
Specify the name of the user or leave this qualifier blank for the current user.
Caution: Only leave this qualifier blank if you entered * in the Job Name (JOB) parameter.
Qualifier 3: Number000000-999999
Enter the job number that created the spool file or leave this qualifier blank for the currentnumber.
Caution: Only leave this qualifier blank if you entered * in the Job Name (JOB) parameter.
Top
Spooled file number (SPLNBR)
Specifies the spool-file number.*ONLY
Processes a spool file if it is the only one in a selected job.*LAST
Processes the most recent spool file from a selected job.1-999999
Enter a specific spool-file number.
Top
JRXML report/form template (TEMPLATE)
Specifies the file path of the form template created in iReport.character-value
Specify the file path and name with a JRXML extension.
For example: /RJSIFORMS/INVOICE.JRXML
Top
RJSXML spool file text layer (XMLDEFFILE)
Specifies the text-layer file path You create this file with the Text Layer Designer.character-value
Specify the file path and name with an RJSXML extension.
iForms User Guide243
© 2008 RJS Software Systems
For example: /RJSIFORMS/INVOICE.RJSXML
Top
Output IFS file (OUTPUTFILE)
Specifies the output file path.*AUTOGEN
Auto-generates the naming convention.character-value
Specify the file path and name.
For example: /RJSIFORMS/INVOICE.PDF
Top
Output type (OUTPUTTYPE)
Specifies which file-format type is used to create the report.PDF
Creates the report as a PDF document.XML
Creates the report as an XML document.HTML
Creates the report as an HTML document.
Top
Parm File-Optional (PARMFILE)
This command, SPLIFORMJ, does not use this parameter. iForms users should ignore thisparameter. Leave it blank.character-value
Do not enter a character-value. Leave this parameter blank.
Top
Default database schema (SCHEMA)
Specifies the library in which temporary tables are generated.RJSTEMP
Specifies library RJSTEMP.character-value
Specify the name of the library.
Top
Appendices 244
© 2008 RJS Software Systems
Replace output file (REPLACE)
Specifies whether or not to replace the IFS output file.*NO
Does not replace the IFS output file.*YES
Replaces the IFS output file.
Top
Remove last PDF page (RMVLASTPAG)
Specifies whether or not to delete the last page of a PDF document. This parameter is useful ifyour report generates a blank last page.*NO
Does not delete the last page of a PDF document.*YES
Deletes the last page of a PDF document.
Caution: Enter *NO unless you are absolutely certain you will not lose any data from yourreport.
Top
Respool final document to outq (RESPOOL)
Specifies whether or not to re-spool the final document to an output queue. The document re-spools in its raw, converted form.*YES
Re-spools the report to an output queue. You can use *YES in conjunction with the Print FinalDocument to Outq (PRINT) parameter.
*NODoes not re-spool the report to an output queue.
Top
Delete IFS file after respool (DLTIFSSPL)
Specifies whether or not to delete the output IFS file after it has been re-spooled to an outputqueue.*YES
Deletes the ouptut IFS file after it has been re-spooled.*NO
Does not delete the output IFS file after it has been re-spooled.
Top
iForms User Guide245
© 2008 RJS Software Systems
Destination output queue (OUTQ)
Specifies the output queue to which you want to re-spool the report.
Qualifier 1: Destination output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Spool file name (SPOOL)
Specifies the spool-file name if you re-spool or print the output IFS file.*SAME
Specifies the original name.character-value
Specify the new name.
Top
User data (USRDTA)
Specifies the user-data tag if you re-spool or print the output IFS file.*SAME
Specifies the original user-data tag.character-value
Specify the new user-data tag.
Top
Form type (FORMTYPE)
Specifies form type if you re-spool or print the output IFS file.*SAME
Specifies the original form type.character-value
Specify the new form type.
Top
Appendices 246
© 2008 RJS Software Systems
User defined data (USRDFNDTA)
Specifies the user-defined data if you re-spool or print the output IFS file.*SAME
Specifies the original user-defined data.character-value
Specify the new user-defined data.
Top
Hold spooled file (HOLD)
Specifies whether or not to place the re-spooled spool file on hold.*NO
Does not place the re-spooled spool file on hold.*YES
Places the re-spooled spool file on hold.
Top
Save spooled file (SAVE)
Specifies whether or not to save the re-spooled spool file after printing from the selected outputqueue.*NO
Does not save the re-spooled spool file.*YES
Saves the re-spooled spool file.
Top
Copies (COPIES)
Specifies how many copies of the report to print when re-spooling or printing.1
Prints one copy.1-255
Enter the number of copies between 1-255.
Top
Output priority (OUTPTY)
Specifies the output priority when re-spooling or printing.9
Specifies the output priority 9.character-value
iForms User Guide247
© 2008 RJS Software Systems
Specify the output priority.
Top
Print final document to outq (PRINT)
Specifies whether or not to print a final PDF document to Postscript or PCL format and then placeit into an output queue to print it via the standard System i print spooling. You can use this settingwith or without the Respool Final Document to Outq (RESPOOL) parameter.*YES
Prints the final PDF document.*NO
Does not print the final PDF document.
Top
Print output queue (PRINTOUTQ)
Specifies the destination output queue when printing a document after generation.
Qualifier 1: Print output queuename
Specify the name of the output queue.
Qualifier 2: Library*LIBL
Searches all libraries in the current library list until the first match is found.name
Specify the name of the library where the output queue is located.
Top
Printer device type (DEVICE)
Specifies the Ghostscript-supported printer-device type.lj5gray
Specifies printer-device type lj5gray.character-value
Specify the printer-device type.
For more information, refer to Appendix B: Supported Printer-Device Types.
Top
Paper size (PAPERSIZE)
Specifies the Ghostscript-supported printer-paper size.letter
Appendices 248
© 2008 RJS Software Systems
Specifies printer-paper size letter.character-value
Specify the printer-paper size.
For more information, refer to Appendix C: Supported Printer-Paper Sizes.
Top
Duplex (DUPLEX)
Specifies whether or not to print on both sides of the page.*NO
Does not print on both sides of the page.*YES
Prints on both sides of the page.
Top
Tumble (TUMBLE)
Specifies how data is printed on both sides of the page. To use this parameter correctly, you mustknow if you are printing in landscape or portrait orientation, which you determine in the Paper Size(PAPERSIZE) parameter.*LONGEDGE
When printing in portrait orientation, *LONGEDGE prints the top of one side of a page on thesame end as the other side. In portrait orientation this setting is for pages bound on the left, orthe long edge.
Note: When printing in landscape orientation, *LONGEDGE prints the pages to be bound atthe top, which is still the long edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the opposite end of the other side.
*SHORTEDGEWhen printing in portrait orientation, *SHORTEDGE prints the top of one side of a page on theopposite end of the other side. In portrait orientation this setting is for pages bound on the top,or the short edge.
Note: When printing in landscape orientation, *SHORTEDGE prints the pages to be bound onthe left, which is still the short edge. But the difference is that in landscape orientation thissetting prints the top of one side of a page on the same end as the other side.
Top
Additional print parameters (GSPARMS)
Specifies the Ghostscript dots-per-inch (DPI) parameters or other parameters.character-value
Specify the the Ghostscript dots-per-inch parameters.
For example: Enter -r100 for 100 DPI. Enter -r200 for 200 DPI, and so forth. RJS Software
iForms User Guide249
© 2008 RJS Software Systems
recommends trying -r300 and experimenting from there. If you do not specify DPI parameters,the document processes at 1200 DPI by default.
Note: Lower resolution can increase printing speed.
Top
Remote server URL (RMTSVRURL)
Specifies the URL address of the remote PC print server.*DEFAULT
Specifies looking for 1024-byte data named RMTSVRURL in the RJSIFORMS library.character-value
Specify the print-server URL address in the format of http://1.1.1.1:9180 (where 1.1.1.1 is anIP address and 9180 is a TCP/IP port for the Apache Tomcat Server.
Top
Remote Windows Prt Driver Name (RMTPRTDRIV)
Specifies the Windows print driver on the print server that will process an iForms report into theselected printer format before returning the report to the System i and placing it into an outputqueue for printing.character-value
Specify the name of the print driver.
Warning: Do not put spaces in the print-driver name. Two examples of print-driver names areHP4 and ZEBRA40XiIII.
Top
Display Standard Output Result (DSPSTDOUT)
Specifies whether or not to display Java errors after processing a report.*NO
Does not display Java errors.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Print Standard Output Result (PRTSTDOUT)
Specifies whether or not to print Java errors after processing a report.
Appendices 250
© 2008 RJS Software Systems
*NODoes not print Java errors.
*YESPrints Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Delete Standard Output Result (DLTSTDOUT)
Specifies whether or not to delete the IFS file STDOUT after processing a report.*NO
Does not delete the IFS file STDOUT.*YES
Deletes the IFS file STDOUT.
Top
Examples for SPLIFORMJ
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
Example 1: Simple Command ExampleSPLIFORMJ FILE(INVOICE) TEMPLATE('/RJSIFORMS/INVOICE.JRXML') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML') RMTSVRURL('HTTP://1.1.1.1:9180') RMTPRTDRIV(HP4)
This command processes the spool file INVOICE using the form template INVOICE.JRXML andthe text layer INVOICE.RJSXML. It specifies HTTP://1.1.1.1:9180 as the address of the remotePC print server and specifies HP4 as the name of the print driver.
Example 2: More Complex Command ExampleSPLIFORMJ FILE(INVOICE) JOB(000001/TEST/QPADEV0001) TEMPLATE('/RJSIFORMS/INVOICE.JRXML') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML') RMVLASTPAG(*YES) RESPOOL(*YES) DLTIFSSPL(*NO) SAVE(*YES) COPIES(10) PRINT(*YES) DEVICE('lj5gray') PAPERSIZE('letter') DUPLEX(*YES) TUMBLE(*SHORTEDGE) RMTSVRURL('HTTP://1.1.1.1:9180') RMTPRTDRIV(HP4)
This command:
iForms User Guide251
© 2008 RJS Software Systems
· Processes the spool file INVOICE with job name QPADEV0001, user TEST, and jobnumber 000001 using the form template INVOICE.JRXML and the text layer INVOICE.RJSXML.
· Removes the last page.· Re-spools the report to allow priting the document via the standard System i print spooling.· Does not delete the output IFS file after it has been re-spooled.· Saves the re-spooled spool file after printing.· Prints 10 copies.· Prints a final PDF document to Postscript or PCL format and then places that document into
an output queue to print it via the standard System i print spooling.· Prints the document in HP LaserJet 5 format.· Prints the document on letter-size paper.· Prints the document on both sides of the page.· Prints the top of one side of a page on the opposite end of the other side. In other words, it
print the pages so they can be bound on the top, or short edge.· Specifies HTTP://1.1.1.1:9180 as the address of the remote PC print server.· Specifies HP4 as the name of the print driver.
Top
Error messages for SPLIFORMJ
*ESCAPE MessagesCPF9898
&1.
Top
TXTTODB Extract Text File to Database
Extract text File to Database (TXTTODB)
Where allowed to run: All environments (*ALL)Threadsafe: No
ParametersExamples
Error messages
The Extract text File to Database (TXTTODB) command, using a text layer designed in the TextLayer Designer, converts a text file to a database. You can use the resulting database to test aJRXML report design.
Restrictions:
· You must have RJSIFORMS added to your library list or qualify the command with thelibrary name.
· You must have already copied a spool file to the IFS as an ASCII text file with theIFMSPLTXT command.
· This command is not threadsafe.
Appendices 252
© 2008 RJS Software Systems
Top
Parameters
Keyword Description Choices Notes
INPUTFILE Input text file Character value Required,Positional 1
XMLDEFFILE RJSXML spool filetext layer
Character value Required,Positional 2
OUTPUTTBL Output databasetable
Character value Required,Positional 3
SCHEMA Default databaseschema/lib
Character value, RJSTEMP Optional,Positional 4
REPLACE Replace databasetable
*NO, *YES Optional,Positional 5
PAGELINES Lines per page Character value, 66 Optional,Positional 6
DSPSTDOUT Display StandardOutput Result
*NO, *YES Optional,Positional 7
PRTSTDOUT Print StandardOutput Result
*NO, *YES Optional,Positional 8
DLTSTDOUT Delete StandardOutput Result
*NO, *YES Optional,Positional 9
Top
Input text file (INPUTFILE)
Specifies the text file that you created from a spool file using the IFMSPLTXT command.
This is a required parameter.character-value
Specify the file path and name.
For example: /RJSIFORMS/INVOICE.TXT
Top
RJSXML spool file text layer (XMLDEFFILE)
Specifies the text-layer file path.
iForms User Guide253
© 2008 RJS Software Systems
This is a required parameter.character-value
Specify the file path and name with an RJSXML extension.
For example: /RJSIFORMS/INVOICE.RJSXML
Top
Output database table (OUTPUTTBL)
Specifies the output database table of the report you are processing. RJS Software reccommendsthat this table has the same name as the spool file.
This is a required parameter.character-value
Specify the name of the output database table.
Top
Default database schema/lib (SCHEMA)
Specifies the library in which temporary tables are generated.RJSTEMP
Specifies library RJSTEMP.character-value
Specify the name of the library.
Top
Replace database table (REPLACE)
Specifies whether or not to replace the output database table if it already exists.*NO
Does not replace an existing output database table.*YES
Replaces an existing output database table.
Top
Lines per page (PAGELINES)
Specifies the maximum number of lines that could occur on each page of the report you areprocessing.
Note: If you do not know the exact number of lines, iForms will function properly if you specify anumber higher than the acutal number of lines. In other words, if you have to estimate, estimatehigh.
Appendices 254
© 2008 RJS Software Systems
66Specifies 66 lines.
character-valueSpecify the number of lines.
Top
Display Standard Output Result (DSPSTDOUT)
Specifies whether or not to display Java errors after processing a report.*NO
Does not display Java errors.*YES
Displays Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Print Standard Output Result (PRTSTDOUT)
Specifies whether or not to print Java errors after processing a report.*NO
Does not print Java errors.*YES
Prints Java errors.
Note: Use this entry primarily for testing and troubleshooting.
Top
Delete Standard Output Result (DLTSTDOUT)
Specifies whether or not to delete the IFS file STDOUT after processing a report.*NO
Does not delete the IFS file STDOUT.*YES
Deletes the IFS file STDOUT.
Top
Examples for TXTTODB
Note: These examples assume you have added RJSIFORMS to your library list. Otherwise youmust qualify the command with the library RJSIFORMS.
iForms User Guide255
© 2008 RJS Software Systems
Example 1: Simple Command ExampleTXTTODB INPUTFILE('/RJSIFORMS/INVOICE.TXT') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML') OUTPUTTBL(INVOICE)
This command uses the text layer INVOICE.RJSXML to extract data from the text file INVOICE.TXT and then creates the output database table INVOICE.
Example 2: More Complex Command ExampleTXTTODB INPUTFILE('/RJSIFORMS/INVOICE.TXT') XMLDEFFILE('/RJSIFORMS/INVOICE.RJSXML') OUTPUTTBL(INVOICE) SCHEMA(RJSTEMP) REPLACE(*YES) PAGELINES(66) DSPSTDOUT(*YES)
This command uses the text layer INVOICE.RJSXML to extract data from the text file INVOICE.TXT and then creates the output database table INVOICE in the library RJSTEMP. The pages ofthe table have 66 lines. The command replaces an existing output database table with the samename and displays the standard output result.
Top
Error messages for TXTTODB
*ESCAPE MessagesCPF9898
&1.
Top
Appendix B: Supported Printer-Device TypesGhostscript supports the following printer-device types:
Common HP LaserJet Compatible Printer-Device Types
lj5grayH-P LaserJet 5 & 6 family, gray-scale bitmap
pxlmonoH-P black-and-white PCL XL printers (LaserJet 5 and 6 family)
pxlcolorH-P color PCL XL printers
ljet4H-P LaserJet 4 (defaults to 600 dpi)
Appendices 256
© 2008 RJS Software Systems
lj4dithH-P LaserJet 4 with Floyd-Steinberg dithering
ljetplusH-P LaserJet Plus
lj5monoH-P LaserJet 5 & 6 family (PCL XL), bitmap
All Ghostscript Printer-Device Types
ap3250Epson AP3250 printer
appledmpApple Dot Matrix Printer (should also work with Imagewriter)
bj10eCanon BubbleJet BJ10e
bj200Canon BubbleJet BJ200
bjc600Canon Color BubbleJet BJC-600, BJC-4000 and BJC-70, also good for Apple printers like theStyleWriter 2x00
bjc800Canon Color BubbleJet BJC-800
ccrCalComp Raster format
cdeskjetH-P DeskJet 500C with 1 bit/pixel color
cdjcolorH-P DeskJet 500C with 24 bit/pixel color and high-quality color (Floyd-Steinberg) dithering; alsogood for DeskJet 540C and Citizen Projet IIc (-r200x300)
cdjmonoH-P DeskJet 500C printing black only; also good for DeskJet 510, 520, and 540C (black only)
cdj500H-P DeskJet 500C (same as cdjcolor)
cdj550H-P DeskJet 550C/560C
cp50Mitsubishi CP50 color printer
declj250alternate DEC LJ250 driver
deskjet
iForms User Guide257
© 2008 RJS Software Systems
H-P DeskJet and DeskJet Plus
djet500H-P DeskJet 500
djet500cH-P DeskJet 500C alternate driver (does not work on 550C or 560C)
dnj650cH-P DesignJet 650C
epsonEpson-compatible dot matrix printers (9- or 24-pin)
eps9midEpson-compatible 9-pin, interleaved lines (intermediate resolution)
eps9highEpson-compatible 9-pin, interleaved lines (triple resolution)
epsoncEpson LQ-2550 and Fujitsu 3400/2400/1200 color printers
ibmproIBM 9-pin Proprinter
imagenImagen ImPress printers
iwhiApple Imagewriter in high-resolution mode
iwloApple Imagewriter in low-resolution mode
iwlqApple Imagewriter LQ in 320 x 216 DPI mode
jetp3852IBM Jetprinter ink-jet color printer (Model #3852)
laserjetH-P LaserJet
la50DEC LA50 printer
la70DEC LA70 printer
la70tDEC LA70 printer with low-resolution text enhancement
la75DEC LA75 printer
la75plus
Appendices 258
© 2008 RJS Software Systems
DEC LA75plus printer
lbp8Canon LBP-8II laser printer
lips3Canon LIPS III laser printer in English (CaPSL) mode
ln03DEC LN03 printer
lj250DEC LJ250 Companion color printer
ljet2pH-P LaserJet IId/IIp/III* with TIFF compression
ljet3H-P LaserJet III* with Delta Row compression
ljet3dH-P LaserJet IIID with duplex capability
ljet4H-P LaserJet 4 (defaults to 600 dpi)
lj4dithH-P LaserJet 4 with Floyd-Steinberg dithering
ljetplusH-P LaserJet Plus
lj5monoH-P LaserJet 5 & 6 family (PCL XL), bitmap
lj5grayH-P LaserJet 5 & 6 family, gray-scale bitmap
lp2563H-P 2563B line printer
lp8000Epson LP-8000 laser printer
lq850Epson LQ850 printer at 360 x 360 DPI resolution; also good for Canon BJ300 with LQ850emulation
m8510C.Itoh M8510 printer
necp6NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
nwp533Sony Microsystems NWP533 laser printer [Sony only]
iForms User Guide259
© 2008 RJS Software Systems
oce9050OCE 9050 printer
oki182Okidata MicroLine 182
okiibmOkidata MicroLine IBM-compatible printers
paintjetalternate H-P PaintJet color printer
pjH-P PaintJet XL driver
pjetxlalternate H-P PaintJet XL driver
pjxlH-P PaintJet XL color printer
pjxl300H-P PaintJet XL300 color printer;also good for PaintJet 1200C
(pxlmono)H-P black-and-white PCL XL printers (LaserJet 5 and 6 family)
(pxlcolor)H-P color PCL XL printers
r4081Ricoh 4081 laser printer
sj48StarJet 48 inkjet printer
sparcSPARCprinter
st800Epson Stylus 800 printer
stcolorEpson Stylus Color
t4693d2Tektronix 4693d color printer, 2 bits per R/G/B component
t4693d4Tektronix 4693d color printer, 4 bits per R/G/B component
t4693d8Tektronix 4693d color printer, 8 bits per R/G/B component
tek4696Tektronix 4695/4696 inkjet plotter
Appendices 260
© 2008 RJS Software Systems
uniprintUnified printer driver -- Configurable Color ESC/P-, ESC/P2-, HP-RTL/PCL mono/color driver
xesXerox XES printers (2700, 3700, 4045, etc.)
Appendix C: Supported Printer-Paper SizesGhostscript supports the following printer-paper sizes:
US Standard
Inches mm Dots per Inch
Name W × H W × H W × H
11x17 11.0 17.0 279 432 792 1224 11×17in portrait
ledger 17.0 11.0 432 279 1224 792 11×17in landscape
legal 8.5 14.0 216 356 612 1008
letter 8.5 11.0 216 279 612 792
lettersmall 8.5 11.0 216 279 612 792
archE 36.0 48.0 914 1219 2592 3456
archD 24.0 36.0 610 914 1728 2592
archC 18.0 24.0 457 610 1296 1728
archB 12.0 18.0 305 457 864 1296
archA 9.0 12.0 229 305 648 864
ISO standard
a0 33.1 46.8 841 1189 2384 3370
a1 23.4 33.1 594 841 1684 2384
a2 16.5 23.4 420 594 1191 1684
a3 11.7 16.5 297 420 842 1191
a4 8.3 11.7 210 297 595 842
iForms User Guide261
© 2008 RJS Software Systems
a4small 8.3 11.7 210 297 595 842
a5 5.8 8.3 148 210 420 595
a6 4.1 5.8 105 148 297 420
a7 2.9 4.1 74 105 210 297
a8 2.1 2.9 52 74 148 210
a9 1.5 2.1 37 52 105 148
a10 1.0 1.5 26 37 73 105
isob0 39.4 55.7 1000 1414 2835 4008
isob1 27.8 39.4 707 1000 2004 2835
isob2 19.7 27.8 500 707 1417 2004
isob3 13.9 19.7 353 500 1001 1417
isob4 9.8 13.9 250 353 709 1001
isob5 6.9 9.8 176 250 499 709
isob6 4.9 6.9 125 176 354 499
c0 36.1 51.1 917 1297 2599 3677
c1 25.5 36.1 648 917 1837 2599
c2 18.0 25.5 458 648 1298 1837
c3 12.8 18.0 324 458 918 1298
c4 9.0 12.8 229 324 649 918
c5 6.4 9.0 162 229 459 649
c6 4.5 6.4 114 162 323 459
JIS standard
jisb0 1030 1456
jisb1 728 1030
jisb2 515 728
jisb3 364 515
Appendices 262
© 2008 RJS Software Systems
jisb4 257 364
jisb5 182 257
jisb6 128 182
ISO/JIS switchable
b0 (see * below)
b1 (see * below)
b2 (see * below)
b3 (see * below)
b4 (see * below)
b5 (see * below)
Other
flsa 8.5 13.0 216 330 612 936 U.S. foolscap
flse 8.5 13.0 216 330 612 936 European foolscap
halfletter 5.5 8.5 140 216 396 612
* Initially the B paper sizes are the ISO sizes, therefore b0 is the same as isob0. Running the filelib/jispaper.ps makes the B paper sizes be the JIS sizes, therefore b0 becomes the same asjisb0.
Appendix D: Java Scriptlet SampleWith Java scripting you can customize your iForms document formatting. But Java scripting is anadvanced topic. So if you plan to use it in any of your reports, contact RJS Software forform-design assistance.
Below is a Java scriptlet sample that includes a few functions for formatting text:
/**
* Class: IFormsScriptlets
* Desc: This class is a custom scriptlet class for use with JasperReports/iReport/iForms
* to include custom functions in your reports. This class should be used tocontain
iForms User Guide263
© 2008 RJS Software Systems
* all custom user functions that will be created for use withJasperReports/iReport.
*
* JARFiles Required for Compiling
* ----------------------------------
* 1.) This class needs the jasperreports-x.x.x.jar file in the classpath where x.x.x isthe version.
* 2.) This class needs the ireport.jar file in the classpath.
* The jasperreports.jar and ireport.jar files must be in the compiler classpath
* in order for this class to compile.
*
* Creating and compiling the IFormsScriptlets class in WDSC/Eclipse:
* ------------------------------------------------------------------
* 1.) Create a new java project named: IFormsScriptlets.
* 2.) Create a new class named IFormsScriptlet.
* 3.) Copy and paste the data from this file into the new IFormsScriptlet class file.
* 4.) Save code and the class will auto-compile.
* 5.) The main() method can be used in Eclipse/WDSC to test your custom functions.
*
* Exporting the compiled code to IFormsScriptlets.jar file
* --------------------------------------------------------
* 1.) From the "Package Explorer", right click on the IFormsScriptlets project andselect Export
* 2.) Select Java/JAR File. A jar file is a package containing compiled java class code.
* 3.) Enter C:\rjsiforms\iFormsScriptlet.jar as the export destination file name.
* 4.) Deploy the file to the iFormsServer web application LIB folder under Tomcat aslisted below.
*
*
* Deploying your custom functions for the iFormsServer application:
*---------------------------------------------------------------------------------------
* The IFormsScriptlets.jar file must exist in the web application LIB folder.
* Copy the IFormsScriptlets.jar file to the following Windows folder:
* C:\program files\Apache Software Foundation\Tomcat 5.5\webapps\iFormsServer\WEB-INF\lib
*
Appendices 264
© 2008 RJS Software Systems
* As an alternative you could export the jar file directly to:
* C:\program files\Apache Software Foundation\Tomcat 5.5\webapps\iFormsServer\WEB-INF\lib\iFormsScriptlet.jar
*
* **WARNING Note: Tomcat usually will reload updated JAR file, however you may need tmanually restart the
* Tomcat Windows service.
* *
* Using the IFormsScriptlet custom functions when designing a Jasper Report via theiReport Designer:
*---------------------------------------------------------------------------------------------------
* 1.) Start a new report or open an existing one in the iReport Designer.
* 2.) Select the following menu: Edit/Report Properties and click the Scriptlet Classtab.
* 3.) Select the "Use this scriptlet class" option from the pulldown.
* 4.) Type IFormsScriptlets for the class name and click OK.
* 5.) Select the following menu: Optione/Classpath and click "Add Jar".
* 6.) Enter C:\rjsiforms\IFormsScriptlet.jar or wherever the IFormsScriptlet.jar islocated.
*
* Now your report will include your custom functions when it compiles and runs.
*
*/
import net.sf.jasperreports.engine.*;
public class IFormsScriptlets extends it.businesslogic.ireport.IReportScriptlet {
/** Creates a new instance of JRIreportDefaultScriptlet */
public IFormsScriptlets() {
}
iForms User Guide265
© 2008 RJS Software Systems
public static void main(String[] args) {
// Use the main routine for testing Java functions in Eclipse or WDSC
}
public String formatTest1() {
//--------------------------------------------------------
// Method: formatTest1
// Desc: Return value
//--------------------------------------------------------
return "Test1";
}
public String formatStringWithCRLF(String stringvalue) {
// --------------------------------------------------------
// Method: formatStringWithCRLF
// Desc: If string is not blanks, return with new line feed
// otherwise return blanks.
// --------------------------------------------------------
if (stringvalue.trim().length()>0) {
return stringvalue + "\n";
}else{
return "";
}
}
public String getCommentSample(int commentnumber) {
// --------------------------------------------------------
// Method: getCommentSample
// Desc: Returns selected comment based on comment number
// passed in.
// --------------------------------------------------------
Appendices 266
© 2008 RJS Software Systems
try {
// Select comment based on comment number
switch(commentnumber) {
case 1:
return "This is comment 1";
case 2:
return "This is comment 2";
default:
return "No comment selected";
}
} catch (Exception e) {
return "Error occurred while selecting comment";
}
}
public String getCommentSample2(String comparevalue) {
// --------------------------------------------------------
// Method: getCommentSample2
// Desc: Returns selected comment based on text comparison
// value passed in.
// --------------------------------------------------------
// Return the appropriate value or "No comment selected" if
// if gets to the end of the list without selecting a value
try {
// Determine which value to return based on parm passed in
// Do exact comparisons
iForms User Guide267
© 2008 RJS Software Systems
if (comparevalue.compareTo("value1")==0) {
return "This is comment value1";
}
if (comparevalue.compareTo("value2")==0) {
return "This is comment value2";
}
// Convert value to UPPER CASE and test it
if (comparevalue.toUpperCase().compareTo("VALUE1")==0) {
return "This is comment VALUE1";
}
// Convert value to LOWER CASE and test it
if (comparevalue.toUpperCase().compareTo("VALUE2")==0) {
return "This is comment VALUE2";
}
// Convert value to UPPER CASE and test it
if (comparevalue.toUpperCase().compareTo("VALUE3")==0) {
return "This is comment VALUE3";
}
// Return default value.
return "No comment selected for value: " + comparevalue;
} catch (Exception e) {
return "Error occurred while selecting comment";
}
}
Appendices 268
© 2008 RJS Software Systems
public String formatDate(long lDate) {
// --------------------------------------------------------
// Method: formatDate
// Desc: Convert long date to MM/DD/YY format
// --------------------------------------------------------
String wrkDate = new String();
// Convert long date to string
wrkDate = String.valueOf(lDate);
try {
wrkDate = wrkDate.substring(4, 6) + "/" + wrkDate.substring(6) +
"/" + wrkDate.substring(2, 4);
return wrkDate;
} catch(Exception ex){
return " ";
}
}
public String formatStrEdit(String stringvalue, String sptrn) {
// --------------------------------------------------------
// Method: formatStrEdit
// Desc: Apply editing to a string. (Java 1.5 required)
// --------------------------------------------------------
try {
if (stringvalue.trim().length()>0) {
// Format and return string value with selected patterning
return stringvalue.format(sptrn, stringvalue); }
else{
// Return original value if nothing passed in.
return stringvalue;
iForms User Guide269
© 2008 RJS Software Systems
}
} catch(Exception ex) {
// On failure, return original string value
return stringvalue;
}
}
}
iForms User Guide271
© 2008 RJS Software Systems
Index
PDF version - The index is on the next page.
HTML version - Access the index by clicking the Keyword Index link. It looks like this:
Index 272
© 2008 RJS Software Systems
Index- A -Add or Remove IFS Share Command 125
ADDIFSSHR Add or Remove IFS Share 125
Apache Tomcat
downloading 18
- B -Bands
in general 60
properties 61
setting height to zero 60
- C -Check for IFS File Existence Command 128
CHKOBJIFS Check for IFS File Existence 128
Compiling the Form 78
Convert Spool File to iForms Document Command 226
Convert Spool File to iForms Document Using thePrint Server Command 238
Copy Spool File to IFS - PRN Command 166
- D -Display OS/400 Level Command 184
Dots per inch
within iReport 63
- E -Enter Access Codes Command 186
Extract Text File to Database Command 251
- F -Fields
manipulating 71
Form
defined differently in iReport 48
defined in this user guide 8
Form Preview
with null values 78
with values in the fields 102
- G -Generate iForms Report or Form DocumentCommand 193
Generate iForms Report or Form Document Usingthe Print Server Command 209
Generate Test Report Command 181
Ghostscript
supported printer-device types 255
supported printer-paper sizes 260
Ghostscript PASE Printing Environment
restoring 38
- I -IFMATR Retrieve Spool-File Attributes 130
IFMATR2 Retrieve Spool-File Attributes 2 143
IFMJAVAEN Restore Java Objects to the IFS 146
IFMLIST List Output Queue Entries 147
IFMMON iForms Output Queue Monitor 151
IFMNUM Retrieve Spool-File Job Name and Number 153
IFMPJL01 IFS File Copy 156
IFMPRINT Print PDF File 159
IFMSPLTXT Copy Spool File to IFS - PRN 84, 166
IFMSPOOL Spool ASCII IFS File 169
IFMSQL Run SQL Query Statement 173
IFMTEST1 Generate Test Report 41, 181
iForms
features 8
iForms Output Queue Monitor Command 151
IFS File Copy Command 156
IFS Share
creating 39
INSGSOBJ Install Ghostscript and TIFF LibraryUtilities 183
Install Ghostscript and TIFF Library UtilitiesCommand 183
Invoice
sample as a PDF document with values in thefields 104
sample as a PDF document without values in thefields 80
sample JRXML file 38
iForms User Guide273
© 2008 RJS Software Systems
Invoice
sample JRXML form 69
sample report 43, 100
sample TXT file as shown in the Text LayerDesigner 93, 94
spool-file sample 41, 85
iPrint 8
iReport
error message in report query 78
features 8
graphical-element tools 65
how to name fields in 65
manipulating a rectangle in 67
manipulating fields in 71
opening 49
toolbar, form design buttons 65
toolbar, form preview buttons 78
wizard for creating database reports 121
- J -Java
determining version installed 12, 18
scripting 262
Java Objects
restoring to the IFS 37
Java Runtime
checking for 36
JDBC-Connection-Properties File
creating 29
- L -List Output Queue Entries Command 147
- O -OS/400 Portable Application Solutions Environment
checking for 37
determining if installed 14
- P -PASE
checking for 37
determining if installed 14
PDF Viewer
setting the file path of 53
Portable Application Solutions Environment
checking for 37
determining if installed 14
PRDINFO Display OS/400 Level 184
PRDSEC Enter Access Codes 186
Print PDF File Command 159
Print Server
determining the IP address 27
entering the IP address into RJSIFORMS library 27
when recommended to use 11
- R -Ready Reference for Processing Spool Files 46
Rectangle
inserting 66
manipulating 67
Removing
Apache Tomcat from a PC 31
iForms from a System i 31
iReport from a PC 31
Report
defined differently in iReport 48
defined in this user guide 8
how to name in iReport 59
Restore Ghostscript and TIFF Library UtilitiesCommand 191
Restore Java Objects to the IFS Command 146
Retrieve Spool-File Attributes 2 Command 143
Retrieve Spool-File Attributes Command 130
Retrieve Spool-File Job Name and NumberCommand 153
RJS
folders on the C: drive 29
RJS Software Systems
technical support 5
RJS Work with Output Queue Command 188
RJS Work with Spool Files Command 189
RJSWRKOUTQ RJS Work with Output Queue 188
RJSWRKSPLF RJS Work with Spool Files 189
RSTGSOBJ Restore Ghostscript and TIFF LibraryUtilities 191
Run SQL Query Statement Command 173
RUNIFORM Generate iForms Report or FormDocument 193
RUNIFORMJ Generate iForms Report or FormDocument Using the Print Server 209
Index 274
© 2008 RJS Software Systems
- S -Sample JRXML file 38
Sample Report Invoice 43, 100
SPLIFORM Convert Spool File to iForms Document 42, 107, 226
SPLIFORMJ Convert Spool File to iForms DocumentUsing the Print Server 107, 238
Spool ASCII IFS File Command 169
System i
recommended minimum operating-level system 11
- T -Technical Support 5
Test Merging in the Text Layer Designer 99
Text Layer Designer
adding text-layer fields in 94
checking for unmatched form fields in 99
invoice.txt sample in 93, 94
manipulating a field in 96
test merging in 99
Text-Layer Fields 94
manipulating 96
TXTTODB Extract Text File to Database 102, 251
- W -Web.XML Setting
entering 30
Windows IFS Share
creating 39