Example 1—Printing a Letter Containing Variables
This example produces confirmation letters for customers having installment loans. The account number, outstanding balance, late charges, and remaining payments vary in each letter.
The following code:
IN 80 REC ACCOUNT 1 5 REC NAME 6 18 REC STREET 24 19 REC CITY 43 13 REC STATE 56 2 REC ZIP-CODE 58 5 REC BALANCE 63 7 2 DP=2 REC ODCHG 70 5 2 DP=2 REC REMAIN 75 3 2 10OUT 324 D UM(CULEMLIN) $Output buffer = 81 bytes x 4 print lines 10410001 '#' $Identifies the heading 10410033 'LAST NATIONAL BANK' 10410115 '1234 MAIN STREET' 10410197 'SOMEWHERE, USA' 10410244 '0' 10510001 '1' $New buffer contents 1 10510056 'month dd, yyyy' $Print line 1 10510082 '-' $Triple space 10510088 NAME $Print line 2 10510169 STREET $Print line 3 10510250 CITY $Print 10510264 STATE $ line 10510267 ZIP-CODE $ 4 10520001 '-' $New buffer contents 2 10520007 'DEAR CUSTOMER:' 10520082 '-' 10520092 'FROM TIME TO TIME, AS PART OF OUR REGULAR AUDIT' 10520140 'PROCEDURE, WE' 10520169 'ASK OUR CUSTOMERS TO CONFIRM THAT' 10520203 'THEIR RECORDS ARE IN AGREEMENT' 10520250 'WITH OURS. THE INFORMATION SHOWN BELOW IS TAKEN' 10520299 'FROM OUR RECORDS' 10530007 'OF YOUR ***INSTALLMENT LOAN*** ACCOUNT AS OF' 10530052 'THE AUDIT DATE ABOVE.' 10530088 'THIS IS NOT A REQUEST FOR PAYMENT.' * $Blanks in the output buffer create two blank lines 10540016 'ACCOUNT NUMBER' 10540054 ACCOUNT 10540097 'OUTSTANDING BALANCE' 10540131 BALANCE F2 10540178 'LATE CHARGES DUE' 10540215 ODCHG F2 10540259 'REMAINING PAYMENTS' 10540302 REMAIN F1 10550001 '-' $New buffer contents 3 10550011 'PLEASE SIGN AND RETURN THIS LETTER IN THE' 10550053 'ENCLOSED POSTAGE' 10550088 'PAID ENVELOPE. IF YOUR RECORDS DO NOT AGREE,' 10550134 'ADDITIONALLY PLEASE' 10550169 'WRITE IN THE CORRECT DATA. YOUR PROMPT REPLY' 10550215 'WILL BE GREATLY' 10550250 'APPRECIATED.' 10560001 '-' $New buffer contents 4 10560042 'VERY TRULY YOURS,' 10560082 '-' $Triple space 10560123 'INTERNAL AUDIT DEPARTMENT' 10560163 '-' $Triple space 10560169 '----------------------------------------' 10560209 '---------------------------' 10560250 ACCOUNT 10560275 'PLEASE REPLY BELOW' 10570001 '-' $New buffer contents 5 10570088 '--------------------' 10570113 '-----------------------------------------' 10570176 'DATE' 10570208 'SIGNATURE' 10570244 '-' $Triple space 10570250 'COMMENTS -'
Printed Letter
Shown below is a letter which is the result of the code given above.
month dd, yyyy AMOS JOHNSON 22651 MASS AVENUE SAN FRANCISCO CA 09801 DEAR CUSTOMER: FROM TIME TO TIME, AS PART OF OUR REGULAR AUDIT PROCEDURE, WE ASK OUR CUSTOMERS TO CONFIRM THAT THEIR RECORDS ARE IN AGREEMENT WITH OURS. THE INFORMATION SHOWN BELOW IS TAKEN FROM OUR RECORDS OF YOUR ***INSTALLMENT LOAN*** ACCOUNT AS OF THE AUDIT DATE ABOVE. THIS IS NOT A REQUEST FOR PAYMENT. ACCOUNT NUMBER 21056 OUTSTANDING BALANCE 11.23 LATE CHARGES DUE 1.00 REMAINING PAYMENTS 1 PLEASE SIGN AND RETURN THIS LETTER IN THE ENCLOSED POSTAGE PAID ENVELOPE. IF YOUR RECORDS DO NOT AGREE, ADDITIONALLY PLEASE WRITE IN THE CORRECT DATA. YOUR PROMPT REPLY WILL BE GREATLY APPRECIATED. VERY TRULY YOURS, INTERNAL AUDIT DEPARTMENT ------------------------------------------------------------------- 21056 PLEASE REPLY BELOW -------------------- ----------------------------------------- DATE SIGNATURE COMMENTS -
Printing a Report with Footers
This example produces an Account Gain or Loss report for individual branch offices. A heading, footer, and totals information is printed on each page.
The following code:
IN 80 REC BRANCH 1 2 REC ACCOUNT 3 3 REC NAME 6 18 REC CURR-BAL 63 7 2 DP=2 REC PREV-BAL 70 7 2 DP=2 140 GAIN-LOSS DP=2 14SORT BRANCH ACCOUNT 14OUT 532 UM(CULEMLIN,20) $20 detail lines per page 14410001 '#' $Heading lines 14410007 '* * CONFIDENTIAL * *' 14410038 'ACCOUNT GAIN OR LOSS' 14410072 '* * CONFIDENTIAL * *' 14410270 'BRANCH' 14410279 'ACCOUNT' 14410298 'NAME' 14410319 'BALANCE' 14410331 'PRIOR BALANCE' 14410349 'GAIN/LOSS' 14420001 '1' $Page eject 14420134 '*' $Blank buffer nulled out 14420267 '*' 14420400 '*' 14510006 BRANCH 14510013 ACCOUNT 14510023 NAME 14510049 CURR-BAL F2 14510065 PREV-BAL F2 14510081 GAIN-LOSS SZ=11 F2 14510134 '*' 14510267 '*' 14510400 '*' 14520001 '@' $Footer 14520273 '* * CONFIDENTIAL * *' 14520338 '* * CONFIDENTIAL * *' 14520400 '*' 14610001 '-' 14610008 'TOTALS' 14610049 CURR-BAL F2 14610065 PREV-BAL F2 14610081 GAIN-LOSS SZ=11 F2 14610134 '*' 14610267 '*' 14610400 '*' 14620001 '0' $Spacing 14620008 'GRAND TOTALS' 14620049 CURR-BAL F2 14620065 PREV-BAL F2 14620081 GAIN-LOSS SZ=11 F2 14620134 '*' 14620267 '*' 14620400 '*' 147 CURR-BAL MINUS PREV-BAL GAIN-LOSS 148010 IF LEVL EQ 2 100 148 TAKE 1 148100 TAKE 2 140 GAIN-LOSS DP=2
* * CONFIDENTIAL * * ACCOUNT GAIN OR LOSS * * CONFIDENTIAL * * BRANCH ACCOUNT NAME BALANCE PRIOR BALANCE GAIN/LOSS 15 060 SHARON ARMSTRONG 10,000.00 9,100.54 899.46 21 056 AMOS JOHNSON 11.23 1,000.01 988.78- 29 557 IRWIN TRIMBLE 357.85 200.02 157.83 30 115 IRMA DOONES 9,756.73 340.10 9,416.63 33 470 VICTORIA DAY 50,432.00 560.05 49,871.95 69 876 BRUCE THORPE 203.45 100.01 103.44 99 083 HELEN SANTOVEC 2,857.43 3,450.20 592.77- TOTALS 73,618.69 14,750.93 58,867.76 * * CONFIDENTIAL * * * * CONFIDENTIAL * *
Copyright © 2014 CA.
All rights reserved.
|
|