46
Page:
181
*NONE
Do not split the spooled file. A single stream file is created.
*PAGE
Split the spooled file into separate stream files every so many
pages. This option is useful if, for example, you want to create
separate stream files for each customer in the report, and the
section of the report relating to a single customer is always a
fixed number of pages long.
*KEY
Split the spooled file into separate stream files every time a
given key string appears in the spooled file. This option can be
useful if, for example, you wish to split the report every time a
piece of text (e.g. a field label such as „Customer number:‟)
appears in the report.
Alternatively, this method can also be used to identify split
points by checking the value of the text at a particular area of
the spooled file, where that text is located by means of its
offset position from a specified key string.
For example, if the customer number in your spooled file is
preceded by the string „Customer number‟, you can use
„Customer number‟ as the key string to locate the customer
number on the page, then use changes to the customer number
as the trigger for the creation of a new PDF file.
You will define the precise splitting criteria on the SPLITKEY
parameter.
*POS
Split the spooled file into separate stream files based on
checking the value of the text in the spooled file at a specified
position on the page. The position is identified by means of
coordinates down the page from top to bottom or line numbers
and coordinates across the age from left to right or columns
numbers.
You will define the precise splitting criteria on the SPLITPOS
parameter.
*POSKEY
A combination of positional and key splitting criteria will be
used.
You will define the precise splitting criteria on both the
SPLITPOS and the SPLITKEY parameter.
This option is not supported by CVTSPLSTMF.
*PAGGRP
The spooled file will be split every time a new page group is
started. Page groups can be defined in the spooled file by
means of the DDS PAGGRP keyword.
Pdf metadata online - add, remove, update PDF metadata in C#.net, ASP.NET, MVC, Ajax, WinForms, WPFAllow C# Developers to Read, Add, Edit, Update and Delete PDF Metadata
remove pdf metadata online; preview edit pdf metadata Pdf metadata online - VB.NET PDF metadata library: add, remove, update PDF metadata in vb.net, ASP.NET, MVC, Ajax, WinForms, WPFEnable VB.NET Users to Read, Write, Edit, Delete and Update PDF Document Metadata
pdf metadata editor online; pdf xmp metadata viewer
46
Page:
182
Split method
The second element of the SPLIT parameter indicates whether splitting should occur
before the split point or after it.
Options are:
*BEFORE
(Default). The spooled file is split before the split point. The
page on which the split point occurs will become the first page
of the new PDF file.
This option is typically used where the text which triggers the
creation of a new stream file occurs in a heading at the start of
the new section of the spooled file, i.e. the trigger identifies
the start of a new section.
*AFTER
The spooled file is split after the split point. The page on
which the split point occurs will be the last page prior to the
start of a new PDF file.
This option is typically used where the text which triggers the
creation of a new stream file occurs in a footing at the end of
the previous section of the spooled file, i.e. the trigger
identifies the end of the section.
Note that each stream file must consist of at least one complete page. CoolSpools
cannot split a single page across stream files.
Suffix separator character
The third element of the SPLIT parameter determines the separator character, if any,
that is inserted between the body of the file name you specify on the TOSTMF
parameter (i.e. the name prior to the extension) and the numeric suffix which
CoolSpools appends to that name to create a file name for each stream file
generated.
Options are:
*NONE
(Default). No separator is used.
*UNDERSCORE
An underscore character (_).
separator_char
Any other character allowed in a file name.
Example:
CVTSPLPDF
FROMFILE(INVOICES)
TOSTMF(invoice.pdf)…
SPLIT(*PAGE *BEFORE *NONE)
SPLITPAGE(1)
Here CoolSpools will create stream files called invoice1.pdf, invoice2.pdf,
invoice3.pdf etc. since you have specified *NONE for the separator character.
However, if you specify:
10
Page:
183
CVTSPLPDF
FROMFILE(INVOICES)
TOSTMF(invoice.pdf)…
SPLIT(*PAGE *BEFORE *UNDERSCORE)
SPLITPAGE(1)
CoolSpools will create stream files called invoice_1.pdf, invoice_2.pdf,
invoice_3.pdf etc. as you have requested that an underscore be used for the
separator character.
46
Page:
184
SPLITKEY – Split by key options
Parameter
SPLITKEY
Applies to
commands:
CVTSPLSTMF, CVTSPLCSV, CVTSPLHTML, CVTSPLPDF,
CVTSPLRTF, CVTSPLSPLF, CVTSPLTXT, CVTSPLXLS
Dependent on: CVTSPLSTMF: PMTADLPARM(*YES) and SPLIT(*KEY)
Others: SPLIT(*KEY) or SPLIT(*POSKEY)
The SPLITKEY (Split Key String) parameter can be used only if SPLIT(*KEY) is
selected, or, in relation to the format-specific commands only, SPLIT(*POSKEY).
CVTSPLSTMF allows only a single key string to be defined for splitting. The format-
specific commands allow up to 100 key strings to be defined.
This parameter has two related functions.
The first function allows you to specify a key string which will trigger the creation of a
new stream file every time it appears in the spooled file.
Example:
CVTSPLPDF
FROMFILE(SALES)…
SPLIT(*KEY
SPLITKEY(‘Branch code:’)
Here the sales report is split into separate PDF files every time the string „Branch
code:‟ appears in the report.
The second function allows you to locate an area of the spooled file on the page by
means of an offset position from the given key string. You can then perform
comparisons on the value of the text at the position in the spooled file thus located
and use these to control the splitting of the spooled file.
Example:
CVTSPLPDF
FROMFILE(SALES)…
SPLIT(*KEY)
SPLITKEY( ‘Branch code:’
*IF 12 10 *ROWCOL *NE *PRV)
Here the sales report is split into separate PDF files based on the 10 characters of
text that appear 12 characters to the right of the string „Branch code:‟ If this text is
not equal to the previous value at this same position, a split will occur.
There are seven elements to this parameter:
o Split key string
o Split by key method
o Offset
o Length
o Measurement method
o Comparison
o String to compare
44
Page:
185
Split key string
The first element is the key string itself.
This is a case-sensitive value.
Split by key method
The second element is the method of operation of this parameter
Options are:
*ALWAYS
Split the spooled file every time the key string appears in the
spooled file. This is the default value.
*IF
Use the key string to locate an area of the spooled file and
then conditionally split the spooled based on performing a
comparison on the text at that position.
The remaining elements are relevant only if *IF is specified for the second part of the
SPLITKEY parameter.
Offset
Depending on the value specified for the “Measurement method” below, enter the
offset in either characters (*ROWCOL) or measurement units(*MM, *CM, *INCH)
from the start of the key string to the start of the text to be checked for splitting
purposes.
If a positive number is entered, this is interpreted as indicating that the value to
check is to the right of the key string, whereas a negative number indicates that the
value to check is to the left of the key string.
Length
Depending on the value specified for the “Measurement method” below, enter either
the length of the value to check in characters (*ROWCOL) or in measurement units
on the page (*MM, *CM or *INCH).
Measurement method
Options are:
*ROWCOL
(Default) Rows and columns.
Use DSPSPLF as your guide and ensure that TEXT(*CPI) is
also specified if using CVTSPLSTMF.
*MM
Millimeters
*CM
Centimeters
*INCH
Inches
Comparison
A comparison operator. This allows you to indicate the type of comparison to be
performed on the area of the spooled file identified by the preceding parameters.
46
Page:
186
Options are:
*EQ
Equal to.
*NE
Not equal to
*GT
Greater than
*LT
Less than
*GE
Greater than or equal to
*LE
Less than or equal to
*CT
“Contained in”, i.e. the comparison string appears somewhere
in the area identified
*NC
“Not contained in”, i.e. the comparison string does not appear
anywhere in the area identified
String to compare
The last element is the string against which the area of the spooled file selected
should be compared, using the comparison operator specified in the preceding
parameter. Any string may be specified, but the default value is the special value
*PRV, which denotes the previous value at the same location.
Example:
CVTSPLPDF
FROMFILE(INVOICES)…
SPLIT(*KEY)
SPLITKEY(‘Page No.:’ *IF 0.5 0.1 *INCH *EQ ’1’)
In this scenario, imagine that the spooled file contains invoices for multiple
customers. Every time a new customer invoice is started, the page number is reset
to 1. Here, the SPLITKEY parameter is being used to locate the page number in the
spooled file: it is the text 0.1 of an inch long 0.5 inch to the right of the words “Page
No.‟”. A split will occur every time this area of the spooled file is equal to “1”, i.e.
every first page of a customer invoice.
Example:
CVTSPLPDF
FROMFILE(SALES)…
SPLIT(*KEY)
SPLITKEY(‘Area code:’ *IF 12 5 *ROWCOL *NE *PRV)
Here, the SPLITKEY parameter is being used to locate the area code in the spooled
file: it is the 5 characters of text 12 characters to the right of the words “Area code:”.
A split will occur every time this area of the spooled file is different from the previous
value at the same position, i.e. every time the area code changes.
46
Page:
187
SPLITPOS - Split by position options
Parameter
SPLITPOS
Applies to
commands:
CVTSPLSTMF, CVTSPLCSV, CVTSPLHTML, CVTSPLPDF,
CVTSPLRTF, CVTSPLSPLF, CVTSPLTXT, CVTSPLXLS
Dependent on: CVTSPLSTMF: PMTADLPARM(*YES) and SPLIT(*KEY)
Others: SPLIT(*POS) or SPLIT(*POSKEY)
This parameter allows you to locate an area of the spooled file on the page by
means of coordinates down the page from top to bottom and across the page from
left to right, or by line number and column position. You can then perform
comparisons on the value of the text at the position in the spooled file thus located
and use these to control the splitting of the spooled file.
Example:
CVTSPLPDF
FROMFILE(SALES)…
SPLIT(*POS)
SPLITPOS(1 3 10 *ROWCOL *NE *PRV)
Here the sales report is split into separate stream files based on the 10 characters of
text that appear at column 3 of line 1 of each page. If this text is not equal to the
previous value at this same position, a split will occur.
There are six elements to this parameter.
o Line number or y coordinate
o Char. position or x coordinate
o Length
o Measurement method
o Comparison
o String to compare
Line number or y coordinate
The line number or “y coordinate” of the start of the area of the page to be checked,
i.e. the position down the page from top to bottom where the area of the spooled file
to be checked is located. It is specified in either columns, inches or millimeters,
depending on the value of the measurement method option below.
Char. position or x coordinate
The column number or “x coordinate”, of the start of the area of the page to be
checked, i.e. the position across the spooled file from left to right where the area of
the spooled file to be checked is located. It is specified in either columns, inches or
millimeters, depending on the value of the measurement method option (see fourth
element below).
Length
The length of the area to be checked. It is specified in either columns, inches or
millimeters, depending on the value of the measurement method option (see fourth
element below).
41
Page:
188
Measurement method
Options are:
*ROWCOL
(Default) Rows and columns.
Use DSPSPLF as your guide and ensure that TEXT(*CPI) is
also specified if using CVTSPLSTMF.
*MM
Millimeters
*CM
Centimeters
*INCH
Inches
Comparison
A comparison operator. This allows you to indicate the type of comparison to be
performed on the area of the spooled file identified by the preceding parameters.
Options are:
*EQ
Equal to.
*NE
Not equal to
*GT
Greater than
*LT
Less than
*GE
Greater than or equal to
*LE
Less than or equal to
*CT
“Contained in”, i.e. the comparison string appears somewhere
in the area identified
*NC
“Not contained in”, i.e. the comparison string does not appear
anywhere in the area identified
String to compare
The last element is the string against which the area of the spooled file selected
should be compared, using the comparison operator specified in the preceding
parameter. Any string may be specified, but the default value is the special value
*PRV, which denotes the previous value at the same location.
22
Page:
189
Example:
CVTSPLPDF
FROMFILE(INVOICES)…
SPLIT(*POS)
SPLITPOS(1.0 7.0 0.3 *INCH *EQ ’1’)
In this scenario, imagine that the spooled file contains invoices for multiple
customers. Every time a new customer invoice is started, the page number is reset
to 1. Here, the SPLITPOS parameter is being used to locate the page number in the
spooled file: it is the text 0.3 of an inch long which appears 1.0 inches down the page
and 7.0 inches across the page. A split will occur every time this area of the spooled
file is equal to “1”, i.e. every first page of a customer invoice.
Example:
CVTSPLPDF
FROMFILE(SALES)…
SPLIT(*POS)
SPLITPOS(2 12 5 *ROWCOL *NE *PRV)
Here, the SPLITPOS parameter is being used to locate the area code in the spooled
file: it is the 5 characters of text at column 12 of line 2 . A split will occur every time
this area of the spooled file is different from the previous value at the same position,
i.e. every time the area code changes.
27
Page:
190
SPLITPAGE – Split file every n pages
Parameter
SPLITPAGE
Applies to
commands:
CVTSPLSTMF, CVTSPLCSV, CVTSPLHTML, CVTSPLPDF,
CVTSPLRTF, CVTSPLSPLF, CVTSPLTXT, CVTSPLXLS
Dependent on: CVTSPLSTMF: PMTADLPARM(*YES) and SPLIT(*PAGE)
Others: SPLIT(*PAGE)
When SPLIT(*PAGE) is specified to indicate that the spooled file should be split into
separate output files every so many pages, this parameter allows you to specify the
number of pages after which CoolSpools will create a new output file.
Example:
CVTSPLPDF
FROMFILE(INVOICES)…
SPLIT(*PAGE)
SPLITPAGE(2)
Here the invoices spooled file is split into separate stream files every two pages.
Each stream file will contain exactly two pages.
CVTSPLSPLF
FROMFILE(INVOICES)…
SPLIT(*PAGE)
SPLITPAGE(10)
Here again the invoices spooled file is being split, but this time into different spooled
files, each 10 pages long.
Documents you may be interested
Documents you may be interested