57
CoolSpools Spool Converter User Guide V6R1
Page:
282
www.ariadnesoftware.co.uk
*JOB
The DATSEP job attribute is used to determine the
format of dates in the spooled file.
*SYSVAL
The QDATSEP system value is used to determine
the format of dates in the spooled file.
*NONE
No date separator is used.
Separator
Specify the separator character to assume.
CURSYM - Spooled file currency symbol
Specify the currency symbol to assume when interpreting numeric values in spooled
files using this report definition.
Options are:
*SYSVAL
The QCURSYM system value is used to interpret
numeric values in the spooled file.
Cur_sym
Specify the currency symbol to assume.
DECPOINT - Spooled file decimal point
Specify the decimal point character to assume when interpreting numeric values in
spooled files using this report definition.
Options are:
*JOB
The DECFMT job attribute is used to determine
the decimal point character used when interpreting
numeric values in the spooled file.
*SYSVAL
The QDECFMT system value is used to determine
the decimal point character used when interpreting
numeric values in the spooled file.
Dec_point
Specify the decimal point character to assume.
THOUSANDS - Spooled file 1000s separator
Specify the thousands separator character to assume when interpreting numeric
values in spooled files using this report definition.
Options are:
*JOB
The DECFMT job attribute is used to determine
the thousands separator character used when
interpreting numeric values in the spooled file.
*SYSVAL
The QDECFMT system value is used to determine
the thousands separator character used when
interpreting numeric values in the spooled file.
*NONE
Assume that no thousands separator is used.
1000s_sep
Specify the thousands separator character to
assume.
The following commands also operate on report definitions. Parameters are only
described where they differ significantly from those of the CRTRPTDFN command
described above.
55
CoolSpools Spool Converter User Guide V6R1
Page:
283
www.ariadnesoftware.co.uk
CHGRPTDFN
–
Change Report Definition
The CHGRPTDFN (Change Report Definition) command modifies an existing report
definition.
See CRTRPTDFN above for a discussion of the various parameters.
CPYRPTDFN
–
Copy Report Definition
The CPYRPTDFN (Copy Report Definition) command copies a report definition and
its associated report lines, items and sections.
FROMREPORT
–
From report definition name
Specify the name of the report definition you wish to copy.
TOREPORT
–
To report definition name
Specify the name of the report definition you wish to create, based on the report
definition being copied.
The remaining parameters allow attributes to be modified while the report is being
copied. See CRTRPTDFN above for a discussion of these parameters.
DLTRPTDFN
–
Delete Report Definition
The DLTRPTDFN (Delete Report Definition) command deletes a report definition.
See CRTRPTDFN above for a discussion of the various parameters.
REPORTNAME
–
Report definition name
Specify the name of the report definition you wish to delete.
CHKDEPMAP
–
Check dependent maps
Whether the system should check for report maps that depend on this report
definition.
Options are:
*YES
The system will check for report maps that depend
on this report definition. If any such maps are
found, the system will issue and error and deletion
of the report definition will fail.
*NO
No check for dependent maps will be made. If any
such maps exist, they will become unusable and
an error will occur if you try to use them.
DSPRPTDFN
–
Display Report Definition
The DSPRPTDFN (Display Report Definition) command displays details of a report
definition.
57
CoolSpools Spool Converter User Guide V6R1
Page:
284
www.ariadnesoftware.co.uk
RNMRPTDFN
–
Rename Report Definition
The RNMRPTDFN (Rename Report Definition) command renames a report
definition.
REPORTNAME
–
Report definition name
Specify the name of the report definition you wish to rename.
NEWREPORT
–
New report definition name
Specify the new name for the report definition.
RTVRPTDFN
–
Retrieve Report Definition
The RTVRPTDFN (Retrieve Report Definition) command retrieves CL source for
creating a report definition and all its associated report lines, report items and report
sections. This provides a convenient way of saving and distributing a report definition
to other systems. The source that is retrieved can be easily converted to a program
which can be run to create the report definition.
REPORTNAME
–
Report definition name
Specify the name of the report definition for which you wish to retrieve source.
SRCFILE
–
Source file
Specify the qualified name of the source file into which the source should be
retrieved. The file and library must already exist.
SRCMBR
–
Source member
Specify the name of the source member into which the source should be retrieved. If
the member does not already exist, it will be created.
MBROPT
–
Source member
Whether an existing member is replaced or appended to.
Options are:
*REPLACE
If the member already exists, it will be replaced.
*ADD
If the member already exists, the retrieved source
will be appended to it.
SAVRPTDFN
–
Save Report Definition
The SAVRPTDFN (Save Report Definition) command saves one or more report
definitions into a stream file. The RSTRPTDFN (Restore Report Definition) command
can be used to restore report definitions from the stream file. This facility provides a
means of backing up report definitions and also of distributing them to other systems.
The stream file that is created is a zipped XML document.
55
CoolSpools Spool Converter User Guide V6R1
Page:
285
www.ariadnesoftware.co.uk
REPORTNAME
–
Report definition name
Specify the name of one or more report definitions you wish to save or specify *ALL
to save all report definitions.
TOSTMF
–
To stream file
Specify a path for the stream file in which the report definitions are saved.
If only a single name was specified on the REPORTNAME parameter, you can use
the special default value *RPTDFN, in which case CoolSpools will save the report
definition in the current directory as report_definition_name.rpt, where
report_definition_name is the name specified on the REPORTNAME parameter.
REPLACE - Replace existing stream file
Whether the stream file is replaced if it already exists.
Options are:
*NO
If the stream file exists, an error will occur and it
will not be replaced.
*YES
If the stream file exists, it will be replaced.
AUT- Public data authority
The public data authority to assign to the stream file when it is created.
Options are:
*R
Read only
*W
Write only
*X
Execute only
*RW
Read and write
*RX
Read and execute
*WX
Write and execute
*RWX
Read, write and execute (all)
*NONE
No authority
autl_name
Alternatively, specify the name of an authorization
list. This authorization list will be associated with
the stream file and authorities for *PUBLIC
assigned from the authorization list.
RSTRPTDFN
–
Restore Report Definition
The RSTRPTDFN (Restore Report Definition) command restores one or more report
definitions from a stream file containing report definitions saved by the SAVRPTDFN
(Save Report Definition) command.
50
CoolSpools Spool Converter User Guide V6R1
Page:
286
www.ariadnesoftware.co.uk
REPORTNAME
–
Report definition name
Specify the name of one or more report definitions you wish to restore or specify
*ALL to restore all report definitions saved in the stream file.
FROMSTMF
–
From stream file
Specify a path for the stream file in which the report definitions were saved.
If only a single name was specified on the REPORTNAME parameter, you can use
the special default value *RPTDFN, in which case CoolSpools will look in the current
directory for a stream file called report_definition_name.rpt, where
report_definition_name is the name specified on the REPORTNAME parameter.
REPLACE - Replace existing report
Whether reports definitions are replaced if they already exist.
Options are:
*NO
If a report definition already exists on the system,
an error will occur and it will not be replaced.
*YES
If a report definition already exists on the system, it
will be replaced.
WRKRPTDFN
–
Work with Report Definition
The WRKRPTDFN (Work with Report Definition) command lets you work with a list
of report definitions.
DSNRPTDFN
–
Design Report Definition
The DSNRPTDFN (Design Report Definition) command lets you design a report
definition, that is, specify report lines, report data items and report sections by
reference to a sample spooled file displayed on screen.
You must first create the report definition with CRTRPTDFN.
Refer to the Worked Example below for a description of how to use this facility.
REPORTNAME
–
Report definition name
Specify the report definition you wish to design.
SPLFNAME - Based on spooled file
Specify the name of a spooled file which will be selected and displayed on screen as
a template for you to work with in designing the report definition.
Options are:
*SELECT
You will be prompted to select the spooled file
from a list displayed on screen.
59
CoolSpools Spool Converter User Guide V6R1
Page:
287
www.ariadnesoftware.co.uk
*RPTDFN
The spooled file has the same name as the report
definition.
splf_name
Specify the name of the spooled file
JOB-Spooled file job
Specify the qualified name of the job in which the spooled file was created.
This parameter is ignored if SPLFNAME(*SELECT) is specified.
Options are:
*
The spooled file is associated with the current job
job_name
Specify the name of the job.
SPLNBR-Spooled file number
Specify the number of the spooled file.
This parameter is ignored if SPLFNAME(*SELECT) is specified.
Options are:
*ONLY
There is only one spooled file of the specified
name in the specified job.
*LAST
Select the last spooled file of the specified name in
the specified job.
spl_nbr
Specify the spooled file number.
The following commands allow you to define the content and structure of a report by
adding report lines, report data items and report sections to a report definition.
These commands can also be invoked by taking options from the WRKRPTDFN
screen.
See the DSNRPTDFN (Design Report Definition) command or details of an
alternative method of specifying a report definition interactively using a sample copy
of the spooled file.
ADDRPTLIN
–
Add Report Line
The ADDRPTLIN (Add Report Line) command adds a report line to a report
definition.
A report line describes a line in a report in the sense of a line of text that conforms to
a particular model or pattern. This could be a heading line, a summary line, a detail
line etc. In the Worked Example below, the sample Customer Orders report
comprises a dozen or so different line types, such as:
o
report headings
o
region headings
o
state headings
o
customer headings
o
order details
o
customer totals
o
state totals
56
CoolSpools Spool Converter User Guide V6R1
Page:
288
www.ariadnesoftware.co.uk
o
region totals etc.
When CoolSpools is analyzing a spooled file in order to convert it to text and extract
information from it, its first task is to try to match each line of the spooled file against
a report line from the report definition it is using.
For every different type of line in your report from which you wish to extract
information and which defines the start or end of a section, you should add a report
line to your report definition.
In order for CoolSpools to analyze your spooled file successfully and extract
information from it, it is vital that CoolSpools can correctly identify, for each line in the
spooled file, which report line it corresponds to. Spooled file lines which cannot be
matched to a report line will not be processed. Spooled file lines which are matched
to the wrong report line will produce garbage.
Parameters are as follows. Many of these specify rules which CoolSpools will use to
determine whether lines of text in the spooled file it is processing should be matched
to this report line or not.
REPORTNAME
–
Report definition name
Specify the name of the existing report definition to which you wish to add the line
type.
Report definition names conform to the normal rules for OS/400 object names,
except that they can be up to 20 characters long.
LINENAME
–
Report line name
Specify the name you wish to give to the line type.
Report line names conform to the normal rules for OS/400 object names, except that
they can be up to 20 characters long.
LINETYPE
–
Line type
Specify the type of line you are describing. This information has no function other
than to serve as documentation currently but may be used in other ways in future
versions of CoolSpools.
Options are:
*DETAIL
A detail line.
*PAGHDG
A page heading line
*COLHDG
A column heading line
*SUMMARY
A summary line
*OTHER
Some other kind of line
PAGERANGE
–
Can occur on page numbers
Specify the earliest and latest page numbers in the report which can include the
report line you are adding. For example, often report headings can appear only on
the first page of a report and grand totals only on the last.
52
CoolSpools Spool Converter User Guide V6R1
Page:
289
www.ariadnesoftware.co.uk
The page range is defined in terms of a pair of page numbers with optional
associated page offsets.
From page number
The earliest possible page on which this line type can occur.
Options are:
*FIRST
The first page in the spooled file.
*LAST
The last page in the spooled file.
page_number
Specify the earliest page number.
Offset
A number which is added to the page number above to give the actual page number.
Options are:
*NONE
No offset is applied.
page_offset
Specify the page offset to apply.
This is most commonly used in the form of a negative page offset together with the
option *LAST for the page number above. For example, the pair of values:
page number:
*LAST
page offset:
-1
denotes the penultimate page of the spooled file (last page but one).
To page number
The latest possible page on which this line type can occur.
Options are:
*LAST
The last page in the spooled file.
*FIRST
The first page in the spooled file.
page_number
Specify the latest page number.
Offset
A number which is added to the page number above to give the actual page number.
Options are:
*NONE
No offset is applied.
page_offset
Specify the page offset to apply.
This is most commonly used in the form of a negative page offset together with the
option *LAST for the page number above. For example, the pair of values:
page number:
*LAST
page offset:
-1
denotes the penultimate page of the spooled file (last page but one).
54
CoolSpools Spool Converter User Guide V6R1
Page:
290
www.ariadnesoftware.co.uk
LINERANGE
–
Can occur on line numbers
Specify the earliest and latest line numbers on the page on which the report line you
are adding can occur. For example, often page headings can appear in the first few
lines of a page and footings on the last few lines.
The line range is defined in terms of a pair of line numbers. Note that these will be
calculated using the LPI value specified for the report definition when it was created.
From line number
The earliest possible line on which this report line can occur.
Options are:
*FIRST
The first line of the page.
*LAST
The last line of the page.
line_number
Specify the earliest line number.
To line number
The latest possible line on which this report line can occur.
Options are:
*LAST
The last line of the page.
*FIRST
The first line of the page.
line_number
Specify the latest line number.
RULETYPE
–
Rule type
Specify how CoolSpools will identify lines of this type.
The options are:
*LINNBR
The line type can be identified by its line number
alone. Any line on the range of pages specified
which falls in the line range specified will be
selected and assigned to the line type being
defined.
*REPEAT
The line type can be identified by its line number
alone, but is part of a repeat group. A repeat group
is a group of related lines that occur together on
the page and are repeated down the page,
something like this:
Line 1
Line 2
Line 3
Line 4
Line 1
Line 2
Line 3
Documents you may be interested
Documents you may be interested