iSeries home   |   Easy400     |   CGIDEV2     |   MMAIL  
Public-Source
 
Introduction
spooled file mapping
the command
 some examples
 
 PDF of this tutorial
 
 Download
 
 

 
 
 
Splecell
Some examples
 

Eight sample CL programs are available in library SPLECELL. Their sources are in file SPLECELL/QCLSRC.
Their names are

  • SAMPLEA1, SAMPLEA2, SAMPLEA3, SAMPLEA4 and
  • SAMPLEB1, SAMPLEB2, SAMPLEB3, SAMPLEB4.

These programs create a temporary spooled file and convert it to an Excel spreadsheet using command SPLECELL.
These spooled files are:
  • for SAMPLEA programs, a spooled file named FINDPRT created by command
    IFSTOOL/FIND BASEDIR('/hssfcgi/html') PATTERN('*.htm').
    This spooled file is generated using printer file IFSTOOL/FINDPRT.
    Its list rows are created using a record format named LINE. Therefore, the mapping of a list row is automatically found by the program through some DSPFFD command.
  • for SAMPLEB programs, a spooled file named QPDSPLIB created by command
    DSPLIB HSSFCGI.
    This spooled file is not generated from a printer file, so we have no record gformat information about its list rows.
    In this case parameter BLKCOLS must be used to map a list row.

The output EXCEL workbooks are all generated in IFS directoty /splecell/samples .
If you want, you may run these programs and open yourself the generated .xls stream files.

However, to make it quicker, we are providing the following table which summarized the main features used by each sample program and provides allows to display the related spooled files, images of the generated workbooks and even open the workbooks themselves.



SPLECELL parameters The command The spooled
file
The resulting
spreadsheet
P
G
M
RCD
FMT
vs
BLK
COLS
IGN
COLS
CELL
CLR
PRT
HDR
COL
HDG
COL
HDG
CLR
BAN
NER
ID
BAN
NER
CLR

S
A
M
P
L
E
A
1

RCD
FMT
SPLECELL/QCLSRC MBR(SAMPLEA1)
SPLECELL FILE(FINDPRT) JOB(*) SPLNBR(*LAST)
   RCDFMT(LINE)
   TOXLS('/splecell/samples/sampleA1.xls')
   BDYRWS(4 66)
   PRTHDR('From command IFSTOOL/FIND' *YES)
display display

download

S
A
M
P
L
E
A
2

RCD
FMT
SPLECELL/QCLSRC MBR(SAMPLEA2)
SPLECELL FILE(FINDPRT) JOB(*) SPLNBR(*LAST)
   RCDFMT(LINE)
   TOXLS('/splecell/samples/sampleA2.xls')
   BDYRWS(4 66)
   IGNCOLS((43 50))
   CELLCLR(MAROON LIGHT_YELLOW)
display display

download

S
A
M
P
L
E
A
3

RCD
FMT
SPLECELL/QCLSRC MBR(SAMPLEA3)
SPLECELL FILE(FINDPRT) JOB(*) SPLNBR(*LAST)
   RCDFMT(LINE)
   TOXLS('/splecell/samples/sampleA3.xls')
   BDYRWS(4 66)
   COLHDG(Type Size Date Time name)
   COLHDGCLR(ROYAL_BLUE GOLD)
   CELLCLR(INDIGO LEMON_CHIFFON)
display display

download

S
A
M
P
L
E
A
4

RCD
FMT
SPLECELL/QCLSRC MBR(SAMPLEA4)
SPLECELL FILE(FINDPRT) JOB(*) SPLNBR(*LAST)
   RCDFMT(LINE)
   TOXLS('/splecell/samples/sampleA4.xls')
   BDYRWS(4 66)
   BANNERID(70020)
   BANNERCLR(WHITE ROYAL_BLUE)
   COLHDG(Type Size Date Time name)
   COLHDGCLR(ROYAL_BLUE GOLD)
   CELLCLR(INDIGO LEMON_CHIFFON)
display display

download

S
A
M
P
L
E
B
1

BLK
COLS
SPLECELL/QCLSRC MBR(SAMPLEB1)
SPLECELL FILE(QPDSPLIB) JOB(*) SPLNBR(*LAST)
   RCDFMT(*NONE)
   TOXLS('/splecell/samples/sampleB1.xls')
   BDYRWS(11 57)
   BLKCOLS((1 3) (14 15) (24 25) (34 35) (52 53) (110 111))
   PRTHDR('Library HSSFCGI on 12/06/2019' *YES
display display

download

S
A
M
P
L
E
B
2

BLK
COLS
SPLECELL/QCLSRC MBR(SAMPLEB2)
SPLECELL FILE(QPDSPLIB) JOB(*) SPLNBR(*LAST)
   RCDFMT(*NONE)
   TOXLS('/splecell/samples/sampleB2.xls')
   BDYRWS(11 57)
   BLKCOLS((1 3) (14 15) (24 25) (34 35) (52 53) (110 111))
   IGNCOLS((36 51))
   CELLCLR(MAROON LIGHT_YELLOW)
display display

download

S
A
M
P
L
E
B
3

BLK
COLS
SPLECELL/QCLSRC MBR(SAMPLEB3)
SPLECELL FILE(QPDSPLIB) JOB(*) SPLNBR(*LAST)
   RCDFMT(*NONE)
   TOXLS('/splecell/samples/sampleB3.xls')
   BDYRWS(11 57)
   BLKCOLS((1 3) (14 15) (24 25) (34 35) (52 53) (110 111))
   COLHDG('Object' Type Attribute Size Description)
   COLHDGCLR(ROYAL_BLUE GOLD)
   CELLCLR(INDIGO LEMON_CHIFFON)
display display

download

S
A
M
P
L
E
B
4

BLK
COLS
SPLECELL/QCLSRC MBR(SAMPLEB4)
SPLECELL FILE(QPDSPLIB) JOB(*) SPLNBR(*LAST)
   RCDFMT(*NONE)
   TOXLS('/splecell/samples/sampleB4.xls')
   BDYRWS(11 57)
   BLKCOLS((1 3) (14 15) (24 25) (34 35) (52 53) (110 111))
   COLHDG('Object' Type Attribute Size Description)
   COLHDGCLR(ROYAL_BLUE GOLD)
   CELLCLR(DARK_TEAL LEMON_CHIFFON)
   BANNERID(70010)
   BANNERCLR(WHITE ROYAL_BLUE)
display display

download