Waring MBB520 Datasheet Page 59

  • Download
  • Add to my manuals
  • Print
  • Page
    / 89
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 58
Release Notes - New Features included in Release 2.4.0
Page 59 of 89
and a condition in a printing section (HEADER, DETAIL, FOOTER) determines whether the data
is printed – the database access is done in any case, before the condition is checked.
Another difference is that a database access in the LOGIC section creates something that behaves
like a data item read from the original input data file – it may itself be used to trigger further events
– database accesses, printing of fields (which may or may not involve its own data content) etc. A
database access in a printing section merely causes that particular data item to be printed passively.
Multiple column selects (multiple or single rows).
In this case, it is not appropriate to associate the execution of the database access routine with the
event of printing an individual data field. The LOGIC section will indicate when the database
access is to be done. The relevant data fields are then fed in as if they were on the original input
data file. For this reason, it is suggested that they should be passed ‘INTO’ explicitly field names,
which are named such that they won’t exist in the future as real TROPOS data items on the file. e.g.
they could be prefixed by ‘d_’. (Avoid the use of $’s in prefixes – these are reserved for future use –
as in ‘nd$’ – see below.)
e.g.
LOGIC
dbac2=select custname,authlang_cus \
into :d_custname,:d_authlang \
from m/jointfilesconvert/287548/bg110 \
where customer = :customer\
and account15_cus = :account15;
dbac=2 link=customer
HEADER
f.d_custname=4,10
f.d_authlang=5,10
In this case, when ‘customer’ has been read in – and printed (if specified), it triggers database
access 2 to be done, which then acts as if it has read the datanames ‘d_custname’ and ‘d_authlang’
from the data file, with their relevant values. If required, these data items may themselves trigger
other events (printing, database access).
We assume in this case, that ‘account15’ has been read in before ‘customer’, so that when we have
‘customer’ we have everything we need to do the database access.
The database accesses in the LOGIC section may be linked to datanames or start-of-detail ($sd) or
end-of-detail ($ed).
They may not currently be linked to start or end of HEADER or FOOTER.
Nested database access and automatic new-detail generation
The following example shows nested database access, and also spontaneous creation of new
DETAIL sections. (Note – there are no DETAIL sections on the original data file in this example. If
there were, attention should be given to the possible complications of mixing original and new
DETAIL sections.) New DETAIL sections are generated by the arrival of a dataname with the
prefix ‘nd$’.
Page view 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 88 89

Comments to this Manuals

No comments