OPALE - 10.0 - Usage - Sorting and merging spooled files
MAPSORTPAG
Changing a spooled file attribute using MAPSORTPAG
Changing the FORMTYPE of a spooled file generated by MAPSORTSPL can be done in two different ways.
It depends on how many spooled files are in the MAPSORTSPL output queue:
1. If there's only one spooled file in the MAPSORTSPL output queue, then run command CHGSPLFA combine it with another command such as CHGSPLFA FILE(MYSPOOL) SPLNBR(*LAST) FORMTYPE(MYFORMTYPE)
Where MYSPOOL is the name of the spooled file generated by the MAPSORTSPL command
2.
If there are multiple spooled files in the MAPSORTSPL output queue, then you need to execute an action on all output spooled files, this means that you will need to:
- Create MAPSORTSPL output spooled files in one of the robot's input Outq
- Create a new action to change the FORMTYPE and transfer the spooled files in the printing Outq:
e.g. CHGTYPE with command CHGSPLFA FILE(&SPLF) JOB(&JOBNU/&USER/&JOB) SPLNBR(&SPLNUM) FORMTYPE(MYFORMTYPE) OUTQ(MYLIB/MYPRINTER)
- Define the spooled file - action relation for these spooled files
Example: Creating a fold with 8 pages maximum
If an invoice is 10 pages long, the envelope will be folded on page number 8 and a new envelope will be used for the next two pages. To seperate a fold with more than 8 pages in the number of folds you would like, use the QUOTA parameter. Enter 8 to define its value. --> There is no need to add 'V' (Volume) to the CONTROLE parameter, nor to add 'O' to SORTPAGE.
To control the number of pages in the physical file, run an SQL query such as: select count(*) from SYLTST2/FA_EDA901 where numlgn = '0'
SOLUTION more than 66 lines: CHGPRTF MAPOUT
MAPSORTPAG > spooled file Height recovery problem > 66 lines
test 180 under MAP400/UCS2) +++++++++++++++++++++++++++++++
- input spooled file # >>> R58SA127 OUTQ/LIB > SYLVAIN/MAP400
Page dimensions: Height . . . . . . . . . . . . . . : 72 Width . . . . . . . . . . . . . . : 134
- command: #
===> MAPSORTPAG SPLF(R58SA127) SPLNUM(39) JOB(QPRTJOB) JOBNUM(391742) USER(SDAN GEL) KEYLINE(4) KEYCOL(66) KEYLGN(14) SPLFNAME(R58SA127_S) OUTQ(SYLVAIN) OUTQLIB (MAP400)
>>>>>>> specification >>> CHGPRTF MAPOUT for the height
problem mapsortpag with mapreport after updating to v7
Use command SQL to prepare for SORTSIZUTF*:
- (PF buffer to create MAPSORTPAG PF)
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN PAGES SET DATA TYPE CHAR(10) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN PRTDTA SET DATA TYPE CHAR(1134) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE0 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE1 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE2 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE3 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE4 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE5 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE6 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE7 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE8 SET DATA TYPE CHAR(120) CCSID 1208
ALTER TABLE MAP400/SORTSIZUTF ALTER COLUMN CRITERE9 SET DATA TYPE CHAR(120) CCSID 1208
Everytime you use command MAPRUNRPT: add this parameter: DB.MAPPING_DATASTREM=UCS2
Documentation:
The data in strsql can no longer be seen, you need to convert it on the fly:
select cast(prtdta as char(255) ccsid 1147) from alexis/sortsizutf
In Connect:
Data is processed with UTF-8 as direct language.
You do not need to change anything to process a table:
Read(mytable,"Select \"PRTDTA FROM TEST.ANTO\" ") { }
Write(mytable,0) { } NextRead() { }
You only need to run command maprunrpt with parameter DB.MAPPING_DATASTREAM=UCS2 (otherwise, multibyte characters will not be supported)
Caution:
When you wish to link an EBCDIC table and one in UTF-8, the clause where TABLE_EBCDIC.CHAMP1 = TABLE_UTF8.CHAMP1 does not work anymore. It doesn't because data isn't contained in the same encoding. Apply a cast on field: Read(TABLE_UTF8,"Select … From … Where cast(BIB.TABLE_UTF8.CRITERE0 as char(8) ccsid 37) = $TABLE_EBCDIC.CRITERE ") { }
In this example we casted field CRITERE0 from the UTF8 table in ccsid 37 (ebcdic) so that the database can make a difference between the two.