Printer File keywords

 

 

Ü  SPACEA (Space After)

·         This keyword is used for spacing.

·         Spacing is used for relative positioning of the content with respect to the line already printed on the page.

·         In an externally described printer file, the paper can be spaced after a line is printed by using this keyword.

·         This keyword can be used at record level as well as field level.

·         If we use this at record level then the spacing occurs after all the fields associated with the record have been printed.

·         If we use this at field level then the spacing occurs after that field has been printed.

·         This keyword is not valid for records with specified line numbers (positions 39 through 41).

·         The format of the keyword is:

o   SPACEA(No. of lines to be spaced)

·         The spacing can range from 1 to 255.

 

 

Example

 

After the record HEADER has been printed, 2 lines are spaced

 


0000.01      A*%%**************************************************************
0000.06      A          R HEADER                    SPACEA(002)
0000.10      A                                     4
0000.11      A                                      'ORG'
0000.12      A                                    +6
0000.13      A                                      'ACCOUNT NO'
0000.14      A                                    +9
0000.15      A                                      'CCY'
0000.16      A                                   +10
0000.17      A                                      'PARTY NO'
0000.20      A*%%**************************************************************

 

 

**See Example: Implementing spacing/skipping

 

 

 

 

Ü  SPACEB (Space Before)

·         This keyword is used for spacing.

·         Spacing is used for relative positioning of the content with respect to the line already printed on the page.

·         In an externally described printer file, the paper can be spaced before a line is printed by using this keyword.

·         This keyword can be used at record level as well as field level.

·         If we use this at record level then the spacing occurs before any of the fields associated with the record have been printed.

·         If we use this at field level then the spacing occurs before that field has been printed.

·         SPACEB(01) by-default comes in printer DDS as there should be at least 1 space between two DDS record FORMAT.

·         This keyword is not valid for records with specified line numbers (positions 39 through 41).

·         The format of the keyword is:

o   SPACEB(No. of lines to be spaced)

·         The spacing can range from 1 to 255.

 

Example

 

Before printing the record format FOOTER, 3 lines are spaced.

 


0000.36      A*%%**************************************************************
0000.37      A          R FOOTER
0000.41      A                                      SPACEB(003)
0000.42      A                                    13
0000.43      A                                      'TOTAL CUSTOMER FOUND = '
0000.44      A            TOTAL          2S 0O    +0

 

**See Example: Implementing spacing/skipping

 

Ü SKIPA (Skip After)

·         This keyword is used for skipping.

·         Skipping is used for fixed format printing. Like if we know that at which line we have to print what. e.g. on any pay-cheque or demand draft or any receipt we know in well advance the line number that is to be used for printing a specific thing( branch name, address, depositor name, signature..etc)

·         If you have written something from line no. 1 to 5 and you want to skip those 5 lines, simple use SKIPA (6). Those five will be skipped and

·         This keyword is used at file level, record level or field-level.

·         The format of the keyword is:

o   SKIPA(skip-after-line-number)

·         The skipping can range from 1 to 255.

·         If you specify the keyword at the file level, you must option it with one or more indicators.

·         If we use it at file name that means that the skip operation is performed after all records in the file get printed.

·         If we use this at record level then the skipping occurs after all the fields associated with the record have been printed.

·         If we use this at field level then the skipping occurs after that field has been printed.

·         **See Example: Implementing spacing/skipping

 

 

Ü SKIPB (Skip Before)

 

·         This keyword is used for skipping.

·         Skipping is used for fixed format printing. Like if we know that at which line we have to print what. e.g. on any pay-cheque or demand draft or any receipt we know in well advance the line number that is to be used for printing a specific thing( branch name, address, depositor name, signature..etc)

·         If you have written something from line no. 1 to 5 and you want to skip those 5 lines, simple use skip (5).

·         This keyword is used at file level, record level or field-level.

·         The format of the keyword is:

o   SKIPB(skip-after-line-number)

·         The skipping can range from 1 to 255.

·         If you specify the keyword at the file level, you must option it with one or more indicators.

·         If we use it at file name that means that the skip operation is performed before any of the records in the file gets printed.

·         If we use this at record level then the skipping occurs before any of the fields associated with the record have been printed.

·         If we use this at field level then the skipping occurs before that field has been printed.

·         **See Example: Implementing spacing/skipping

 

 

 

Example: Implementing spacing/skipping

 

*** NOTE: It is not possible to see the effect on the generated print report/spool file, these are the printer setting when printer print the document then it detects these SPACE and SKIP and print the same on the paper.

 

 

Printer file DDS

 


