SATFORM Examples
S@
Home SATGUI SATSHELL SATFORM SATFILTER SATREPORT SATMYSQL License Download Examples Contact

A "Pay increase" letter. The source data for this letter is a colon delimited text file, formatted using an awk script.

This example uses bold/underline/italic attributes. Variable and Predefined data (unmodified and using mixed case conversion). Positioning text. Positioning numbers using right justification.

Sample Output

Example SAT/ML

Assume a file called salary in the $SATHOME/form directory with the following contents:

<body>
<@ 50>Reference:<@ 58>AD001

<@ 50>Date:<@ 58>${DATE}

<@ 50>Tel:<@ 58>555-9876
<indent 10>


%{title} %{firstname} %{lastname}
${houseno} %{street}
%{town}

<size 15><b><u>Pay Increase</u></b><size 12>

Dear %{title} %{lastname},

I am delighted to inform you that your salary will be increased from its current
value of $${oldsalary} to $${newsalary} with effect from 04/01/2001.

A <i>full</i> list of agreed deparmental pay increases is shown below. If you have any
questions concerning your salary, please contact your line manager.

<b><u>Job</u>                     <u>Old Salary</u>  <u>New Salary</u></b>
Sales President<$ 30:110,000><$ 40:121,000>
Sales Manager<$ 30:65,000><$ 40:71,500>
Sales Senoir<$ 30:41,000><$ 40:45,100>
Sales Junior<$ 30:32,000><$ 40:35,200>


Yours,



Frank Stapleton
(Senior Finance Manager)
</body>
Example Variable Data

Assume a file called salary.dat with the following contents:

MR:JOHN:SMITH:12:HIGH STREET:TOWNSVILLE:41,000:45,100
MISS:MARY:JONES:98:LONG ROAD:TOWNSVILLE:65,000:71,500
MR:FRED PETERS:78:GREEN AVENUE:RIVER CITY:32,000:35,200

Example Script to Format Data

Assume the printer to be used is called printer1. The following script will print a "Pay increase" letter for each record in the salary.dat file.

nawk '
{
   print "title\034" $1
   print "firstname\034" $2
   print "lastname\034" $3
   print "houseno\034" $4
   print "street\034" $5
   print "town\034" $6
   print "oldsalary\034" $7
   print "newsalary\034" $8
   print "\f"
}' salray.dat | satform salary | lp -dprinter1 -onobanner

Copyright © 2003 Adrian Davis.