OPALE - 10.0 - Usage - Sorting and merging spooled files
MAPSORTPAG
CHGSPLFA with MAPSORTPAG
Changing the FORMTYPE of a spooled file generated by MAPSORTSPL can be done in two different ways.
It depends of 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)
MYSPOOL being the name of the spooled file generated by command MAPSORTSPL
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 MAPSORTSSPL 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
MAPSORTPAG_v7-and Copying
Pour pouvoir séparer un pli de plus de 8 pages en autant de plis que bécessaire, (si une facture fait 10 pages, l'enveloppe sera fermée sur la 8 ème page et une nouvelle enveloppe sera insérée pour les 2 pages suivantes), utilisez le paramètre QUOTA. Positionnez sa valeur à 8. --> Pas besoin de passer le paramètre CONTROLE à 'V' et le SORTPAGE à 'O' dans ce cas. Cordialement,
ctrl nb pages in pf:
req SQL
select count(*) from SYLTST2/FA_EDA901 where numlgn = '0'
SOLUTION more than 66 lines:
CHGPRTF MAPOUT
28/10/2010
MAPSORTPAG > spooled file 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:
Data can no longer be seen in strsql, you need to convert it in real time:
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, 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.