Columns . . . :    1 100                      Edit                         IROBO1/QRPGLESRC
SEU==>                                                                               PRINT1
FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...
*************** Beginning of data ***************************************************
0001.00      A*%%***********************************************************************
0002.00      A*%%TS  RD  20121019  191753  IROBO       REL-V5R3M0  5722-WDS
0003.00      A*%%***********************************************************************
0004.00      A          R HEADER1
0005.00      A                                      SPACEB(4)
0006.00      A                                    10
0007.00      A                                      'ALL RIGHT RESERVED IROBO@BANK'
0008.00      A*%%***********************************************************************
0009.00      A          R HEADER2
0010.00      A                                      SPACEB(1)
0011.00      A                                      SKIPA(006)
0012.00      A                                     2
0013.00      A                                      'ORG CODE'
0014.00      A                                    +4
0015.00      A                                      'ACCOUNT NO'
0016.00      A                                    +4
0017.00      A                                      'CURRENCY'
0018.00      A                                    +4
0019.00      A                                      'PARTY NO.'
0020.00      A*%%***********************************************************************
0021.00      A          R DETAIL
0022.00      A                                      SPACEB(001)
0023.00      A            ORG       R        O     2
0024.00      A                                      REFFLD(REC1/ORG IROBO1/ACCOUNT)
0025.00      A            ACC       R        O    +9
0026.00      A                                      REFFLD(REC1/ACC IROBO1/ACCOUNT)
0027.00      A            CCY       R        O    +2
0028.00      A                                      REFFLD(REC1/CCY IROBO1/ACCOUNT)
0029.00      A            PARTY     R        O    +9
0030.00      A                                      REFFLD(REC1/PARTY IROBO1/ACCOUNT)
0031.00      A*%%***********************************************************************
0032.00      A          R FOOTER
0033.00      A                                      SPACEB(003)
0034.00      A                                      SKIPA(30)
0035.00      A                                    14
0036.00      A                                      'NUMBER OF ACCOUNTS'
0037.00      A            TOTAL          2S 0O    +1
0038.00      A*%%***********************************************************************
0039.00      A          R SUMMARY                   SKIPA(5)
0040.00      A                                    10SPACEA(1)
0041.00      A                                      '********************************'
0042.00      A                                    10
0043.00      A                                      '******END OF THE REPORT*********'
0044.00      A*%%***********************************************************************
0045.00      A          R NXTPAGE
0046.00      A                                    10SPACEA(1)
0047.00      A                                      '********************************'
0048.00      A                                    10
0049.00      A                                      '**EXTRA PAGE FOR OFFICE USE ONLY**'
0050.00      A*%%***********************************************************************
****************** End of data *************************************************

 

 

                                         

Printer program

 


Columns . . . :    6 100                Browse                              IROBO1/QRPGLESRC
SEU==>                                                                            PRINT1PGM
FMT F  FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++Comments++++++++++++
*************** Beginning of data **************************************************
0001.00 FPRINT1    o    E             PRINTER OFLIND(*IN90)
0002.00 FACCOUNT   IF   E           K DISK
0003.00 C                   Z-ADD     *ZEROS        COUNT             2 0
0004.00 C                   WRITE     HEADER1
0005.00 C                   WRITE     HEADER2
0006.00 C                   READ      REC1                                   80
0007.00 C                   DOW       *IN80=*OFF
0008.00 C                   WRITE     DETAIL                               90
0009.00 C   90              WRITE     HEADER2
0010.00 C                   EVAL      COUNT=COUNT+1
0011.00 C                   READ      REC1                                   80
0012.00 C                   ENDDO
0013.00 C                   EVAL      TOTAL=COUNT
0014.00 C                   WRITE     FOOTER
0015.00 C                   WRITE     SUMMARY
0016.00 C                   WRITE     NXTPAGE
0017.00 C                   SETON                                        LR
****************** End of data *******************************************

 

 

OUTPUT

 


                                         Display Spooled File
File  . . . . . :   PRINT1                                                    Page/Line   1/5
Control . . . . .   +1   >>>>> To seek the line number                    Columns     1 - 130
Find  . . . . . .
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9...
        ALL RIGHT RESERVED IROBO@BANK                      >>>>>>>> Page/Line=1/5
ORG CODE    ACCOUNT NO    CURRENCY    PARTY NO.            >>>>>>>> Page/Line=1/6
190         A00000000001  CCY         P00000000001         >>>>>>>> Page/Line=1/7
190         A00000000005  INR         P00000000005
190         A00000000006  TRY         P00000000006
190         A00000000013  EUR         P00000000009
190         P00000000019  EUR         P00000000015
191         A00000000002  EUR         P00000000002
191         A00000000008  GBP         P00000000002
191         A00000000009  USD         P00000000001
191         A00000000018  EUR         P00000000014
191         P00000000014  USD         P00000000004
192         A00000000003  USD         P00000000003
192         A00000000004  TRY         P00000000004
192         A00000000007  INR         P00000000007
192         A00000000012  EUR         P00000000002
192         A00000000015  INR         P00000000010
192         A00000000016  GBP         P00000000011
192         A00000000017  AZK         P00000000017
193         A00000000011  TRY         P00000000005
195         A00000000010  EUR         P00000000003         >>>>>>>> Page/Line=1/25
            NUMBER OF ACCOUNTS 19                          >>>>>>>> Page/Line=1/28
        ********************************                   >>>>>>>> Page/Line=1/30   
        ******END OF THE REPORT*********                   >>>>>>>> Page/Line=1/31
        ********************************                   >>>>>>>> Page/Line=2/5
        **EXTRA PAGE FOR OFFICE USE ONLY**                 >>>>>>>> Page/Line=2/6

                   

 



