Text preview for : LB21-0772-0g_FDP_QueryFacilityForSystem3_SystemsGuide_5798-ANB.pdf part of IBM LB21-0772-0g FDP QueryFacilityForSystem3 SystemsGuide 5798-ANB IBM system3 LB21-0772-0g_FDP_QueryFacilityForSystem3_SystemsGuide_5798-ANB.pdf
Back to : LB21-0772-0g_FDP_QueryFac | Home
Llcifi rad l,lnt;tlrl - ProportyollBttl
LBfI-}772-0
Field
Query FaGitittt For systeur,/3
Prbgf:eln NUIhber': 1 S?.$8,-A10B
"
Featqre $lirfuber z- B24g ,
Systems 'Gfil-isde
this Pub'errs Manual'r is for the
Systems frSalyst, programmer and
Operator drgring the Systems Test and
(rgrly opeftions of the programs. It
arso coTtai_ns proErammer notes to
assist in making minor alteratd.Ons.
ffitsnf;
PROGRAMMIIIGSERVICES
During a specified numberr of months inmediately following
initial availabilit,y of each licensed program designated as
the Programming. Servicesi Period, and referenced in the Sup-
plenent to Amended Licerrse Agreement for IBM Program Prod,ucts,
the Customer may submit documentatj.on to a designated IBM
locatj.on when he encounters a problem which his diagnosis
indicates is caused by er licensed program error. During this
peri,od only, LBljl througtr the program sponsor (s ) will, with-
out additionaL charge, respond to an error in the current
unaltered release of , ther lieens,ed program by issuing known
error correction. informertion to the Customer reporting the
problern and.,/o:r issuing corrected code or notice cf avail-
abi-lity of corrected. gocLe. However, IBItt does not guaran'"t'ee .' '
service results or repr:sent or warrant that all errors wilL
be cor:rected. Any on*sj.te programrning services or assistance
wilt be provided at a charge.
-Progra_m errgr cor:rection requeSts and/ox comments concerningl
the contents of this publication- should be addressed to:
IBl4 Corporation
8711-2 West Dodge Roaci
Omaha, Nebraska 68114
Ati:n: Mr. Don Larimer
VfARRANTY
EACH ],ICENSED PROGRAIU DISTRTBUTED ON AN 'AS IS' BASTS
IIJ
WITHOUT WARRANTY OF ANY KIND EITIIER EXPRESS OR IMPLIED.
Requests for copies of liBl,I publications should be made to
your IBM Representative or to the IBM Branch Office serving
your locality
Copyright Internat:Lona1 Business Ivlachines Corporation Ig72
,@
L$$l Ir E or q p,J T-g ls f=g
FaInufdirctl,on . .. 1
,
2
Syterr oese{$tioa ? . 2
Fgqgtatming gys&srbs a a . r d . . 2
Syetenconfigry&tjPffi-ffietflg f,.stud,qps . 3
PrpgramA[IBOl; &*flys . . , a . . ! . . . . 3
P"tr$g{arn
AlltsOl, Subrouti,nes, . ], 4
FfogranANBOt, Arrttlrs . r *. t . . . 5
FFggranAt\lBO2,Subroutines. .... .. . f
Mqr*f*fi-eationAids .. t... j. 7
Fage nunbering and Date lda6tifj.c$,i,on ., . ? . I
User Report lieadillqp . . . I
tagsorting . a .. I
X"&SenrEed.
!,tilteriaJ* +- prdXterty of IBM
INTRODUCTION
-
The PurPose of this manual is to provide'supptremental. infor:nation on the
design, logic, and coding of the systern/3 euery Facility. The prosram
Descriqtlon and operations Manual shoul.d remain the.prime information
source for the Facirity, but this systems Guide will be of value in
making ext'ensive modifications and diagnosing unusual error conditions.
atrso in'iluded is a suggested appaoacn ior geierating :'
the facility'o:':
execute on a System/3 Model 6.
Licensed Material -- Property af IBM
SYSTEM O\ERVIEW
The System,/3 Query Facility is a toot that anows the user,
and non-programmer alike to selectively tr)rograrnmer,
-"""""-iisk data files f,o:r prepar-
rng reports or gatheri:ng statistics. 'iy using the functions provided in
four simple commandsand the funct.ions
of the Systen,/3 Disk Sort, the user
can rapidly formulat'e rTueries to the system and receive
responses in tJre
form of printed output without expena:-ng-al*."I"a
effort for writing and
testing prograrns
Systen Descriptiol
g:tr Facrliry is comprised of rwo prosrams written i n R P GI I .
Tn:.:"::.T/t
rnpur t'o the first program is the 'SELECT' and ,soRT' commands.
gram translates This pro-
these statements i-nto control statements that,are
with the Systern,/3 dj.sk sort compatible
Upon processing tbese control statements,
the sort utility then produces
an output file of the r:eco:rds the user.has.selected,
placing then in ttre
defined sequence. This; fire then i""".""-i;il'to
the second n;;n;;;;
the facirity which processes the data and produces a report according
to
the definitions estabu.shed by the 'pRrNT, and ,couNT, 6mnands. r Figure
presents samples of the control statements; 4
Figure 5 illustratls now a
query might be written and the resutting,::cpori.
The commands are desigrred to give a .great deal of function
to the user and
demand little concern for rigid formatting. They are written in a manner
that conveys meaning to xhs writer of a guery, making a reguest simple and
direct, and provides rersults in a minimum of, time.
gqggre!ryring Systems
$rere written and tested under RpG rr (5202-RG1, version
th:.qT"g".rms 5;
Modification l,evet O) f:or the System/3 Model lO (disk). Instructions are
pnovided for adaptation to a System,/3 Model 6. In addition to-the Rpc II
Compiler, the Disk Sort. program (5702-SMI) is required.
Sy?tem Colfiguraqiog
The object programs require 9216 bytes of memory. With a normal size core-
resident system control program (approxirnately 3K bytes) a 12K central
processor is required. The programs will execute on an other:rrrise minimurn
system,z3 Model l0 disk '6'ohfiguration.' "-sulficient disk space should be
available for sort work areas and output areas.
Licensed Material -- property of, fBM
tPRoGRAMMTNG
TEg{NrQr4F
I The purpose of this section is to provide a general overview of ttre program-
ming philosophy r.rsed in creating the Query Facility and to briefly describe
the uses and functions of key fields, arrays, and subroutines. Because of
I the nature of the p.rog-rams and. the generally low reqr:irements for the user
to perform extensive nodi.fication, a "microscopic" perspective will not be
provided.
For both programs, the co:inmand. statements are read into arrays that are com-
prised of l-byte character-formatted elements. These arrays can then be
scanned,, keying on the primary delimiters (blanks, commas, panentheses), to
extract parameters from the control statement,s. This scanning tectlrr{egue.is
necessary because of the freedom of format allowed in statement construc-
tion. when the parameters (e.9. data element nanes and logical operators)
rre isolated in the S.nptrt-array they are stored for .lat.er reference in
operand-oriented arrays that correspond to their function. For example,
each data element'name extracted from the-TSORT' cormand (program AlIB0l)
is placed in the array rFLDr that is later referenced to produce the sort
field-specifications. The output print lines in the program,AIIBO2 are also
arrays in which each print U.ne is constructed byte-by-byte. A close in-
spection of the scanning, data extractionr ?nd output line constructi.on
logic in both programs reveals that the technique is--not r:nlike that which
would.be used in Assembler Language coding. RPG II coding was implemented,
to avoid excLuding therModet 6 user and those l,todel- 1O users that do not-
have assemblers
PROGRAMA$IBOI
4str
TABFLD -- This table contains the portion of the Data Element
Dictionary that is the data element name.
TABPAR -- This table (al.ternates with TaBPAR) contains the renlainder
of the inforrnation for the Data Element Dictionary including:
location of the field i-n the record, format, number of
decimalsr print field size, and heading information.
IN -- Arralz that is the conunand statement input area.
SRT -- The array that the entire rsoRT' cor$nand is moved to (from
'IN') prior to scanning.
SEL -- This array'contains the one or two cards comprising the
TSELECTt statement. Each card, is moved from the input
array 'IN' when it is read.
OPA -- This array contains the 'A' or first operand of each com-
parative Boolean relati-onship, always a data element name.
Licensed Material -- Prope.rty of IBM
Arrays
OPB -- This arr.ay contaj_ns the 'B' or second operand
of each com-
paratj-ve Boolean relationship, either a data element name
or a :Literal field.
80 -* This errray contains the: comparative operator
for each
Booleem relationship (GT, LT, Ee, etc.)
LN -- Thi's errray contains the first 2 characters of the linkage
operator ('AND' or 'OR,) that connects
each pair of com-
parati.ve relationships.
LBF *- This is the array in which literals are constructed prior
to out.put, termed the "literal buffer".
FLD -- This array contains the data erement names
'soRTr extracted from
lh" statement. The last byte contains the
by which that field is to le sortea (N-normal, ""n"""i.
o_aesJeiai"Sl
Subroutines
SCANSR -- scans the array containing the rsoRTr contror staternent
('sRT') extracting-the.data erernent names and the sequence
codes and places them in ttre array ,FLD'.
scAI\rsI,-- array containing the ,SELEqI' control statement
l:?"=-the
('SEL') extracting the. logical operators and operand,s
(within the parentheses) and the link,age op"r"lor" (connect;
ing ttre comparative relationships) ana placing ttrem in the
arrays ropAr, ,OpB,, tg.or, and rLNr.
PARAflXS -- f: from Ure Data Element Dictionary entry
FLDFIL -- calted by the routines 'scAlIsR' and 'sciu{sL,
!o move the
operanri or operator they have encountered into a 2o-byte
field 'BYT2Or left
adjusted.
RCDCRD -- This r'utine takes the operands and operators
'SELEC:r statement (found
! from the
in arrays ,OpA!, ,OpB' , ,BO',
'LN') ;rnd punches
the sort specification"'tt.t
record selection "p".iiy'
SRTCRD-- Takes the fields that are to be sorted from the array 'FLD,
and ancl produces disk sort specification cards.
LITRAT -- This routine analyzes literal fierds found in the array
'OPB' emd performs
the following functions: right- or left_
justifi,cation, decimar alignmeni, and padding for matching
field Lengths, sign extraction.
Licensed Material -- property of IBM
PROGRAMANBO2
Arrays
ArN -- :Array in which the disk record for :the queried file
- is.,
stored for data extraction.
ALN -- print-line ar:ray for detaiL lines
Htlil -- print-line array for heading line
ACN -- hput array fo.r control statements.
TABFLD,/
TABPAR-- See "Arrays"r progrrm AI\IBOI.
FLD -+ Array containing operands {data element names and ntmeric
constants) of the" rplulNfr statement
cNT -- Array contairring the data element names of the 'couMr,
statement.
BF -: Buffer in which numeric fields are assenbled, edited, zero
suppressed, trefore placernent in the print line.
Tor --- Array in whicrh the totars for the 'couNT, fields are
Subroirtings
ANALYZ - scans the fpgltM'qnd'muNT'statements
- in the array
rAol-f and iso,lates trre oper"rras
enio*ri"r.a, fi.Ji"g tr,.t
in ttre arravs ,FLD| or r(l.lTt.
PARAI'IS-: Extracts the definitirre paranetetis for each field to be
printed from the Data El.eeent Dictionary. rf the operand
is-nuneric (for space control) it increments the index f,or
the print line array and returns to tlre calling routine.
BLDLNX -- Creates the detail print line. ( rALNr) and the heading
print line ('HLl{,) .
MA{LMS -- Extracts a zoned-decilnal field from the input disk record
and places it in a 4uneric .field rNM! for later editing.
NIJMRIC-- Edits the nuneric field ,N!.t' and places it in the outpu:t
line.
5 Licensed Material -- property of IBM
Subrouti.nes
%
ttl{PAcx( -- rsolates packed-decimal fields in ttre i4put disk record
and placr=s them in ttre nrmeric field 'NI.i.
ToTolJT -- outtr>uts'Etre total fields for the 'COUt'ttr statenent
after
: it causerr them to be 1 ieeitea.;
- -1
,---l . . . .
.,-1.
6 Licensed Material -- Property of IBM
MODIFICATTONAIDS
The only rnodifications djlscudsed here are those tiat would allow the system
to function on a 12K System/3 Model 6. Any other modificatiens are dis-
cussed, in the Program Der;cription and Operations Manua1. The system has
not been formally tested on a System/3 Model 6 and the followinq informa-
tion is suggested only as a guide to implementation in that environment.
To avoid the errors inhe::ent in keying the source programs using Keyboarcl
source Entry it is more practical to load ttre sourc. frogr"*s in card form
using a Model 6 wittr a d:rta recorder or a Modef IO di;k Jy"t r. when using
a Model I0 to place the s;ource decks in the souree library use the follor.-
ing OCt for each programr
// READER MFCUI
// LoAD $MArlfT, Ff
// RIJN
// COPY PROM-READERi,
TO:RI, LIBRARY-S, RETAIN-P, NAII{E-A$IBXX
CEND
END
The nodif,ications to allow execution on a Model 6 are nainly oriented to
the file Description section of the progrrms. For progr.rm Af.IBOl, the File
Description specifications for the files TSPECSINT and 'SpECSoUrr must be
rsFEcsrNt must be artered in
changed. corunms 40-46 from r!,tFcul, to
r@NsOEEr. rsPEcsouf 'must
be rnodified in columns 40-46 from 'MFCU2' to
'TRActRlr and in columns 22-23
from'95t to '01r. This will cause the
Program to look for input via the console-keyboard and to place the sort
specifications (normally punched into cards on the MFCU) on the printer
file" This reguires that ttre specifications be key,ed into.ttre Disk sort
Frogta$| in Phase II of execution. In acidition, the outp'ut specifications
with r*PRIlllTT ih columns 32-37 must be deleted. Final.llr, place tlie printer
spacing controls i-n sach 'E' and 'T, type output line, a 'f in column lg
of these lines will suffi.ce.
only ttre File Descriptj-on specifications for program ANBO2 should require
change. For,the file ICQNTROL' change col.unns 40-46 from 'MFCUI' to
T C O N S o L E 'f o r t t r e f i l e ' L I S T ' c h a n g e c o l u m n s 4 0 - 4 6
;
to'TRAC-TRI'and col-
urnns 22-23 to 01. The OCL required for execution of the facility is very
compatible betrween Model 6 and Model 10 and therefore no discussion of oCL
wiII be presented.
Licensed Material -- Property of IBI4
/-<
eage,Numberin, end Date fdentification
A potentially varuable modification to make to the Facility is the
addition of page numbering and.
system dai:e to pri-nt on each page of
the rePort. This wourd serve as reference information
the report, info:rmation. to the user of
tfre-toifowing cards shoul_d be keyed and in_
the sQurce,d,eck of program ANBO2
lTtef -in using the statement nr:mber
identifier {eolumns 1-5) to pioperly place these cards in the
deck:
035s40 PAGE Z vb
o35550 IPAGE I
93
o3s560 ?rh r HF rt
UIJJII. Ii I 6tt
035570 D L 2 99N75N59
035580 OR OF
User Report Headings
This modification to AllB02 would allor+ the user to include a heading
card along with the 'Pltrllr' and 'couNT' statements
when executi.ng the
print prograln (Phase rl:r). By creating a card with the characters
**' in colurnns l and ll
, the remaining colr:rnns may contain any identi- -
-
fylns information that the user wishes to appear .t trr. top o'r il;
a
printed output- The following cards ale required in t5e source deck
of ANBO2:
OO2OSICONTROL NS 35 1c* 2c*
00209r 3 96 HEADG
00295c 35 GOTO ENDCAL
035.530 HEADG 96
rf the modification for date and page numbering has not been made,
-
include statements 354?-8 as described in the irevious section.
Tag Sorting
To decrease the time required to sort a larger master file and red.uce
the size of the sort work and output files, the ,'TAG,' sorting technigue
could be implemented to produce an ADDRour file for input to ANBo2.
In program-ANBOl, statement nunber 4OO0 should have the literal changed
to lHsoRrAr, statement number 403o shoutd be changed to output a literal
of '0' in position 27, and statements 4350-4390 should be rernovea.
Licensed Material -- property of IBM
Program ANB02 requires the addition
of a file description specification
for the Reco:rd Address fire, modificaticn of the fire description speci_
fication for the fire 'rNpllr,
to be processed via the nA fire, and
creation of an extension specificatlon
should be added to associate
the RA file with the file ,fl.ilplJT,.
These_modifications may require more than-."u-nr"I";=;;n';;;i!'
a r.2K cpu to function. Addi-
tionat information relatinj to rAG so;ls
ouur"""
can be fou4d in trre iystem,/3 oisk ,soii lii *". rr re,fer..,ence
11.:,
manuals.
Licensed Materj.al -- property of IBM
T,,B2L-0772-0
Cr,o
< d
o o
rfB
o<
3 rll
O
o
oo
g FJ.
H.P
oP.
Oct
K
r{
o
F1
a
r<
ul'
t+
(tr
3
(,
!
F
o
E.
rl
'o
g
a
o
g i
t.
t
E'
rl
p
3
. A ,^.
o
Ird .
Fl
P.
p
ct
o
a,
H:-
p
c r
@
!,
ts
lu
t\)
H
I
(>
{
{
N
I
o
a