Ü COLOR (Color)

·         This keyword is used at field level.

·         It is used to highlight any field in the specified color mentioned in the parameter for COLOR keyword.

·         The printer should be capable to detecting the color that we mention, if not then the default color black is used.

·         The format of the keyword is:

 

COLOR(color-name | *RGB R-value G-value B-value |

      *CMYK C-value M-value Y-value K-value |

      *HIGHLIGHT H-value coverage)

   

       Where,

 

R-value = Red value

G-value = Green value

B-value = Blue Value

C-value = Cyan value

M-value = Magenta value

Y-value = Yellow value

K-value = Black value

H-value = Highlight value

 

 

 

 

Ü CPI (Characters Per Inch)

 

·         This keyword is used to adjust the appearance of the field in the form of density or spacing(character per inch)

·         We can adjust the spacing for a single field by specifying the keyword at that field level or multiple fields by specifying this at record level.

·         The format of the keyword is:

CPI (10|15)

Example


|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R REC001
00020A                                      CPI(15)
00030A            FIELD1       10       5   
00040A            FIELD2       15  0   25

 

 

 

 

 

Ü DATE (Date)

·         This printer keyword is used to display System Date on the report.

·         We can use EDTCDE(Y) to edit the date.

·         The format of the keyword is:

DATE(*SYS *YY)

 

Example

The following example shows how to specify the DATE keyword.


     A                                  1  1
     A                                      DATE
     A                                  2  1
     A                                      DATE EDTCDE(Y)

 

 


     A                                  3  1
     A                                      DATE(*JOB *Y)
     A                                  4  1
     A                                      DATE(*JOB) EDTCDE(Y)

 

 


     A                                  5  1
     A                                      DATE(*SYS)
     A                                  6  1
     A                                      DATE(*SYS *YY) EDTCDE(Y)

 

 

 

 

 

Ü DATSEP (Date Separator)

·         If we are defining some field as a date data format then we can use DATSEP to do the separator formatting.

 

Example

 


 A          R REC0001
 A            DATE01          L  B  5  2DATFMT(*DMY) DATSEP('-')
 A            DATE02          L  B  5 42DATFMT(*JOB) DATSEP(*JOB)

 

 

 

Ü DATFMT (Date Format)

·         If we are defining some field as a date data format then we can use DATFMT to do the date formatting.

·         Below is the list of the date format:

 

Format name

Date-format parameter

Date format and separator

Example

Job default

*JOB

Month/day/year

*MDY

MM/DD/YY

01/10/12

Day/month/year

*DMY

DD/MM/YY

10/01/12

Year/month/day

*YMD

YY/MM/DD

12/01/10

International standards organization

*ISO

YYYY-MM-DD

2012-01-10

IBM® USA standard

*USA

MM/DD/YYYY

01/10/2012

 

 

Example

 

 
 A          R REC0001
 A            DATE01          L  B  5  2DATFMT(*DMY) DATSEP('-')
 A            DATE02          L  B  5 42DATFMT(*JOB) DATSEP(*JOB)

 

 

 

Ü EDTCDE (Edit Code)

·         Use this keyword to edit output-capable numeric fields.

·         Depending on which edit code you specify, you can change the appearance of the printed fields as follows:

·         The field can be punctuated with commas and periods.

·         Negative values can be printed with a minus sign or CR to the right.

·         Zero values can be printed as zeros or blanks as per the requirement.

·         Asterisks can be printed to the left of digits.

·         A currency symbol can be printed with the help of this keyword.

·         The format of the keyword is:

EDTCDE(Edit-code [* | Currency-symbol])

 

 

 

Ü LINE (Line)

·         This is used at record-level to print a horizontal or a vertical line.

 

 

Ü PAGNBR (Page Number)

·         This field-level keyword is used to specify the page number on the report.

·         The page number is 4 digit zoned decimal.

 

Example

 


0017.00      OQPRINT    E            HEADER                                            
0018.00      O                                            6 'PAGE'                     
0019.00      O                       Page                10       

 

 

 

 

Ü TIME (Time)

·         This field-level keyword prints the current system on the report.

 











User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy