LY21 0563 0_Utilities_Program_Product_Logic_Manual_Dec77 0 Utilities Program Product Logic Manual Dec77

LY21-0563-0_Utilities_Program_Product_Logic_Manual_Dec77 manual pdf -FilePursuit

LY21-0563-0_Utilities_Program_Product_Logic_Manual_Dec77 LY21-0563-0_Utilities_Program_Product_Logic_Manual_Dec77

User Manual: LY21-0563-0_Utilities_Program_Product_Logic_Manual_Dec77

Open the PDF directly: View PDF PDF.
Page Count: 191

DownloadLY21-0563-0_Utilities_Program_Product_Logic_Manual_Dec77 LY21-0563-0 Utilities Program Product Logic Manual Dec77
Open PDF In BrowserView PDF
--- - ---------- - - - -9

L Y21 -0563-0
File No. S34-32
Licensed Material
Property of IBM

IBM System/34
Util ities Program Product
Program Logic Manual
Program Number 5726-UTl

I

IBM System/34
Utilities Program Product
Program Logic Manual
Program Number 5726-UT1

Preface
This publication is designed to aid IBM personnel in
supporting the IBM System/34 Utilities Program Product.
The manual is intended to serve as a recall mechanism and
a guide to program listings.
The "How to Use this Manual" section describes the
content and organization of this manual.

RELATED PUBLICATIONS
•

IBM System/34 System Support Reference Manual,
SC21-5155

•

IBM System/34 Data File Utility Reference Manual,
SC21-7656

•

IBM System/34 Source Entry Utility Reference Manual,
SC21-7657

•

IBM System/34 Sort Reference Manual, SC21-7658

•

IBM System/34 Work Station Utility Reference Manual,
SC21-7663

•

IBM System/34 System Data Areas and Diagnostic Aids
Handbook, L Y21-0049

•

IBM System/34 Displayed Messages Guide, SC21-5159

•

IBM System/34 Screen Design Aid Programmer's Guide
and Reference Manual, SC21-7716

First Edition (December 1977)
This edition applies to version 01, modification level 00 of IBM System/34 Utilities
Program Product (Program Number 5726-UT1 ) and to all subsequent versions and
modification levels until otherwise indicated in new editions or technical newsletters.
Changes are periodically made to the information herein; before using this publication,
refer to the latest IBM Systeml34 Bibliography, GH30-0231, for editions that are
applicable and current.
Requests for copies of IBM publications should be made to your IBM representative
or the IBM branch office serving your locality.
A Reader's Comment Form is at the back of this publication. If the form has been
removed, address your comments to IBM Corporation, Publications, Department 245,
Rochester, Minnesota 55901. Comments become the property of IBM.

©Copyright International Business Machines Corporation 1977

Licensed Material-Property of IBM

Contents

1-1
1-1
1-1
1-4
1-6
1-6
1-7
1-16
1-18
1-35
1-36
1-37
1-37
1-38
1-39
1-39
1-41
1-41
1-42
1-43

CHAPTER 1. WORK STATION UTILITY (WSU)
INTRODUCTION
How the Program Works
WSU Design.
Physical Choracteristics .
System Configuration
METHOD OF OPERATION
PROGRAM ORGANIZATION
WSU Execution Logic Flow
Execution Mcdules and Routines
#WSX 11 (WSU I ntial ization Phase, Part 1)
#WSXI2 (WSU Initialization Phose, Part 2)
#WSXP (WSU Execution Processing Phase)
Resident Processor Descriptions
Descriptions of Routines Accessed Via Call and Exit
Routines Resident in #WSXP
#WSXOO Routines
#WSX01 Routines
#WSX02 Routines
#WSX03 Routines
t/WSX04 Routines
#WSX05 Routines
#WSX06 Routines
#WSX07 Routines
#WSX08 Routines
#WSX09 Routines
#WSXlO Routines
#WSX 11 Routines
#WSX 12 Routines
#WSX13 Routines
#WSX14 Routines
#WSX15 Routines
:f:!wSX16 Routines
:f:!wSX17 Routines
#WSX18 Routines
#WSX 19 Routines
Routine Cross-Reference List
External Calls Made by Execution Routines.
DIRECTORY
DATA AREAS
DIAGNOSTIC AIDS
WSU Index

1-45
1-45
1-49
1-50
1-51
1-52
1-53
1-55
1-55
1-55
1-55
1-56
1-56
1-58
1-58
1-59
1-63
1-69
1-72
1-82
1-86
1-89

CHAPTER 2. SCREEN DESIGN AID
INTRODUCTION
How the Program Works
Physical Characteristics.
Load Members
Procedure Members.
Input/Output
I/O Storage Requirements
System Configuration
METHOD OF OPERATION
PROGRAM ORGANIZATION
DIRECTORY
DATA AREAS
Local Communicotions Area
DIAGNOSTIC AIDS
Messages .

2-1
2-1
2-1
2-1
2-1
2-2
2-2
2-2
2-2
2-3
2-12
2-13
2-14
2-14
2-15
2-15

Procedures
SDA Moinline
SDADROP
SDAH
SDALOAD
SDASAVE
SDA1.
SDA2.
SDA#.
SDA5.
SDA6.
SDA7.
SDA8.
SDA9.
SDA Index

2-16
2-16
2-16
2-16
2-16
2-17
2-17
2-17
2-18
2-18
2-18
2-19
2-19
2-19
2-20

CHAPTER 3. DATA FILE UTILITY (DFU)
INTRODUCTION
How the Program Works
Physical Characteristics.
Nonexecutable Load Modules.
Procedures
Input/Output
I/O Storage Requirements
System Configuration
METHOD OF OPERATION
PROGRAM ORGANIZATION
DIRECTORY
DATA AREAS
Job Setup Communications Area (COMMON)
Job Setup Disk Work File (DFUWORKA)
DFU Format Description
Job Execution Communications Area (COMMON)
DIAGNOSTIC AIDS
Messages .
Procedures
Update Procedure
Inquiry Procedure
List Procedure
#oFMP Procedure
#oFST Procedure
DFUDROP Procedure
DFULOAD Procedure
DFUSAVE Procedure

3-1
3-1
3-1
3-1
3-1
3-1
3-1
3-2
3-2
3-3
3-10
3-16
3-18
3-18
3-18
3-18
3-19
3-20
3-21
3-23
3-24
3-24
3-25
3-26
3-26
3-27
3-27
3-27

CHAPTER 4. SOURCE ENTRY UTILITY
INTRODUCTION
Physical Characteristics.
Load Members
Procedure Members.
Source Members.
Expansion Buffers
Input/Output
I/O Storage Requirements
System Configuration
METHOD OF OPERATION
DIRECTORY
DATA AREAS

4-1
4-1
4-1
4-1
4-1
4-2
4-2
4-2
4-2
4-2
4-3
4-11
4-13

iii

Licensed Material-Property of IBM

Communications Area
Work File

4-13
4-13

..

Work File Record
Index Area .
Data Area
DIAGNOSTIC AIDS
Messages .
Main Storage Status For SEU Members
Procedu res
SEU .
SEUDROP
SEULOAD
SEUSA VE

4-13
4-14
4-14
4-15
4-1 5
4-18
4-18
4-18
4-19
4-20
4-20

CHAPTER 5. SORT
INTRODUCTION .
How the Program Works
Physical Characteristics.
Input/Output
I/O Storage Requirements
System Configuration .
METHOD OF OPERATION
PROGRAM ORGANIZATION
DIRECTORY
DATA AREAS .
DIAGNOSTIC AIDS
Messages .
Procedures

5-1
5-1
5-1
5-1
5-1
5-1
5-2
5-3
5-4
5-10
5-14
5-16
5-16
5-18

APPENDIX. ACRONYMS AND ABBREVIATIONS.

A-1

(
iv

Licensed Material-Property of IBM

How to Use this Manual
This manual contains five chapters, one for each portion of
the IBM System/34 Utilities Program Product:
Chapter 1.
Chapter 2.
Chapter 3.
Chapter 4.
Chapter 5.

Work Station Utility
Screen Design Aid Utility
Data File Utility
Source Entry Utility
Sort

The following sections are included within each chapter:
1.

Introduction describes the purpose, function, and
operation of the Utilities Program Product.

2.

Method of Operation describes the functional flow
within the program product.

3.

Program Organization describes module flow and
storage maps within the various programs that
comprise the Utility Program Product.

4.

Directory contains information needed for quick
reference to the program product module listings.

5.

Data Areas describes the usage and location of the
data areas used by the program product.

6.

Diagnostic Aids lists the diagnostic messages issued
by the various modules within the program product
and lists certain applicable program procedure listings.

Additionally, the WSU and SDA chapters contain indexes
to help you locate subjects within the chapter.

Licensed Material-Property of IBM

(

Chapter 1. Work Station Utility (WSU)

Introduction
WSU (the work station utility), a program of the Utilities
Program Product, provides a way to code data entry, data
edit, data correction, and inquiry programs for System/34.
Data entry, edit, and correction programs can be front-end
entry for RPG II programs that do final editing, processing,
updating, and printing (WSU does not provide printed
output).
A WSU program can be used by eight operators at once
(the program is a multiple-requesting-terminal program).
Each program, using input from data entered by operators,
from as many as ten master files (direct or indexed files),
and from results of operations within the program, creates
or maintains one transaction file (a direct, output file).
Also, the program can update master files.

HOW THE PROGRAM WORKS

Figure 1-1 is an overview of how WSU works. WSU generation begins when the WSU procedure command or the WSU
procedure OCl is entered. The procedure command that
begins WSU generation is:
WSU source program name, [library name] , [number of blocks] , [R EPlACE] ,

\
LIST
NOLIST
NOLlSTW
NOLISTS

U

J

source program name: Name of the member that contains
the source program.
library name: Name of the library that contains the
source program.
number of blocks: Number of blocks allocated for a
work file.
REPLACE: Replace existing members with new
members that have the same name as those created during
generation.
LIST: A complete listing is printed for generation.
NOLIS T: Only the WSU generated procedure, job
statistics, and message text are listed.
NOLISTW: The WSU generated procedure, job statistics,
message text, and $SFG R output are listed.
NOLISTS: A complete WSU listing is printed, but no
$SFGR listing is printed.

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-1

WSU Source Program
-~+---

GENERATION

!

Data Dictionary
(RPG II F and I specifications)

~

& . . . '_ _ _

Listing

Procedure (USERPROC)
-~4---Display

Screen Formats (USERFMT)

Object Module (USEROBJ)

D
EXECUTION

I~

D
Figure 1-1. WSU Overview

1-2

Licensed Material-Property of IBM

~

Refer to Chapter 1 of the WSU Reference Manual for a
description of the DCl that begins WSU generation.

When #WSXI1 processing is complete, #WSXI2 is loaded
over #WSXI1 and control is passed to #WSXI2.

During program generation, WSU uses the last 18 bytes of
the display station's local data area for communicating with
$SFGR. Any user data in these 18 bytes will be lost during
generation.

The main functions performed by #WSXI1 are:
•

Allocate and open the transaction file and the master
files.

Output from generation consists of:

•

Build a work file (WORKFI lE).

•

A WSU program (USEROBJ object member). This
object member contains compressed source statements
that are used by WSU execution.

•

Position the initialization parameter block ahead of the
permanent elements.

•

A procedure (USERPROC) t~at calls the WSU program.
This procedure is an M RT procedure. Refer to Chapter 1
of the WSU Reference Manual for a description of the
DCl that begins WSU generation.

•

A format member (USERFMT object member) that
contains as many as 32 display screen formats (one for
each display in the program).

The last function performed by the execution initiator is
to load the WSU execution processor (#WSXP) over
#WSXI2 and pass control to #WSXP.
#WSXP contains permanently resident data areas and code
and completes WSU execution initialization by:
• Securing the IPB
•

•

A listing of:
RPG II F specifications and I specifications in the
data dictionary
WSU source specifications
Generation information (for example, messages)
Source statements for the screen format generator
program ($SFGR)

Formatting the pool area

Execution processing is controlled by #WSXP and the
execution transients. The operation involves processing
data and specification areas prepared by the execution
initiation phase. These areas are located in the main
storage region occupied by #WSXP and in the WSU execution work file (see Figure 1-2).

#WSXI1 and #WSXI2 initialize the execution environment.
The main functions performed by #WSXI1 are:

If additional work station operators call USERPROC, the
system scheduler and execution initiator processing are
bypassed. A work session is started for each associated
work station (unless end of job is pending) until the maximum number of work sessions is active. When the maximum
number of sessions is active, the system support program
prevents additional calls to the execution functio'n until at
least one session sign off.

•

Work session processing is interactive.

Execution processing begins when USERPROC is invoked
by the operator. OCl statements in USERPROC are
processed by the system support program (SSP) scheduler,
and control is passed to the WSU execution initiator
(#WSXI1 and #WSXI2).

Find the input members (USEROBJ, USERFMT, and
USERMSG) specified on the utility control statement
in USERPROC.

•

Read and process USE ROBJ.

•

Format the permanent elements and main storage data
areas.

•

Open the screen format members.

As input is received from a work station, processing of the
associated work session continues until additional input is
requested or the work session is terminated. If there are
no suspended gets the session can be restarted and input
is then accepted from any display station and the cycle
begins again. Input is processed in the order that the input
is received.

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-3

Work station input is received by way of the SSP work
station data management accept input function. Accept
input suspends WSU processing until work station input is
available. Processing continues from the point of suspension
when work station input is again available. When all display
stations have been released, the accept is rejected (N EP) and
the job ends (non-NEP), or the job is suspended until the
procedure is reinvoked. Input from special function keys
(command function keys, Roll Down, or Roll Up) is
handled by the appropriate routine. If input is not from a
special function key, the normal function processor is
dispatched and continues processing data until the interaction is complete.
The processing of each work session may be considered
serially, without regard to other sessions, when considering
the WSU interactive processing cycle. Overall work
session processing logic is defined by WSU. The detailed
program logic is defined by the account programmer; and
the actual processing is under operator control.
For a complete description of WSU's interactive cycle,
refer to WSU Execution Logic Flow in Program
Organization.

Error messages and informational messages are issued by the
WSU execution processor as they are needed. The messages
have the prefix WSU followed by a four digit number
(WSU-QXXX). An explanation of the WSU messages and
the action required is given in Displayed Messages Guide.
The WSU session may be terminated by requesting the menu
display and specifying EW on the menu, or by setting on
the EW or EJ indicator in the WSU program. The last
operator to end a work session ends the WSU program.

WSU DESIGN
In the following explanation of WSU design, letters
through
refer to Figure 1-2.

0

m

#WSXI 1I#WSXI2/#WSXP

iii

Resident Data Areas

II

At any given time, a work session is in one of three WSU
defined modes:

B1 {GENDAT
GENWRK
OSA
RSA
TSA

•

Enter mode

Common Data Area

•

Insert mode

Resident Routines

•

Review mode

Pool Elements
Transient Routines (#WSXOO-#WSX19)
Relocatable Area
Data Buffers

II

In enter mode, records may be logically added to the chain
of transaction file records associated with the work
session. In insert mode, records may be logically inserted
between records in the transaction file chain. In review
mode, records may be updated in the transaction file chain.
A detailed description of enter mode, insert mode, and
review mode is given in the WSU Reference Manual.
The ability of the operator to control execution processing
is dependent, along with programmer definition, on WSU
defined functions. The operator controls execution processing by using the special function keys. A discussion of how
the operator may use the special function keys while in
enter mode, insert mode, or review mode is also given in
the WSU Reference Manual.

m
m

D

Permanent Elements
SDB
WSDTF
FIA
WCA
JDB
MSA
PSA
CSA
DSA
FSA
SSA

Figure '-2. WSU Area Layout Execution

1-4

licensed Material-Property of IBM

The design of WSU execution minimizes storage requirements yet at the same time fully utilizes available region
space and reduces execution time.

Each pool element has a permanent priority and (re)assignable attributes. These attributes determine if the element
may be relocated or deallocated.

All initialization functions are performed by code that is
executed once and then overlaid fa .

Elements are dynamically relocated to consolidate free
space and preserve ordering by priority. Elements are
deallocated only when space is required for a new element
and no lower priority deallocatable elements are in the pool.
Only one element of a particular type (the current one) is
unable to be deallocated at a given time.

Except for a small number of services performed by resident
routines
,post-initialization functions are performed by
transient routines. These routines are packaged in load
modules (#WSXOO-#WSX19) li J1 accessed via call/exit
linkage subroutines, which handle module loading. Since
transients are not loaded at predetermined locations, entry
point addresses must be resolved dynamically. Address
contants for individual routines are in a table at the end
of the module to aid resolution.

Iii

To reduce the frequency of transient loading, many intermodule calls expect no return from the called routine.
Control does not return (even when expected) if an abort
situation is encountered in the called routine. This sequence
of calls cycles at natural breakpoints in a WSU/user interaction: when a session must be interrupted for intervention,
suspended due to data file record contention, or ended.
COMMON (see the Data Areas Handbook for a description
of COMMON
and other data areas
contains,
among other things, 16 work area bytes, the contents of
which are saved outside COMMON in the aSA when a
transient routine is called. aSBs for this purpose are
assigned in order as needed, and also contain linkage information. The work area bytes are restored from the aSB
when the transient routine exits, and the called routine
aSB is released. The aSA contains 10 aSBs, the maximum
call level for a cycle. The aSA is initialized at interaction
cycle restart, completion, or end. COMMON also contains
16 work area bytes that are not restored upon return from
a called routine.

m

1m )

A large relocation work area B1 is also used as a work area
by transient routines. Care must be taken to avoid dependencies on relocation work area integrity across subroutine
calls.
Regardless of the number of user formats defined or work
stations supported, WSU uses only one work station DTF
and screen data buffer.
Frequently-accessed routines and data are permanently
resident in #WSXP B, C, Dill. All other region space is
maintained as a pool of other data areas free and
temporarily-allocated elements
Other data areas are
built as permanent elements at the end of the region
These elements are chained together and have variable sizes.

II.

0 .

m

Data file buffers
are allocated from the storage pool,
with different priorities given to the transaction file buffer,
update-capable master file buffers, and read-only master
file buffers.
Nonresident data other than data file records, and transients
when not pooled, is kept in a work file. At initialization
time, data blocks (message and C-spec) are transferred to
the work file then read into the storage pool when needed.
Since work file CDBs are padded with zeros and MDBs are
blocked three to a sector, CDB and MDB pool elements
are reallocated to delete the padding after being read in.
The work file and pool are also used for data blocks composed of work station level pointers and indicators from
COMMON and from the job data block.
When the operating mode switches from enter to review, a
,copy of the current WDB is saved as an alternate WDB.
The fields and indicators can then be restored when the
operating mode goes back to enter.
Both normal and alternate work station data blocks are
built in the storage pool and placed in the work file only
when space is required for some other element.
The work file is also used for enter and review mode display
save/restore areas for each work station.
Transient modules are loaded as nonrelocatable pool
elements. Priorities of modules and other pool elements
may be altered to achieve improved performance for a
given program, MRTMAX, and region size available for
execution.
Transaction file records contain control information in
trailers that chain the data records associated with each
work session in the proper sequence. The current control
information is kept in COMMON. This information is used
to format a trailer for each transaction file record added or
inserted.

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-5

PHYSICAL CHARACTERISTICS

WSU generation is done by 35 modules. WSU execution is
done by the WSU execution initiation processors (#WSXI1
and #WSXI2), the WSU execution mainline processor
(#WSXP), and 20 WSU execution transients (#WSXOO
through #WSX19). Refer to the Directory for a list of
WSU modules and a brief description of each.

SYSTEM CONFIGURATION

WSU runs on all models of the System/34.

1-6

Licensed Material-Property of IBM

Method of Operation
This section contains twoHIPD diagrams:
•

Diagram 1-1 describes the input, processing, and output
that occurs during WSU generation.

•

Diagram 1-2 describes the input, processing, and output
that occurs during WSU execution initialization.
From SSP

INPUT

•
•

•

wsu

eCl
(see Note)

~OCESSi_---..........

WSU source
program
Data dictionary
(RPG II F and I
specifications)

message
• WSG
member

i1 0 U TPU T

ffilJ Processes WSU control statement, saves

Work file

" generation constants, and prints generator
listing header and first page number.

D Reads source program and data dictionary,
syntax checks and prints source, saves job
definition, and creates work file intermediate text.

D

1Elo'ZI_Ei:Dil:1m.'qI

•

<==>

Reads intermediate text to build relation
tables and updates intermediate text with
relational data and preassigned encoded
values. Prints indicator, MIC, and field
name usage maps, and extended diagnostics,
and field name usage error lists. Saves program statistics and derived values used to
determine object program layout and
compute execution region size requirements.

Intermediate text

o Relational tables
or preformatted
object

Library member

I'D Determines and saves object program
layout.

tmJ Formats work file object program, then
copies preformatted object program
sectors to new member.

Km Formats and writes WSDM specifications
(SFGR source) to new member.

G

WSU object

$SFGR source
.."> • Execution eCl

•

(see Note)

EiJ Computes execution region size requirements. Prints execution region map,
region space diagnostics, and execution
work file map. Formats and writes execution procedure statements to new
member, and prints generated eCL.

D Prints diagnostics and termination/comple-

Listing

tion message.

To SSP

Note: Chapter 1 of the WSU Reference Manual describes the DCl that is contained in:

•

The procedure that begins WSU "generation

•

The procedure (execution DCl) created by WSU generation

Diagram 1-1 (Part 1 of 6). WSU Generation
Work Station Utility (WSU)

Licensed Material:..:..Property of IBM

'-7

MODULE/
ROUTINE

OEseR IPTION

D

Utility control statements are read and processed. The blocks parameter is used to open and allocate the
work file.
The LlBNAME and MEMNAME parameters are used to find the source program.
The system date, generator processor level, screen size, and user (source program) library name are saved in
the generator common data area as generation constants.
The printer is allocated and opened and a heading and page number are printed to start the listing.

lfl Source program and data dictionary specifications are read and processed sequentially.
Comments are printed and ignored.
Unrecognized specifications (invalid form type, J after first specification, or T or M after first S, D, or C
specification) are printed with an error note number and ignored.
Recognized specifications are printed with statement numbers (except for F, out-of-sequence I, D continuation, C continuation, or C PRTY specifications), thon syntax checked and converted to intermediate text
records and/or generator common data.

#WSGO
#WSG1
#WSG2
#WSG3A
#WSG3B
#WSG4A
#WSG4B
#WSG4C
#WSG4D'

Syntax checking involves testing for valid specification sequence, fields required blank/nonblank, and field
content (for example data type and ranges), as well as for conflicts with other enteries on the same specification or information saved about previously processed source.
Library and member entries on T and M specifications are used to locate the data dictionary source.
All specifications in the indicated library member are ignored except for properly sequenced F and recordtype I specifications with matching filenames and associated AND/OR and field type I specifications.
These data dictionary specifications are read, printed, and processed following the corresponding T or M
specification. Intermediate text records are formatted and information is saved in the common data area
as syntax checking progresses.
This information includes the job definition (J specification entries and T and M specification file names)
and any data required to implement syntax checks involving previously processed source. Defaults are
provided where appropriate to allow generation, or at least syntax checking, to complete.
I ntermediate text re':ords reflecting errors so severe that extended relational checking for the record fields
cannot be done are flagged as dropped.
S intermediate text records are formed to provide process segments for special processing levels not
represented in the source program.
C tag records are formed to provide linkages between process segments and associated command groups.
Any syntax errors encountered are printed in a list of note numbers following the specification to which
they apply.
The intermediate text records are placed in the generator work file. If source program end-of-file is
encountered when unexpected (program contains comme.nts only, no T, M, S, D or C after first specification; no.S, D, or C after last T or M specification), steps 3, 4,5, and 6 are bypassed and the generation
abnormally ends.

II Multiple passes are made through the intermediate text records for the purpose of collecting relational
information required to assign internal values to defined and/or referenced program elements, complete
program validation, and make appropriate defaults.
Intermediate text records reflecting errors so severe that additional relational checking for the record
fields cannot be done are flagged as dropped.

(
\.

Diagram 1-1 (Part 2 of 6). WSU Generation
1-8

Licensed Material-Property of IBM

MODULE!
ROUTINE

OEseR IPTION

In addition, statistics about the WSU source are collected and object program and execution region size and
work file space requirements for individual control blocks/areas (file names, record types) are computed.

#WSG5

First pass: File names and record identifying indicators are collected in in-core tables and assigned relative

numbers according to the order in which they are encountered in the source program.
Next 2 passes: Generator common data area fields and T, S, and C records referencing these names or

indicators are updated to contain the assigned relative numbers, which can be used to develop interblock
pointers in the generated object.
Format identifiers are converted to relative processing levels. Information about C record references to file
name is saved in the file table and used in the next pass to update T and M records to reflect file usage.
During these passes, additional syntax checking is done to detect relational errors involving the usage of file
names and record identifying indicators, the definition of screen input/output fields, and other miscellaneous
syntax errors.
An extended diagnostics list of error note numbers cross-referenced to statement numbers is printed if any
of these errors is encountered, and the appropriate defaults are made.
(Format identifiers, format names)

#WSG6

First pass: Format names are collected in an in-main storage table and assigned relative numbers according

to the order in which they are entered in the source program.
Next 2 passes: C records referencing these names are updated to contain the assigned relative numbers,

which can be used to develop interblock pointers in the generated object. During these passes, additional
syntax checking is performed to detect relational errors involving the usage of format identifiers and format
names, as well as miscellaneous processing sequence syntax errors.
An extended diagnostics list or error note numbers cross-referenced to statement numbers is printed under
translatable headings if any of these errors is encountered, and the appropriate defaults are made.
(Indicators)

#WSGAI

Next pass: Indicator references in all intermediate text records are replaced with mask/displacement

equivalents, which act as locators in the generated object.
The table of indicators used in the conversion is also used to save information about intermediate text
record references to individual indicators.
Upon completion of this pass, indicator usage maps are printed. Indicators set and tested are packed into
lines in indicator table order and printed. Indicators set but not tested are packed into lines in indicator
table order and printed. Indicators tested but not set are packed into lines in indicator order and printed.
(Message texts and message identification codes)

#WSGAM

Next 2 passes: Relative numbers are assigned to literal messages in the order in which they are encountered

in C records.
Once the total number of literal messages is known, another intermediate text updating pass is made to
assign the next available relative message numbers to MIC messages in the order in which they are first
referenced in the program.
The assigned relative numbers are used to develop interblock pointers in the generated object.
A table of binary MIC equivalents is built to handle duplicate references, which must be assigned the same
relative message number. The MIC table is placed in the workfile after the intermediate text if it cannot
be accommodated in main storage.

Diagram 1-1 (Part 3 of 6). WSU Generation
Work Station Utility (WSU)

Licensed Material-Property of IBM

1-9

MODULE/
ROUTINE

OEseR IPTION

Multiple MIC table passes:
The table must be scanned each time a MIC is encountered.
Additional MIC table pass:
Upon completion of this pass, a MIC usage map is printed. Referenced codes are packed in lines in MIC
table order and printed.
(Data field and program label names)

#WSGBF

Next pass: The next pass through the intermediate text results in the building of a field name table from

field data blocks embedded in the intermediate text. Each data field name or label used in the program is
represented by an entry in the table. The first definition of a field name overrides any subsequently
encountered definitions and is saved in the appropriate table entry.
The intermediate text field data blocks are updated with the appropriate field name table indices.
The field name table is placed in the work file after the intermediate text if it c~nnot fit in storage.
Multiple field name table passes:
The table must be scanned each time a field data block is encountered.
Additional field name table pass:
Relative field numbers and JDB or WDB displacements are assigned in table order, ignoring labels ad
unreferenced or undefined field names, and saved in the corresponding table entries. The assigned relative
numbers are used to develop interblock pointers in the generated object.

#WSGAF

Information concerning the presence or absence of field name definition/reference errors is saved in the
common data area to trigger subsequent listing sections.
Three additional field name table passes:
Field name usage maps are printed, each under translatable headings, for work session level data fields, job
level data fields, and program labels.
Each name is cross-referenced to the statement number of the specification in which it was defined and
listed with its defined length, decimal positions, and assigned data block location (data fields), or with its
defined type (program labels).
Next pass: Commands are built from C records and blocking algorithms are applied to anticipate the.

#WSGAL

location of program labels. These assignments are saved in the field name table.
The relative numbers and offsets are used to develop interblock and intrablock pointers in the generated
object.
Next pass: Concurrent multiple direct access to field name table ...

#WSGRF

Field name definitions and assignments are copied from the corresponding field name table entries to the
field data blocks imbedded in the intermediate text.
(MIC format field lengths)
Next 2 passes: Tables are built from Sand D records for the purpose of computing screen field lengths

for MIC message texts.
The computed field lengths, combined with specified screen locations for MIC message texts, are used to
assign MIC message text lengths. The lengths are checked for WSDM compatibility and defaulted if necessary.
Diagram 1-1 (Part 4 of 6). WSU Generation
1-10

Licensed Material-Property of IBM

#WSGML

MODULE/
ROUTINE

DESCRIPTION

The corresponding D records are updated with the assigned lengths in a separate pass.
Any errors encountered are listed as note numbers cross-referenced to the statement numbers of the
specifications to which they apply.

(Operation codes)

#WSG8

Next pass: Any defined but unreferenced field names are listed, cross-referenced to the statement numbers
of the specifications in which they were defined.

Next pass: Any multiply-defined field names are listed, cross-referenced to the statement numbers of the
specifications in which they were defined or referenced.
Next pass: Any referenced but undefined field names are listed, cross-referenced to the statement numbers
of the specifications in which they were referenced.

Next pass: Syntax checks and final command code assignments dependent upon the resolution of embedded
field data blocks are performed and appropriate defaults made.
Any errors encountered are listed as note numbers, cross-referenced to the statement numbers of the
specifications to which they apply.
If any terminal diagnostic note numbers have been listed, steps 4 through 7 are bypassed.

#WSGFO

II Program statistics and derived values saved in the common data area and encoded intermediate text records
are used to anticipate the object program layout.
Individual specification block area displacements are saved for use in converting relative numbers to block
locators in generated code. Total specification and data area size requirements are saved for the object
control header and used to assign relative sector addresses for the object areas.
The specification and data area relative sector addresses are also saved for the control header.

II Multiple passes are made through the intermediate text records to format specification and data areas and
place them in the work file after the intermediate text.
Also referenced for formatting purposes are common data area fields initialized in preceding steps and the
tables .of specification block displacements.
The formatting buffer used occupies the space between the end of the executing module and the start of the
intermediate text buffer used. Formatting is done in place at the end of the buffered object stream, except
for individual commands, which must be prebuilt in a separate formatting buffer before being blocked at the
stream end. Additional statistics are collected during these formatting passes. The control header is built
last from generation contants, the job definition, statistics and derived values, and object layout data. Once
built, it is placed in the first relative work file object sector. WSDM module $MAPGS is loaded after the
executing WSU processor and all space to the end of the region made available for buffering. Preformatted
object program sectors are retrieved from the work file to the assigned buffer and put (via a call to $MAPGS
each time the buffer is filled or after all object sectors have been buffered) into a new object member il'! the
specified or defaulted library.

m

WSDM module $MAPUR is loaded after the executing WSU processor and all space to the start of intermediate
text buffers made available for $SFGR source buffering.

#WSGFS
#WSGDS
#WSGCS
#WSGMS
#WSGPS
#WSGSS
#WSGMD
#WSGCD
#WSGEH
#WSGOM

#WSG9

$SFGR source specifications are formatted from intermediate text and nontranslatable character constants
and put (via a call to $MAPUR for each statement) into a new source member in the specified or defaulted
library.

Diagram 1·1 (Part 5 of 6). WSU Generation
Work Station Utility (WSU)

Licensed Material-Property of IBM

1-11

MODULE/
ROUTINE

OEseR IPTION

o

Data saved for the object control header is used to compute the minimum and maximum execution.region
and work file space requirements for the specified maximum number of work stations to be supported.

#WSGBP

The derived values are used to format and print summaries of execution region size and work file space
minimum and maximum requirements, showing in each case, the increment required for each work station,
the number of work stations assumed, and the basic and total requirements (bytes or sectors), as well as
rounded space requirements (2K or blocks!.
A diagnostic is printed if the specified maximum region size is under the computed minimum.
A diagnostic is printed if the computed maximum exceeds 64K.
$MAPUR is loaded after the executing WSU processor and all space to the end of the region made available
for buffering. Execution procedure statements are formatted from control header or derived data and nontranslatable character constants and put (via a call to $MAPUR for each statement) into a new procedure
member in the specified or defaulted library.
Each OCl statement is printed as it is generated.

m

Listing of diagnostic texts is attempted even if the WSU generation is aborting, provided any error note
number was previously printed, and provided any abort originated before this step. A heading and subheading are printed for each page required, the first pair being printed on a new page if the old page was
filled over 5 lines from the bottom. (The same scheme applies to all listing sections with multiple headers.)
Error table bits are checked in numeric sequence (from 0 to 511). For each bit on, the corresponding
WSU message member entry is used to format and print a list line containing the error note number, the
severity of the error, and the diagnostic text.
The appropriate translatable completion or abort message is printed. If WSU generation is aborting, the
M IC selected by the aborting processor or subroutine is routed to console and logged. If WSU generation is completing with one or more terminal errors, the completion with terminal error(s) MIC is routed
to the console and logged.
Any library members created before abnormal termination are expected to be deleted automatically by the
system control program. Otherwise, control is returned normally to the SCPo

Diagram 1-1 (Part 6 of 6). WSU Generation

1-12

Licensed. Material-Property of IBM

#WSGMT

From: Initiator Mainline
(#CIML)

INPUT _ _a..~~

~OCESS

II Finds input members.
D Reads user defined specifications.
ilJ Formats permanent elements.

WSU Region
Execution
Initialization
#WSXI1 or
#WSXI2

o
G

f--o- _ _ _ _

IPB

------Permanent
Elements

•

Message member
(#WS#X)

•

Format member
(#WS@X)

G

User object
member (USEROBJ) ,

OUTPUT

<:=::::::>

•

----n

Initialization
parameter block

Opens screen format members.

•

Loads and passes control to WSU initialization program-phase 2.

• WORKFILE

Permanent
elements

mi Allocates and opens transaction file and
master files.

o

Builds WORKFILE.

iii Loads and passes control to WSU execution
process mainline.

., User format
member
f)

User message
member

To: WSU Execution Process
Mainline (#WSXP)
Diagram 1-2 (Part 1 of 3). WSU Execution Initialization (.:#wSXI1 and .:#wSXI2)

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-13

MODULE/
ROUTINE

DESCR IPTION

D.

Finds WSU message member.

#MASFN

If message member not found, issue abort via SYSLOG.

#WSXI1

Overlay prog-1 message member in job control block (JCB).

•
•
•
•
•
B

0

•
•

g.

Reads utility control statements.

#CLSS

Finds user object member (USEROBJI.

#MASFN

Puts USEROBJ address in lOS table.

#WSXI1

Finds user message member.

#MASFN

Puts format and relative address of user message member in JCB.

#WSXI1

Uses information retrieval transient to get region, NEP attribute and MRTMAX value.
Reads USEROBJ control sector from disk.

Disk lOS

Calculates required region size.

#WSXI1

Sets up and loads screen specification area (SSA).

• Sets up and loads file specification area (FSA).
• Loads data specification area (OSA).
• Loads C-spec specification area (CSA).
• Sets up and loads process specification area (PSA).
• Calculates WSU message specification area (MSA) size and set to X'QQ'.
• Loads message specification area (MSA).
• Creates job data block (JOB) and WS data block (WOB) work areas.
• Creates work station control area (WCA).
• required, creates master track index area and format index area.
D. If no user format library name specified, inserts WSU format library name in OTF.
• Allocates user/WSU format member.
• Opens format member.
• Builds screen data block (SOB).
If

g.
•

#WSXI1

#CAML
#OMOP
#WSXI1

Finds #WSXI2.

#MASFN

Load and pass control to =#vvSXI2.

#WSXI1

Diagram 1-2 (Part 2 of 3). WSU Execution Initialization (.:fJWSXI1 and .:fJWSXI2)

1-14

Licensed Material-Property of IBM

MODULE!
ROUTINE

OEseR IPTION

Ii •

Moves lOB build area address into the DTF in the file specification block (FSB).

#WSXI2

• Allocates transaction or master file.
• For a transaction file, does deallocate and special allocate functions.
• Opens file.
• Updates FSB and copies lOBs.
IJ • Calculates WORKFI LE size.
e

#CAML
#WSXI2
#DMDP
#WSXI2

Allocates WORKFILE as scratch file.

#CAS1

• Opens WORKFILE (duml'!lY open).
• Retrieves USEROBJ literal messages and places in WORKFILE.
• Retrieves messages from user message member and places in WORKFI LE.
• Retrieves messages from WSU execution message member and places in WORKFILE.
C-spec:
• -Processes
Reads from USEROBJ.
-

#DMOP
Disk lOS
#MGRET

#WSXI2
Disk lOS
#WSXI2
Disk lOS

Updates CSA, CSB, DSA, and CSP.

- Writes C-spec to WOR KF I LE.
Initializes work session control block (WCB) normal and alternate WDB pointers and enter and review
screen save area pointer.

#WSXI2

Initializes WDB key entries with keyfield length-1 from DTFs for update-capable fields.

iii •

Positions IPB ahead of permanent elements.

•

Finds #WSXP.

#MASFN

0

Loads and passes control to #WSXP startup routine.

#WSXI2

Diagram 1-2 ( Part 3 of 3). WSU Execution Initialization (#,NSXI1 and #,NSXI2)

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-15

Program Organization
This section contains:
•

Generation logic flow figure

•

Execution logic flow figure

•

Execution modules and routines descriptions

•

Execution routines cross reference list

•

Execution routines external calls list

1-16

Licensed Material-Property of IBM

WSU Generation Logic Flow
Figure 1-3 shows the generation logic flow.

From SSP

!

Common
Initialization

Post-Syntax
Initialization

File Specification
Area Build

J Specification
Syntax Checking

File, Record Type,
and Processing
Level Assignment

Data Specification
Area Build

T,M,F,andl
Syntax Checking

Format Assignment

Command
Specification
Area Build

S Specification
Syntax Checking

Indicator
Assignment

Message
Specification
Area Build

D Specification
Syntax Checking

Message
Assignment

Process
Specification
Area Build

EOF

Field Name Table
Build

Screen
Specification
Area Build

C Specification
Syntax Checking

Data Field
Assignment

Message Data
Area Build

Program Label
Assignment

Command Data
Area Build

To 3A if next
specification is a
C specification.

Field Data Block
Resolution

Control Header
Build

To 4A if more
C specifications
for the display or
if EOF is reached.

Message Length
Assignment

Object Program
Member Generate

Operation Code
Assignment

SFGR Source
Member Generate

Post-Assign
Initialization

Execution
Procedure
Member Generate

Object Program
Formatting

Diagnostic Text
List

Source

Note: All phase names begin with #WSG. For example, 0 represents #WSGO.

To SSP

Figure 1-3. WSU Generation Module Flow

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-17

WSU EXECUTION LOGIC FLOW
Work session processing occurs interactively under control
of the cycle driver routine (DR IVER in #WSX10). Part 1
of Figure 1-4 shows the logic flow between work stations
using a WSU program. Parts 2 through 9 of this figure show
the logic flow for an individual work station.

Note: Explanations of routines that are specified in
Figure 1-4 can be found following the figure (Execution
Modules and Routines).

1-18

Licensed Material-Property of IBM

DR [VER

·......A2..........
. ..
..... Al .•..........

SEE NOTE 3

•

INTCMP

·. ···r:::~----. · ·. ·r··. .

·

..

. . . .r······ . . . .

•••••• Cl ...........

..

•

•

V SEE NOTE:L
~IDBPUT
V
..... 02..........
• .... 03..........
SEE NOTE 4
•
• •
SAVE WORK.
. . . . 04 •••••••••
•
• • STATION L E V E l . .
•
•
F I HDS AND.
•
INTEND
• ACCEPT INPUT •
•
• • INDICATOI!.S·
•

"""
•
•
•

START.

GET NEW WCIl

.1

.<--------..
•

YES..

•

•

•*

C2···..

*.

NEW..
SESSIOII
••
••
••

*..*

·······r······
•... 01.........

:.... 02 .........:

•

•

.*

.
...............
·i:~:::::----------J

C3··· ••

*.

NO..
CAN A
••
----- •• HSSION BE
••
·.COIITINUED.·

*..*

'. r-------------------::i.;"

··................
...
......................
START SESSIOfi •

START ON
PART 2

FIIiD wCO

•

"""·····E2····I..····
•
•
•
•

:;ET WORK
•
STATION LEVEL.
FIELDS AIID
•
INDICATORS
•

·..................

1m""
·...............
. ,
• •••• FZ ••••••••••

•

RETURN

•

Notes:
1. Work station input is received via the SSP work station data management accept input function. Accept input
suspends WSU processing (produces a wait state) until work station input is available.
2. Return to the point in the cycle at which the wait occurred.
3. INTCMP is branched to each time a wait occurs.
4. INTEN D is branched to each time a work session ends.
Figure 1-4 (Part 1 of 9). Work Station Logic Flow

Work Station Utility (WSU)

Licen~ed

Material-Property of IBM

1-19

.....
A2··········*
*

CLRJDB

··...Al·········.
·
•

.

START

*IN IT I ALI lE ALL ..
--)*
F I ELOS
*

•

*
*
•*** ••••••••••••••..

rIH_S_E_SS---·-*-··-·_·r . . • . .

•*

Bl

...

••

'>on. '''"'

·........1".......
·•••••cz·.·•••••••.
*GET JOB CONTROL*
•
RECORO
•

*. *•• *.*

"""" i'"

: •••• Cl ••••••••• :

. . . ·1. . ·.
······01··········.
. . ·. 1. . ·.
• INITIALIZE WORK.
• STATIOr. LEVEL.
•
FIELOS
•

·

*
GET WORK
•
.SESSION CONTROL.
:
RECORO
:

.

...----·-·-·*-·-·-·r· . . .. .

··.···.02............
.................

..
GET WORK
•
• SESSION CONTROL.
:
RECORD:

-----*

SELECT IJ

.....El..........
•
:

8~:~~

:

~~;~~

•••••••••
,........

06-U····
Ob-K7·0C'3.
Db-E3 . . ••
Ob-H3

Ob-K3

.•

•.•. •• •• .•.•

YES
•• ---,

•••• I

• NO

*003.
• C 1 .-)

.•.v

I

V
••••
.003
• 81

*•
•

HI·•

•*
•*

*. •• YES
ENTER
•••••• MOOE ••• * ••
*••
*
v
.. NO
••••

---1

,

MSr.fISU

OI~~e~YT~SITH

•

1m
···
* ..::;2·····.····•
·
.
,"H

*. *.

•• PROCESSING

••••• *

•

--------> • A REQUIRED'.
MESSAGE IF
.**** ••••••••••••

I

.•.v *.

_ _ _ _- . ,

1 MSGI-ISU
V
••• F2 ••••••••••••

-V
•••

Gl

...
.1

PUTS

Fl..

••••

•

(----------

8~:~:
P~O~~~SIN~· •• NO
Ob-H5..
OR liO
••
08-K3 •• DISPLAY..
OB-C5
••
••
O~-G2
•• ••
09-B4
• YES
09-0;····
·001·
: 04*.-)

•*.*

*003.
G2.

1_
I

g~:E~: G; •• -)

•

OJ-FJ
03-G4

•
:

SELECT IW

:

j

: ........ 6 2 •••~*""*,.,..*.,..,*.""*""':---'

*•

•• PREY IOUS •• NO
••
SESSION
•• ----•• ACT IVE ••

V

:

wAIT

:

········r··..·..
DRIVER ~
H2· ' ••

.* .* SPECIAL *•*.

••

FUNC TI ON

-.

...

**.••.** ••

YES
• --------,
V

* ••••

I .. .......

- NO

:~16

....

->:

: ···~!~g1:~:**\
... c~~~~m :

"El
.. "-

*007-

GI :

··. ·T. ····

•••
Kl
*.
•••• ES, EW
•• OR EJ O~

SEE NOTE

• •••• KZ ••••••••••

*. *. N O :
•• --------).
*. * . . * .*
....

•. i·~ES

.....
v

.

• ~06.
• •A.1."

WA IT

:
•

....

········r·······
.....
V

.

.001 •
...

01-

Note: Control is given to INTCMP (on Part 1 of this
figure) to determine if processing can occur for another
session.
Figure 1·4 (Part 2 of 9). Work Station Logic Flow

1-20

Licensed Material-Property of IBM

Olo-K3

04-1(4
04-A5

2~;~~

·002·

•.G!.

i<----------~
v

: •••• 61 ••••••••• :

·· . ·. T....·..
...
•
•

SELECT NEXT
CALCULATION

•
•

Cl
••
•• END OF ••
YES ••
C
••
-- •• SPECIFICA- ••
TlONS ••••

I

•.•.

*••
• NO

I

V
•••••
·002·
•• H~ •

.

.•.
V

01

•*

••

*.

.......

••
•• NO
•• CONOI TI ONS •• --••
HET
••

i

*. *•• t .-

•• • *

El

.•.

.009.
• C3·

YES

••

.•.r

PUTS
OPERATION

••

f.

* . . * .*

i

t ••

YES.
•
•• ---->. E4 •

V

• ••••

. : . OPE~l¥JON .:.!:~
••
••
••••
••• ·~O

_____

•

*.

FZ..........

• ••••

CZ..........

•••• IHSG •••• YES
:1~~Idta~!Fb~~ :
••
OPERATION •• -------->.SET TO OISPL,\Y •
••
••
•
I HSG
•

*•••
. .·~O*

•

........

•.~ ..

I

.002.
.. F2*
• •

V

.*

Hi

••

*.

••
GET
•• YES
•• OPERATION •• -------~

*.

*. *. . •••

..

..

•*.

Flo

•

••

•

• 81 •
•

*.

•• PREPROCESS

*. *•• - .-

• •••

•

*.•• -----------------~
NO
.-

rES

.002.
• FZ·
•

•••

I
.~U

•••

.•.•G:

••

V

r·::~::~·~::··· =..

AHE •••••• NO
0 I SPLAY
•• -------->.

*. f . . * .*
··i·~ES

.....
V

.

• 002.
• FZ.
•

•

••

01 SPLAY

........

•

j........•

.....
V

.

.OOZ.
• Fl •
t ...

V

.t

:bbt:

rO

.•.

j.••••••.•

j.••.••••
•• ~.•

V

.*

i

•••••••••••••

I

•••.• F3 ••.•••••.•

•
.PREPARE TO RETN.
>:SETS~~C?~lEgET :-------->: cAlgum'No :
• INDICATORS ON •
•
PREPARE TO
•
•
• • 01 SPLAY HSG •
•••••••••••••••••
• •••••••

I

• -.

:~::.~:: •••••

• YES

Fl .•. *.

Gl

•••••

*•• *

NO

••••

V
•••

NO

•••• ~~Y60AR~ ••••• --------> •••• 01S:kN, INO

.••••
..

*

PUTS

..·/:ESE~· ••••

*. ••

*.~2.*

V

•*

Jl

••

*.

*. YES
•• -------~
*. * . . * .*
V
•••••

••
PUT
•• OPERATIUN

i

•• ••

.:!.

.005*

NO

•

·····KI··········
V

•
EXECUTe THE
• CALCULATION,

:SElcl~~bY~le~S

•
•
:

........ j••••••••

··.........
~

• 61 •

Figure 1-4 (Part 3 of 9). Work Station Logic Flow

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-21

.....
• 003 •
.. • Hl...

r

•••

MSGWSU

.• ·r~~fi~~~;~· •.

i

•• ANOTHER WORK
••• ~:~S~~~...
NO

SEE NOTE L

..\

NRtlLFN

.····:~iHv~:
r·::~;·::~::"·:
r:::~~:~:·~::~·:
•• -------->*
SUSPENDED" .------->.
RECORD IS
.-------->. GET IS NtXT •
YES

:

• ••• :!H~Ud:~l

AVAILABLE:
.................

:
OPERATION
:
• . . . . .: ] : : . . . . . .

• 003.

V

.* 82

•••

• B1·

*. *.

•....

•• INDICATOR •• YES
•• SPECIF lED ON •• -----------------,
C SPEC ...

*.

*. *•. *.*

C2

f'

1---------->

V
• •••• C3 . . . . . . . . . .

••

••••
•• INDICATOR •• YES
•• SPECIFIED ON •• ----•• T OR M ••
·.SPEC ••

• SET SPECIFIED •
• INDICATOR TO •
• THE NOT-FOUND •
•
INDICATOR
•
•
•

"r'
·······T··..···
•••••02.............••.•.03 ..•••.....
..

•

:

INDICATE NO

•

~~~I~~¥~~:

•

..

SET OFF

•

~2~,~~¥~R

:

:

........[::::._----_:::::::j........
V

••••• E3 ••••••••••
•
SET OFF All •
RECORD TYPE •
•
• INDICATORS FOR.

········T·······.
•

THE FILE

•

··
..
·······T·······
: •••• F3 ••••••••• :

• GET THE RECORD •

G3

••
••

.•.

••

•*RECORD *. ••

*. *.

FOUND

i

.*
*•• *.*

NO
•• -----------------,

YES

113

••
••

•*

*. *.

.•.

••

VALID
TYPE

i

*. ••

.*
* •• *.*

••

NO

---------------->

YES

.•.

ABORT

V

V

J4

: •••• J3 ••••••••• :

•*

••

: •••• Js ••••••••• :

*.

········T..·····.

••
NOT
•• NO
••
FOUND
••
•• INDICATOR..

V
: •••• K3 ••••••••• :

••••• K4..........

• SET THE RECORD •
:TYPE INDICATOR:

Y END
-------->..ABNORMAll
SESS ION
•

'1:"

*..*

.

.

·003·

•• B1·

•

..

·······T·······
.

·········1········. ..········r········..
.....
.....
.EXTRACT F I HOS •
:
FROM BUFFER :

..

• SET NOT-FOUND •
:
INDICATOR:

.·.·KS*········
v

•
:

SEE NnTE

...............
END OF
•
WORK SESSION :

.003*

•.81·
..

Notes:
1. Control is given to INTCMP (on Part 1 of this figure)
to determine if processing can occur for another
session.
2. Processing begins at INTEND on Part 1 of this figure.
Figure 1-4 (Part 4 of 9). Work Station Logic Flow
1-22

Licensed Material-Property of IBM

.....

DRPUT

..

·00) •

• Jl·

Bl
.*•*

.•.r *•

e.

*.

NO
--- ••• !RA~it~TlO~ •••

*. *•• t .i YES

Cl

••

••••

.•.

*.

.•.

*. ••

01

.-.

*...
* •• *

YES

i YES

'f"

*..*

.*

El

••

:

PREPARE T O :

:u~g¢Hwc~~~E~J

•

• •••• EZ..........

*.

•

:\E/l~iNGEO·:.~~------>:PLAC~uH~kOS
••

:

· · ·. ·1=
•

*..* ••

••

03

.t. ••

Olt

'f"
MODE

*..*

• ••••

••

••

'E'.r...........

• •••• 05· .... • .. ••

•••• HEADER

•••• --------> •••• RECORD

• . . . . E3..........

••

.•. ••

*. *. YES
:ABNORMAlLY END:
•••• -------->: THE SESSION :
*..*
•
•

•••• ENTER •••• NO

•.•.

IN:
:!~PM~AHR~En:
• • END OF fILE •

·······r::::···.

'-'--~f"

Ev
ABORT

• •••• 02..........

o;Ek:~lo" *1*.

*.

**.••.**

Y

••

--- ••• ~UCC~~~FUL ••••

•

.*

i

**.••.t *

-P-U-T------->i NO

NO ••

.e.

C2
••
C)
••
.t
*. •• NO
BLANK
YES
•• REVIEW
.* RECORD IN •• NO
A~O~ c~~gt.· .-------->.... MODE
• * .*-------->.... ~~~i N •••• -------------------------------------------~

•*

•

.................

····ES· ••••••••

V SEE NOTE

•

:
~~~~~~EN~e:
.RECORD IN fiLE.

••

········Vr······

~·····r······
:
•

END OF
:
\-IORK SESSION.

•••••••••••••••

·.....Fl........... ......F2........... ...•..Fl...........
·
..
..
.
V

V

• ABNORMALL Y END • •
•
.PREPARE TO ADD •
.PUT THE RECORD.
.A RECORD TO END.
• THE SESSION •
•
• •
• •
Of CHAIN
•

·········1······..
····Gl·········
WOR~N~E~~ION
...............

V SEE NOTE

:

:

......:]::......
.81·
•
.003*

•

···..····1::::::::----------------:.•••••
.:
G3.~ ••••••••

:

SET *RLNO

:

•••••••• j••••••••

Note: Processing begins at INTEND on Part 1 of this figure.
Figure 1-4 (Part 5 of 9). Work Station Logic Flow

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-23

02-K~

.....
07-J3
09-0

.

• 002.

SELECT

•

Al
•*
• ::.

,. •

H~

!~

...

*.

I

EWSESS

• ••••

A2..........

••••• A3 ••••••••••

A4···.·.·· .

*.
..
....
..
•• ••
E~O~~ST • ::.~~~----->:ST~~A~~~~g2~~Ol:-------->:s~~H~~~~~gR~ND: ________ >:
E~gB OF
:
*..*
..
....
..
•••••••••••••••
* •• *
•••••••••••••••••
• ••••••••••••••••

i

NO

.*.

.- .

•• 81
••••
..B3
*. *.
: •••• 84 ••••••••• :
: •••• 85 ••••••••• :
EW JUST •• YES
••
LAST
•• NO
• UPDATE WORK •
• RELEASE THE •
DONE
•• ---------------------------------->..
SESS I ON
•• -------->.S TAT! ON CONTROL.-------->. WORK S TATl ON •
RECORD.·
•
*.
.*

. 'T'" . I'.

••
••

•• C1···....
.::.

EJ DIi,

*..*

.....
*..*........
'or" ................. . . . ·T......·

: •••• C2 . . . . . . . . .:

.::.!~~----->:

SET Oli EW:

..

* •. *

•• 01

••
••

*.

SELECT EJ

....

•••••••••••••••••

I

j< NO
v
.*.

: •••• C3.~ . . . . . . . :
:

•••••••••••••••••

EW ON

.*

i->.N~.....

..

•

F2 •

.•.

••••

r···

••••
JU:;·· •• YES
••
DONE
•• -------->.
••
••
•

**.
••. **

r~~~~~l:~r~~~

E2
. . . . . . . . .:
SET OFF ES
.-------->.
•.•

: :--~~

I

F2

I .....

fl~!~~~F4

I·..•••••••••••••••••.
· . .•••••••••••••••••··1·
I •••••••••••••••••*

··.·~ES

1

,---------------------------------------------------------------

•••

•••• ~~ JU;; •••• YES

DONE

··v··~O

*..*

.*

i····

•• -------->.

•
•

Gz ••••••••• :

SET OFF IJ

----------> 1
V

: •••• G3 ••••••••• :

.-------->.

••
...

.................

l

SET ON IW

: •••• G4 ••••••••• :

.------->.

••
••

SELECT IW

*

········1········

.................

*. *.

: •••• H2 ••••••••• :

*..*

SET OFF IW

···I·~O

S&~~~lA~lnT

.*. ••
J2

.*. ••
J3

..

*.

.*

.*

*.

i

i

:~~i:

.*

.*. ••
J4

*.

K1

•••

••

*.

• * REPEAT
•• NO
••
DISPLAY
•• ----••
••

*..*
•• r~ES

·····ll··········
T:

:
•
:

RESELEC
CURR ENT
DISPLAY

•
:

........!........

NO

V
• •••• K2..........

V
• •••• K3..........

V
• •••• K4 ••••••••••

•
SELECT LAST •
•
SEQUENCED.
• DISPLAY USED •

•
•
•

•
•

..

....

..

j........

....

SELECT NEXT •
01 SPLAY I N .
SEQUENCE.

*

SELECT FIRST
01 SPLAY I III
SEQUENCE

..
•

•

........ j........

········r·······

.....
:o~n

.:O~~:
....

....

••••••••

V

i

NO

.....
V

:O~f:
• •
•

...

V

• •
•

..

.002.

.. • Fl•

*..*
*•• *

*•• *

NO

..

..~

*..*

*.. *

NO

•*

i

*..*

*•• *

*
•

········r·······
..

.* BYPASS
•• Y E S . .
•• YES
••
LAST
•• YES
•• PRIMARY •• YES
•• *. OPERAT ION •••• -----A-->· ••• S&y~~~x~D •••• --------> ••• ~H~b:~C~N •••• --------> •••• SEQUENCE •••• -----

*..*

SELECT ES

• •

•••••

*.

•

•
•

·········1········
•
•

..

V

.•. ••
J1

SET ON ES

: •••• HS ••••••••• :

PRIMARY
.-------~
SEQUENCE.
V

•••••••••••••••••

....

•

V

.. .. ..

:

•••••••••••••••••

..

• 002.
• Fl.

••••• H3..........

. :
.-------->.
• •

: •••• Gs ••••••••• :

••
...

.....

•• IW JUST •• YES
*
••
DONE
•• -------->.
••
••
•

•*

.Fl.
•

I .....

..* . . *..

··.·~o

•••

•••••

*002•

F2···..
F3·····.· . . •
..........
F5 •••• •• . . ••
••••
•
• • RESTORE WORK • •
•
•• YES
••
ENTER
•• NO
.SET OFF RV AND.
• STATION LEVEL.
.SET OFF IJ AND.
.*-------->..
MODE
•• -------->.
IN
.-------->.
FIELDS &
.-------->.
IW
•
* INDICATORS
•
A·
•

.. * . . *..
ES ON

•• HI

..:

REVIEW

V ·•••• •

Fl···..
••••

.:1·

PRIMARY
.-------~
SEQUENCE.
V

..
. . . .•••••••••••••••••..
•••••••••••••••••

• NO

*.

:

..02
••••
: •••• 03 . . . . . . . . . :
ES JUST •• Y E S .
•
DONE
•• -------->.
SELECT EW
.------~
*.
.*
..
..
V
**.
.
*
..
•••••
•• *
•••••••••••••••••..
*002_

·1 NO

••

·.:1·

*002-

•• YES
••
•• -------->..

v

••
••

:• ••••••••••••••
fIOR~N~E~~ION

.- .

••••

**.
••.**

~~

. . . . C5.~ •• ;;;.~OTE

:-------v
..
•••••

•

..

V

• •
•

.....

...

*002 •
• F~ •

Note: Processing begins at INTEND on Part 1 of this figure.
Figure 1-4 (Part 6 of 9). Work Station Logic Flow
1-24

Licensed Material-Property of IBM

..

OS-B3
OS-Hit
OS-Kit
OS-BS
09-Fl
09-B2
09-C2

~~;~~

2~;~~

·OOS.
• B2.

•.El·

..·
!

MSGWSU

.OOS·

I

MSGHSIJ
..64 •••••••••

... ::~~.:;::::;~..

....

""sHOW "INVALID"•
FUNCTION"
•
•

......::!!~~: ...:

.............
F~~~Hgr

:

1----.,

DRIVER

·······el··········..
V

•

WAIT

•

•

:.:;.:--~I

~;ii::::r·······

:....

..·······.
·······C4·1m""
.

SEE NOTE

OZ.¥.......

.• ·~~~~ff~~·· •.
•••• ••••
• YES

· . .*.I

:•••• 03 ••••••••• :

"F~~g~ION
R~~~!~~r

....
:-------->:

• ••••••••••••• :

e1

r--,

E2

.*.

04
••
..SPEC I AL ••
•• FUNCTION
•• NO
•• KEY OR MENU •• -------~
•• RESPONSE ••
V

...+

V
••••••

:
••

V

•
WAlT

:................

09-FS:O~~ •• _>

V

.•.

SEE NOTE

09-DS . . ••

••••

....

•

•

• *REV I EW *. ••
••

YES
FUNC Tl ON
•• -------~
•• REQUEST ••
V

*••. .••*

I

•

.~

:

••

El :

REQUEST

...

••

•• *. .•.•
•

.:

YES

!

SHOW THE MENU.------->.

• •••••••••••• :

.

:

SEE NOTE

: •••• G4 . . . . . . . "":

••••• G3 •••••••••

.---~

WAIT

->.
.------.

-'-

*.

MENU

~2···..

.*

••
MENU
•• YES
•• SELECT
•••• RESPONSE •••• -------->....
BY 10

**.. .••*

·1 YES

.*.
V

J2

••

.*
*. ••
•• PROCESS
ING

••

*.

YES

i

LEVEL

••• ~CTIVE....

+. ••
•

YES

....I
V

•
:

_
Bl :

.+..

Hit··· •.

NO
••
EW
•• NO
•••• --------> •••• REQUEST ••••

*....
*•• *

•

••••

.*

*. ••

H3···..

**.••.**

j.:O

• 64 ..
•

:•

....

i

..•

:
**.............
I
. .....

•• ---~

•

I:

V
•••••

:og~:
••

SET ON E W .

••

V

.006.
••AI..

.

.*-.

•• RELATIVE

....

El :
•

•• NO

--------> •• ~~CO~~RSUMB~~ ••-------v
**.••.**
•••••
*OOS.

V
• . . . . J3..........

•
NO.

I

••••••••••••••••• .V" ••

I ••••••
Bl •

I

V

•
•

J.

PUTS

CURRENTLY
•• -------->.
..DISPLAYED.·

• NO

Hl···..

• •••

•••• G!ENU •••••• NO

•• -------->..

*. *. ••. *

•

81 ••

.:1·

.t

.-

•••

........

01 :

•••••
.OOS.

NO

•••• G~ENU •••••• YES
••

.~

•

Fl·.

••

• GI.

I·.·

I
.*.
V

i

·002-

• YES

• *BYPASS *. •• YES
.* MENU •. •• NO
••
DISPLAY
•• -------->..
DISPLAYED
•• -------~
*. * . . * .*
*. * . . * .*
V
•••••
*••
*
*
••
*
*009• NO
• YES
• Bl.

..

•••••

-. ••

••
••

••

•

~·i·-·-·-··-·-·-·----------.,

V · •••• •
01···.
MSf;\olSU ••

NO
...
••• ~nS~~N~~N~ ••• -------->..

WAIT

YES

•

.:1·

.* .•.•*.
•.•.
.. .I..
.....

.•.•* .*. *.

.

•

V

J4 • *. ••

••
••

ENTER
MODE

JS

••

•• NO
.- REVI EW/
•• NO
•• -------->..
INSERT IN
•• ---~

YES

V

.002.
• .F~.

~ROCES:...
+. ••

I

V
••••
02:
••

.....I :....
• YES

V

.002.
• *F~ •

Note: Control is given to INTCMP (on Part 1 of this figure) to determine if processing can occur
for another session.
Figure 1-4 (Part 7 of 9). Work Station Logic Flow

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-25

.....
07-H4

*007*

*.Fl*

81

!

• *. *.

•* •

*.

.*

82

.*. *.

.*.

*.
.*..
63

*.

.•••••

.

S4..........

.*

85

.-. *•

*•

• * INSERT
*. YES
.* REVIEW
*. YES
.* CURRENT •• YES
* SET ON IN AND *
••
VALID
*. NO
*.
RECORD
.*-------->*.
MODE
.*-------->*.
REVIEW
.*-------->*
SET *RLNO
*-------->*. DISPLAY FOR .*---,
*'*.
.*.*
*'*.
.*'*
•• *~ECORO....
:
:
•• ~:D TYP~*.*

* •• *

!

*•• *

* •• *

i N:~~;.

*1 NO

->: 81..

.*Cl· *. *. *.
.*C2·*· *. *.
.* RESUME
*. YES
.*
ENTER
•• YES
*.
ENTRY
.*-------->*.
MODE
•• -------,
*.
.*
••
.*
V

*..*
*'1*·

NO.*
---*.

01
•*

*.

.*.

*..*
*. *1' ~o

~o
*.

**.....

*.
.*

ENTER
*.
MODE.*

'T'"

V

:6gr:

·1 YES

• .. "

:.m~Er~n~n**:

• * :1*

* VALID DISPLAY.
• FOR CURRENT *
• RECORD TYPE *

•••••

• •

:~:::

* . . . . ***r** . . * . .

*.* ••

02............

••••• V
..*SET OFF RV
*
IN
•

I

*•• *

•••••
*007*

****

V

••••••••••

NO

·•.

*002*
*fl*

AND.
•

. . . . r. . ·.

*..*

*

• *.
El
*.
*.
•*
• * REVIEW
*. NO
*.
ALLOWED
.*---,
*'0.
.*.0

•
•

WDBGET
V
*****E2********* •
* RESTORE WORK •
* STATION LEVEL.
*
FIELD AND
*
INDICATORS
:

I :
V·················
:ogr:

*••
* *
YES

1

000**

I
...•.
Fl..........
•....FZ •.......•.*
•
••
o ..

SAVRST

V

*

0SAVE ENTER MODE*
*
DISPLAY
*
*
*

V

*
*
*

.·········1 * .
******..

···.·Gl*.···..•··

WDBPUT

V

*
SAVE WORK
*
* STATION LEVEL *

:

~~E~gh~~~

RESELECT
INTERRUPTEO
DISPLAY

•
*
*

*

**** . . : ] : : . . . . **

:o~~:

....
*

:

--_::::::r.......
*

*

CLRJDB
V
GET
.*.
:r~r;ntr~?:~~;:
:** . . H2 . . . . . . ***:
: •••• H3 . . . . . . . . . :
.*H4
*'*.
* STATION LEVEL *
*SET ON RV. SET 0
.. GET REQUESTED *
.* RECORD
*. NO
* FIELDS AND
*-------->* OFF IN AND CG *-------->*
RECORD
.-------->*.
FOUND
.*-------,
* INDICATORS
*
*
*
*
•
*.
.*
V
*
*007-

••••••••••••••••••• ••••••••••••••••••• ••••••••••••••••••..

i

**.••. *

•••••

YES

• *:1*

V

J4

.*. *.

•••• RECORD

*. *.

*****JS.*********
YES:

*. IN CURRENT .*-------->*
*. GROUP .*
..

*..*

1(------------------------

.•...K3**........

K4 .*. *.

*
TYPE
••••••••••••••••••
•*

*••. .••*

V

* SELECT FIRST *
.* VALID *.
* VALID DISPLAY.
YES .*DISPLAY FOR*. NO
*FOR THI S RECORD*(--------*. TH I S RCD
•
*. TYPE.*
*

*-------,V
•••••
.007.
**:1*

V

*002*
•

*
*

•

****·*··r·******

•. *'~O

.....I

:

SET ON CG

..

Fl •

• **
Figure 1-4 (Part 8 of 9). Work Station Logic Flow

1-26

~icensed Material-Property of IBM

.....

..

07-JZ
·007 •

• EZ •

DR IYER

.L~

REYIEli

•••

• ••

81
••
82
••
83
••
• •••• 8" . . . . . . . . . .
••••
••••
••••
•
SELECT NEXT •
•• INSERT
•• YES
•• INSERT
•• YES
•• BYPASS
•• YES
• VALID DISPLAY.
••
MODE
•• ------- > •• IN PROCESS •• -------->..
01 SPLAY
•• -------->. FOR CURRENT .-------~
••
••
••
••
A..
••
•
RECORD TYPE.
V

*..*

*..*

* •• *

..

*..*

i

V

.*.

.*.

..
••••

u... . .

*••
*
• NO

* .•
*
• NO

•••• •
I_>:ogr·

1--___ ,

.~.

SELECT

MSr,\-lSU

.

.*. ••

••

I_>:ogr·
•••• •

•• •

:··~:E-NO-T-E---R-ES-P-.-.-.------D-R-I-Y-ER.J

: •••• 03 . . . . . . . . . :•

.... ~!:;~~!~:: ...:

• NO

Y

C3

:....

•

... ~!~p~:!...

•••••

*OOZ• .:;.

•• sEE~fn~lE·
YES
•• FOR CURRENT •• ------~
~~O TYP:...
..~ ••
* ••
*
*003'
• NO
• E".

•• 1
••~
•• HE~~:~E·~;~;~..
••
• ••• YES
INPUT F O R . .
•• REQU IRED
•• -------->.
CURRENT
• ------->.

I

•

•••••••••••••••••

., NO

C1
••
C2
••
•• ··REVIEW •••• YES
•• ·\EVIEW •••• YES
••
MODE
•• --------> •• IN PROCESS •• -----

~...

•

*.. *

* •• *
N:~~;.
->. Bl •

., NO

•• 01E O~·..
..ANO CMO KEY •• NO
.-------->..
13
••

:...............:
WA IT

-------->..

* . • ~:~S~:~...

'.~:::O::~

• YES

• NO

••
.002.

•••
•• El
••••
8YPASS
•• YES
01 SPLAY
•• -------~

••

i

*..*

••

*•• *

NO

V

•

.~L••
•••
./2

MSr,WSU
• ••• ~~~.~;~;~...

I ·

••••

• :.E~mC~nH .:.!~~----->.:. Rg?~~~i~ .:.!~~
••
10..
•• BYPASSED..

*. *. . •• *

'. *. .•.•

• NO

·

..

• Gl •
'.'

'006,

V

• 81·

•••••

:~!r:

•••••

•••
•• StSPL:;..

:o!;:

..' !

L.

1(---------------------------------------------------_________________________ ,
V

••
••

•••

..~~ECI:L ••
•• FUNCTION OR •• YES
MENU
•• ---~

• NO

.

_____ >:

I~~~~~E~?~G : _______

SEE NOTE
: . . . . F" . . . . . . . . . :

>:

01 SPLAY I S · ·

•• •••• ~~~~2 •••••

WAIT

:••••••••••••••• :

•••

./~E O~· ••

*. *. . •• *
• YES

I(---------------------------------------------------------------------------,

.:
.········1········.
.....
...
···.·GZ··.·······
V

:~~W!p~~¥~H~

•

RESP

: ________ >.:.ANO ~~O KEY.:.~~-~
•
•• PRESSEII ••

10

I

V

•••••

:~:I:

•

·002·
• Fl·

Note: Control is given to INTCMP (on Part 1 of this figure) to determine if processing can occur for another session.
Figure 1-4 (Part 9 of 9). Work Station Logic Flow

Work Station Utility (WSU)

Licensed Material-Property of IBM

1-27

SSP Initiator
(#CIML)

I
Execution
Initialization
Phase 1
(#WSXI1)

I
Execution
Initialization
Phase 2
(#WSXI2)

I
START

I
INTCMP
INTRST
INTEND

I
DRIVER

Figure 1·5 (Part 1 of 7).WSU Execution Hierarchy

I

I

(
1-28

Licensed Material-Property of IBM

"

cC'
e
@
-10

U1

:a

!

N

o.....
~

~
C

m
><
CII

n

S.

o·
:l

J:

CD'

~

n
::r

<

r

o·
ctI

:J

II)

ctI

a.

s:

Q)

rot-

.,

ctI

0;'

ALOCAT

T

"'tJ

(3

"0

.,ctI

~

o-+0

OJ

s:

~

o

~

~

o·~

:l

~

~.

~
en
C

~

CO

-I

0
0

~

c::

....
-I

0
0

~

c::

....

....
u.
i

Vl

....

«

u

0

w

>

0

-I

c::

:;

w
w

o
o
c::

-I

u

o-I

«
w

c::
u.

~

....

c::

o
u:
;:

-I

o
~

c::

~

Vl
W

c::

....
u

g

w

w

o
:;

«

o

>

Figure 1-5 (Part 3 of 7). WSU Execution Hierarchy

1-30

Licensed Material-Property of IBM

=.c
'TI

REVIEW

iil

en

~
r+

~

....

C

;:!

~
c:

m

)(

CD

~

n
c

r+

o·
:::::I

:::t

iii·

~

n

::r
'<

r

cr
(\)

:::J

en

(\)

Co

:s:
Q)

r+

..,
(\)

Q.j.

T
"'C

a
"0
..,

(\)

r+

-<
o-..
tD

:s:

:E
o

~

~

o·~
:::::I

~

~.

~c

...w

MSGWSU

W

"-l

'T1

cEo
e
C;;

~

ch

~
r+

-

U1

o

.:::!

~

c:

m

)(

CD

n
e

r+

c)"
:::I

:I:
CO·

~

n

r-

o·
(t)

:J
en
(t)

Co

~

OJ

r+

.,
(t)

Oi'

I"'tJ

o

"C
(t)

~

o........

OJ
~

:r
<

o

~

o

u

o

u:

o

..J

I-

II:

.....

Procedu re parameter
save area in work
station work area

Option menu
External switches
(U1-US)

execute next SDA module.

II Perform diagnostic checking of parameters.
II Set up local communications area.

Option selected

local communications
area

--------:il

To: Applicable Module

MODULE/
ROUTINE

OEseR IPTION

D
fJ

II

By selecting a menu option the user chooses the function within SDA to perform. If an incorrect option is
selected, the menu is redisplayed.

#SAMN

External switches (U1-US) are set and interpreted by the OCl to execute the correct module for the
selected function.
Checks for syntax and verifies that libraries exist for each parameter. If OCl is used, the module prompts
for the necessary parameters.

II Data is passed to affected modules in the local communications area in the PPSA layout.
Diagram 2-1. SDA Mainline Router (#SAMN)

Screen Design Aid

Licensed Material-PropertY or IBM

2-3

From: #SAMN

",INPUT _ _ _ _..

External switches
(U1-US)

OUTPUT _ _ __

~OCESS

_ ---.........

__---.. . .>~

D

Retrieve external switches and local data.
Perform (a) create, (b) add, and (b)
update activity.

--->

Local communications
area

Place source in
library
Work file
Screen prompts

Screen prompts
SFGR module

-------::Tl

To: SFGR or User

MODULE!
ROUTINE

DESCRIPTION
c

#SACU

Da. The create screen sequence:

• Prompts for S specification information.
• Provides blank screen to compose screen image.
• Prompts for field attributes.
• Prompts for overriding attributes if requested in step c.
• Prints the image of the screen composed in step b.
Db. The add function is the same as create, except the existing source is copied into the work file first.
Dc. The update function prompts the user to process specific formats or displays the format name encountered
so the user can decide to update. Update rebuilds the screen image and returns to the create sequence at
step c.

Diagram 2-2. SDA Total Format Create/Add/Update (#SACU)

2-4

Licensed Material-Property of IBM

From: #SAMN

.INPUT _ _ _ _•

External switches
(U1-U8)

OUTPUT _ _ __

L.l:;:0CESS

.

D

Retrieve external switches and local data.

Replace source in
library

... >

Local communication
area
Screen prompts

Disk work file

fJ

Screen prompts

Perform delete or actual source statement
processing activity.

SFGR source

------:il

To: SFGR or User

MODULE/
ROUTINE

OESeR IPTION

0

•
•
fJ

#SADS

Delete function:
Prompts the user to scan for specific formats, and if selected the user enters the format name to scan for.
The format name (if found) is displayed and the user can delete it (response to YES/NO prompt).
If no scan is desired each format encountered is displayed by name and deleted or not as described
preceding.

Update source function uses SEU with SDA provided formats.

Diagram 2-3. SDA Format Delete (#SADS)

Screen Design Aid

Licensed Material-Property of IBM

2-5

From: #SAMN

II INPUT -

_ _ _. .

D

SFGR load member
Screen prompts

• OUTPUT _ _ _- .

a..::.;:0CESS

.-----....>

Display formats in specified SFGR load
member.

Screen prompts

..
...

Screen displays

---------:i1

To: User

MODULE!
ROUTINE

DESCRIPTION

D

#SADP

The user can have:
•

A list of all the formats in an SFGR load member displayed.

Q

A specific format in an SFGR load member displayed .

•

All of the formats in an SFGR load member displayed.

Note: While a format is being displayed, the user can enter data into it and the format will act as if displayed
by the user's program.

Diagram 2-4. SDA Display Function (#SADP)

2-6

Licensed "Material-Property ~f IBM

From: #SAMN

II INPUT _ _ _ _..

Menu option

OUTPUT _ _ __

L..I:.:0CESS .

..

-----".......
_----v'
. .:>

D Display, create, or update option menu.
EJ User selects option to create or update.

External switch
(U1-US) setting

To: #SAMB

MODULE/
ROUTINE

DESCRIPTION

D

Display, create, or update screen.

fJ

Based on user selection, turn on external switch 1 or 2.

#SAMA

Diagram 2-5. SDA Interactive Menu Build (#SAMA)

Screen Design Aid

Licensed Material-Property of IBM

2-7

From: #SAMA

II INPUT - - - - _
Utility control
statement (MENU)

OUTPUT tc:a::=:=!:::::::::.7:.::!"='~'l

LJ:.;:0CESS

.. D
:::::::=::::>

Process utility control statement to obtain
parameters.

Source statements
Screen prompts

Source statements
Screen prompts:

fJ Perform menu message member source
create or update.

•

Message member
(#SA@ME)

•

External switch
(U 1-U8) setting

To: Build Menu

OESeR IPTION

D
fJ

Read the menu control statement for SDA and perform syntax and diagnostic checking on parameter data.
The create function displays a blank skeleton menu to be filled in by the user {if desired!' Screens follow
to allow the user to enter commands associated with each option number on the skeleton menu. Update
rebuilds the same screens from message member source and allows the user to modify it.

Diagram 2-6. SDA Interactive Menu Build (#SAMB)

2-8

MODULE/
ROUTINE
#SAMB

From: #SAMN

~

OUTPUT _ _ __

INPUT _ _ _ _ _. .

L::;:0CESS
Source statements

.----,........
_---... ..>, 0'

Screen prompts

Screen prompts.

Retrieve local communication area data.

DRead SFGR source and build a skeleton
RPG II program.

RPG II source

Local communications
area

Work file

~---:il

To: User

MODULE/
ROUTINE

DESCRIPTION

III
B

Obtain library and SFGR source member to process information from local communications area parameter
data.

#SARP

When building RPG II source:

•

Prompt for Hand F specification information.

e Build I specifications prompting for decimal positions on numeric fields .

• Build 0 specifications
Diagram 2·7. SDA RPG Skeleton Program Build (HSARP)

Screen Design Aid

Licensed Material-Property of IBM

2-9

JlINPUT _ _ _ __

From: Keyboard

OUTPUT _ _ _ _. .

L:;:0CESS
Menu option

..

---~. >
..

0

The user selects options from the help text
'menu. Text data is displayed and the menu
is redisplayed.

Screen prompts

To: User

Diagram 2·8. SDA Help Text (#SAHP)

2·10

Licensed

Material~Property

of IBM

II INPUT _ _ _ _•

From: Keyboard

OUTPUT _ _ __

LJ;;:0CESS
Local communications
area

_---r......
...>

D

Display a list of all formats that have been
generated and placed in work file. If the
user enters:

Source statements
Screen prompts

Work file
•

Option 0 do b

•

Option 1 do a

•

Option 2 terminate and don't effect
work file or library

Screen prompting

a. The work file is deleted and not copied
back to source library.
b. The work file is copied to source
library under the specified member
name. The work file is then deleted.

-------=it

To: User

Diagram 2-9. SDA Recovery Function (#SARC)

Screen Design Aid

Licensed Material-Property of IBM

2-11

Program Organization
The storage map (Figure 2-1) in this section is representative of the layout for all SDA modules.

X'QOOO'

Copyright information
Executable code
DTF
Data buffers
Work areas
Accumulator values
(See the Data Areas section of each
module listing to determine
individual usage.)

Figure 2·1. SDA Storage Map

2·12

Licensed Material-Property of IBM

Directory
This directory identifies the SDA load modules for quick
reference to program listings and microfiche. Modules are
listed alphabetically by name, and each entry in the
directory provides the following information:
•

Module Name is the symbolic label identifying the
module in the program listings and on microfiche .

• Major Functions details a brief list of specific functions
the module performs within the program.

Module
Name

Major Functions

#SACU

Retrieves external switches and local data.
Performs create/add/update activity.

#SADP

Displays formats in specified SFG R load
member.

#SADS

Retrieves external switches and local data.
Performs delete processing activity.

#SAHP

Allows user: to select options from the
help text menu. Displays text data and
redisplays menu.

#SAMA

Displays create or update option menu.

#SAMB

Processes utility control statements for
parameters. Performs menu message
member source create or updating.

#SAMN

Displays SDA option menu. Processes
option to set external switches (U1-U8) to
execute next SDA option. Performs diagnostic checking of parameters. Sets up
local communications area.

#SARC

Displays list of SFGR formats placed in
work file.

#SARP

Retrieves local communications area data.
Reads SFGR source and builds a skeleton
RPG II program.

Screen Design Aid

Licensed Material-Property of IBM

2-13

Data Areas
LOCAL COMMUNICATIONS AREA

The local communications area passes data between the
modules. It is defined using the same displacements as
for the procedure parameter save area (macro PPSEQ).
Parameter 1 is in PPSVAR01.
Parameter 2 is in PPSVAR02.
Parameter 3 is in PPSVAR03.
Parameter 4 is in PPSVAR04.
Parameter 5 is in PPSVAR05.
Parameter 6 is in PPSVAR06.
Parameter 7 contains the time of day in displayable
format.
Parameter 8 contains the date in displayable format.

2-14

Diagnostic Aids
Figure 2-2 lists the message identification codes (MICs) and
the modules that diagnose and issue the corresponding error
messages.

MESSAGES
Message

Module

Message

Module

0001
0002
0003
0004
0005
0008
0009
0010
0011
0012
0013

#SAMN
#SAMN
#SADS
#SACU
#SAMN
#SAMN
#SAMN
#SACU
#SACU
#SACU
#SACU
#SADS
#SACU
#SADS
#SAMN
#SAMN
#SAMN
#SAMN
#SAMN
#SACU
#SADS
#SARP
#SACU
#SADP
#SAHP
#SAMA
#SAMB
#SAMN
#SARC
#SARP

0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041*
0047
0048
0049*
0050

#SAMN
#SAMN
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SAMB
#SARP
#SAMB
#SAMB
#SACU
#SACU
#SAMN
#SAMN
#SACU
#SAMB

0014
0015
0016
0018
0019
0020
0021

0022

Note: All messages are SYSLOG messages except those
annotated with an asterisk. The asterisked messages are
displayed messages.
Figure 2-2. SDA Message-to-Module Cross Reference

Screen Design Aid

Licensed Material-Property of IBM

2-15

PROCEDURES
SDA Mainline
This procedure executes SDA mainline where:
Parameter
Parameter
Parameter
Parameter
Parameter
Parameter

II
II
II
II
II
II
II
II

1:
2:
3:
4:
5:
6:

source member name to process
SDA inlib
SFG R load member name
yes/no to SFGR printing
SDA outlib
SFGR outlib

MEMBER PROGRAMl-#SA#Ml,USERl-#SA#Ml
IF ?lR'OOOl'?1 SWITCH 00000000
IFF ?2'#LIBRARY'?I#LIBRARY SWITCH 00000000
IFF ?4'YES'?1 SWITCH 00000000
IF ?5?1 IF ?6?1 INCLUDE SDA9 ?1?,?2?,?3?,?4?,?2?,?2?
IFF ?5?1 IF ?6?1 INCLUDE SDA9 ?1?,?2?,?3?,?4?,?5?,?2?
IF ?5?1 IFF ?6?1 INCLUDE SDA9 ?1?,?2?,?3?,?4?,?2?,?6?
IFF ?5?1 IFF ?6?1 INCLUDE SDA9 ?1?,?2?,?3?,?4?,?5?,?6?

SDADROP
This procedure removes SDA from #library or a specified
library.

II
II

REMOVE #SA,ALL,LIBRARY,?l'#LIBRARY'?
REMOVE SDA,ALL,LIBRARY,?l'#LIBRARY'?

SDAH
This program executes program #SAHP which is the help
function.

II
II

LOAD #SAHP
RUN

SDALOAD
This procedure loads SDA into the system.

II MEMBER
II * 0049

PROGRAMl-#SA#Ml,USERl-#SA#Ml

2-16

Licensed Material-Property of IBM

SDASAVE
This procedure saves SDA from #1ibrary or a specified
library.

II
II
II

IF DATAIl-SDA DELETE SDA,Il
FROHLIBR SDA,ALL,LIBRARY",999,PPUTIL
(SEE SDADROP)
FROMLIBR #SA,ALL,LIBRARY,SDA"ADD,PPUTIL
(SEE SDADROP)

. SDA1
This procedure executes program #SACU which creates,
adds, and updates total formats.

II
II
II
II
II
II
II
II
II
II
II
II

LOAD $FBLD
RUN
FILE LABEL-#SD.?WS?,ATTRIB-D,BLOCKS-157,RECL-80,RETAIN-T
END
LOAD #SACU
FILE NAME-IOWORK,RETAIN-T,LABEL-#SD.?WS?
RUN
IF SWITCHl-l CANCEL
IF DATAFl-#SD.?WS?
DELETE #SD.?WS?,Fl
SFGR
IFF ?3?1 INCLUDE
SDA6 ?1?,?2?,?3?,?4?,?5?,?6?
SWITCH 00000000
IF SWITCH8-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?

SDA2
This procedure executes program #SADS which is the
delete format and SEU generate option.

II
II
II
II
II
II
II
II
II

IF SWITCH3-l SEU ?1?,S,#SA@DS,80,?5?
IF SWITCH4-1 LOAD #SADS
IF SWITCH4-1 FILE NAME-IOWORK,RETAIN-T,LABEL-#SD.?WS?,BLOCKS-157
IF SWITCH4-1 RUN
IF SWITCHl-l CANCEL
IF DATAFl-#SD.?WS?
DELETE #SD.?WS?,Fl
IFF ?3?1 INCLUDE
SDA6 ?1?,?2?,?3?,?4?,?5?,?6?
SFGR
SWITCH 00000000
IF SWITCH8-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?

Screen Desigr Aid

. i-:icensed

Materi~17Property

of IBM

2-17

SDA#
This procedure executes program #SADP which is the
format display function.

II
II
II
II
II

IFF ?2?I#LIBRARY LIBRARY NAME-?2?
LOAD #SADP
RUN
SWITCH 00000000
IF SWITCH8-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?

SDA5
This procedure executes program #SAMA (interactive
menu option select) and SAMB (interactive menu create
or update).

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

MEMBER PROGRAMl-#SA#Ml,USERl-#SA#Ml
IF ?l'SCRNSP'?1 SWITCH 00000000
SET SWITCHES TO 00000000
ELSE SWITCH 00000000
BEFORE SAMA
LOAD #SAMA
RUN
IF SWITCHI-O IF SWITCH2-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?
IFF ?2?1?5? IF SWITCH2-1 LOAD $MAINT
IFF ?2?1?5? IF SWITCH2-1 RUN
IFF ?2?1?5? IF SWITCH2-1 COPY FROM-?2?,TO-?5?,LIBRARY-S,NAME-?1?##,RETAIN-R
IFF ?2?1?5? IF SOURCE-'?1?DT,~2?' IF SWITCH2-1 COpy FROM-?2?,TO-?5?,RETAIN-R,
IFF ?2?1?5? IF SOURCE-'?1?DT,?2?' IF SWITCH2-1 LIBRARY-S,NAME-?l?DT
IFF ?2?1?5? IF SWITCH2-1 END
LOAD # SM-lB
RUN
MENU INPMSG-?1?##,MENMSG-?1?DT,INLIB-?5?,REPLACE-NO
END
IFF SOURCE-'?1?DT,?5?' BLDMENU ?1?,,?5?,?5?,REPLACE
IF SOURCE-'?1?DT,?5?' BLDMENU ?1?,?1?DT,?5?,?5?,REPLACE
SWITCH 00000000
IF SWITCH8-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?

SDA6
This procedure executes SFGR.

II IF ?l'SCRNSPEC'?1 SWITCH 00000000
II * 0041
II LOAD $SFGR
II RUN
II LOADMBR REPLACE-YES,NAHE-?3?
II INOUT OUTLIB-?6?,INLIB-?5?,PRINT-?4?
II CREATE SOURCE-?1?,NUMBER-32
II END
II SWITCH 00000000
II IF SWITCH8-0 RESET SDA 1?,?2?,?3?,?4?,?5?,?6?
2-18

Licensed Material-Property of IBM

SDA7
This procedure executes program #SARP which is the RPG II
skeleton program create option.

II
II
II
II
II
II
II

LOAD #SARP
FILE NAME-IOWORK,RETAIN-T,LABEL-#SD.?WS?,BLOCKS-157
RUN
IF SWITCH1-1 CANCEL
IF DATAF1-#SD.?WS? DELETE #SD.?WS?,F1
SWITCH 00000000
IF SWITCH8-0 RESET SDA ?1?,?2?,?3?,?4?,?5?,?6?

SDA8
This procedure executes program #SARC which is the
recovery procedure data set.

II
II
II
II
II
II
II
II
II

SWITCH 10000000
CAUSES LOCAL AREA TO BE SET UP
LOAD #SAMN
RUN
SWITCH 00000000
LOAD #SARC
FILE NAME-IOWORK,RETAIN-T,LABEL-#SD.?WS?
RUN
IF SWITCH1-1 CANCEL
IF DATAF1-#SD.?WS?
DELETE #SD.?WS?,Fl

SDA9
This procedure executes SDA mainline and routes to the
subprocedure shown below where:
Parameter 1:
Parameter 2:
Parameter 3:
Parameter 4:
Parameter 5:
Parameter6:

II
II
II
II
II
II
II
II
II
II

source member name to process (defaults
to SCRNSPEC)
SDA jnlib (defaults to #library)
SFGR load member name
yes/no toSfGR printing (defaults to yes)
SDA outlib (defaults to parameter 2)
,SFGR outlib (def,aults..to...par4lmeter 2)

'DATAFl-#SD. ?WS?
SWITCH 00000000
LOAD #SAMN
RUN
IF SWITCH1-1 INCLUDE
IF SWITCH2-1 INCLUDE
IF SWITCH3-1 INCLUDE
IF SWITCH4-1 INCLUDE
IF SWITCH5-1 INCLUDE
IF SWITCH8-1 CANCEL

'IF

INCLUDE

SDA1
SDA2
SDA3
SDA5
SDA7

SDA8 ?11,?2?,?3?,?4?,?5?,?6?

?1?,?2?,?3?,?4?,?5?,?6?
?1?,?2?,?3?,?4?,?5?,?6?
?1?,?2?,?3?,?4?,?5?,?6?
?1?,?2?,?3?,?4?,?5?,?6?
?1?,?2?,?3?,?4?,?5?,?6?

CREATE,ADD,UP
DELETE,SEU
DISPLAY
MENU
RPG
Screen Design Aid

Licensed Material-Property of IBM

2-19

SOA Index
#SACU (performs create/add/update activity)
diagram 2-4
directory 2-13
#SADP (displays formats in specified SFGR load member)
diagram 2-6
directory 2-13
#SADS (performs delete)
diagram 2-5
directory 2-13
#SAHP (allows user to select options from the help text
menu)
diagram 2-10
directory 2-13
#SAMA (displays create or update option menu)
diagram 2-7
directory 2-13
#SAMB (displays the blank or updated menu formats)
diagram 2-8
directory 2-13
#SAMN (displays SDA option menu)
diagram 2-3
directory 2-13
#SARC (displays list of SFGR formats placed in work file)
diagram 2-11
directory 2-13

2-20

#SARP (reads SFG R source and builds a skeleton R PG
program)
diagram 2-9
directory 2-13
I

Allows user to select options from the help text menu
diagram 2-10
directory 2-13
Displays create or update oPtion menus
diagram 2-7
directory 2-13
Displays formats in specified SFGR load member
diagram 2-6
directory 2-13
Displays SDA option menu
diagram 2-3
directory 2-13
Displays a list of SFGR formats placed in work file
diagram 2-11
directory 2-13
Performs create/add/update activity
diagram 2-4·
directory 2-13
Performs· delete
diagram 2-5
directory 2-13
Reads SFGR source and builds a skeleton RPG program
diagram 2-9
directory 2-13

Chapter 3. Data File Utility (DFU)

Introduction

Nonexecutable Load Modules

The data file utility (DFU) portion of the utilities program
product provides a convenient method of creating, maintaining, displaying, and listing data files.

#DF#MG
#DF@24
#DFSO-#DFS10

DFU message load member.
display screen load member.
reserved for expansion to keep
DFU a fixed size in the library.

DFU operates interactively, allowing the System/34 user to:
•

Create indexed data files.

Procedures

•

Update indexed data files.

•

Inquire into indexed data files.

•

List indexed, sequential, or direct data files. Data files
can be sorted prior to being listed. The following
capabilities are available within the list function:
Extract and print data from a related master file.
- Select records for printing based on field value.
Calculate and print a result field by combining,
arithmetically, fields and/or constant values.

ENTER
allows creation of a data file.
allows alteration of an existing data file.
UPDATE
INQUIRY
allows display of a data file.
LIST
allows printing of a data file.
DFULOAD loads D F U into a specified library.
DFUDROP
deletes DFU from a specified library.
DFUSAVE
saves DFU on diskette.
, calls modules required for a list with sort.
#DFST
calls job setup modules.
#DFMP

INPUTIOUTPUT
HOW THE PROGRAM WORKS

After the user signs on DFU, input to set up and execution
consists of:

The DFU user signs on by entering one of the DFU commands: ENTER, UPDATE, INQUIRY, or LIST. DFU
then calls setup or execution depending on the existence
or nonexistence of the DFU format named by the second
parameter of the command. The DFU format describes the
processing to be performed. If the DFU format name
does not exist as a subroutine member in the library, DFU
setup is called to create the format. If the DFU format
named on the initial command exists as a subroutine member
in the library, the corresponding execution phase is called.

Setup
•

Source member of RPG II file description and input
specifications describing the files to be processed.

•

Source member of saved DFU specifications.

•

Operator responses to DFU prompts.

Execution

Note: The library referred to in this discussion is~the
system library, unless a user library is specified on the DFU
command.

•

DFU format description (subroutine members) describing
the processing to be performed.

•

Display format load member describing execution time
output displays.

•

Data file(s) to be updated, displayed, listed.

•

Operator responses to DFU prompts.

PHYSICAL CHARACTERISTICS
DFU is composed of 36 library members. The Directory in
this chapter explains the 14 executable load modules.

Data File Utility (DFU)

Licensed

~ateria~-Property

of IBM

3-1

Output from DFU setup and execution consists of:
Setup
•

Source member of saved DFU specifications.

•

DFU format description (subroutine member) describing
the processing to be performed.

•

Display format load member describing execution time
output displays.

•

SYSLIST output of DFU attributes and specifications.

•

Source member of display format specifications describing execution time displays.

Execution
•

Created or updated data file.

•

Printed output of processing performed.

•

Displayed data records at the display station.

I/O STORAGE REQUIREMENTS
DFU requires 14K (14,336) bytes of main storage.

SYSTEM CONFIGURATION
DFU I'un~ on all models of the System/34. DFU requires
the Sort pr'Jgram when listing with sort.

3-2

Licensed Material-Property of IBM

Method of Operation
INPUT _ _ _ __

From: System

Library (disk):
•

•
•
•

•

'" OUTPUT _ _ __

~OCESS

o

DFU message
member (#DF#MG) - - - -.....

II

R PG \I sou rce for
file(s)

II Inquiry: displays the file (Diagram 3-4).
IJ List: prints the file (Diagram 3-5).

Saved DFU source
specifications

Library (disk):

If'format description does not exist,
creates it (Diagram 3-2).

•

DFU format
(subroutine)

•

DFU specs (source)

•

Display formats
(source and load)

Enter/Update: creates or updates the file
(Diagram 3-3).

Printer: Records
processed

DFU format
(subroutine)

Disk data file
Display format
(load)

Display station output:
Error messages, prompts,
record displays.

Disk data file(s)
Display station input
functions, parameters,
responses to DFU
prompts

To: System

MODULE/
ROUTINE

OEseR IPTION

D

The DFU format describes the file processing required. If it does not exist as a subroutine member in the
library at job initiation, the DFU job setup modules are called to create it. For enter/update and inquiry,
corresponding display format source specifications are created to describe display station screens. These
are stored in the library under the default name generated by DFU, unless a name is specified on the initial
command. The default name is a combination of: #OF + display station 10 + 1 (if not in inquiry mode),
or 2 (if in inquiry mode).

#DFMP

DFU then calls the SSP utility program, $SFGR, to convert these source specifications to the load member
form required for execution; the load member has the same name as the DFU format. The source input
specifications are then removed from the library, unless a name was specified on the initial command,
indicating they were to be saved.

fJ The operator can create or update records in a file.

Fields can be totaled, and new, updated, or deleted

#DFEI,
#DFUD

records can be printed.

D

The ,operator can select any prime data area record in the file for display at the display station. Records can
be selected by record key or by scrolling through the file. Any displayed record can be printed.

IJ The file is listed as specified in the DFU format.

The file can be sorted before listing data for the list can be

#DFIN

#DFLS

extracted from a related master file.

Diagram 3-1. DFU Overview
Data File Utility (DFU)

Licensed Material-Property of IBM

3-3

From: DFU Overview
(Diagram 3-1)

'" INPUT _ _ _ __

L.::.;:0CESS

o

Utility control statements (DFU and END)
Library (disk)
•

.

RPG II source
specs describing
file(s)

•

Cataloged DFU
sou rce specs

•

DFU message
member (#DF#MG)

Display station input
•

Prompt responses
and DFU spec
updates

!:I

Initializes DFU job setup.

OUTPUT t===~
System list device:
RPG II errors, DFU
attributes, specs

fJ Builds DFU specs. '
II Allows updates to DFU specs.
II Diagnoses and optionally catalogs DFU

Main storage
(COMMON):

o Information pointer

specs. Returns to step 3 if any errors.

II Creates DFU format in work file.
II Creates display screen source specs for

o Buffer addresses
DFU work file (DISK):

enter/update and inquiry.

o DFU attributes

fJ Writes DFU format in library.

o DFU specs

II If not list, calls $SFGR to create display

c DFU format

format load member.

Library (disk):
"

DFU specs (source)

o Display screen
formats (source)

o DFU format
(subroutine)

o Display screen
formats (load)

1_____--1

~~

,~ '" i,.

U5

~ ("

';:4:

To: Execution Step for
Enter/Update (Diagram 3-3),
Inquiry (Diagram 3-4), or
List (Diagram 3-5)

Diagram 3-2 (Part 1 of 2). DFU Job Setup

3-4

Licensed Material-Property of IBM

MODULE/
ROUTINE

OEseR IPTION

II Allocates a scratch work file on disk (DFUWORKA)"initializes COMMON in main storage, and converts

#DFMP

RPG II specifications to DFU attributes in the work file. If a master file is present, prompts for the RPG II
member and creates the corresponding master file attributes. If DFU specifications are saved, reads them
and puts them in the work file.

D

Prompts the operator for a job description and builds DFU specifications for enter, update, inquiry, or list.

#DFQLlist
#DFQIinquiry
#DFQEenter/update

D

Displays DFU attributes or specifications and allows updating of DFU specifications.

#DFUP

D Diagnoses the DFU specifications in the work file. Saves the DFU specifications, if requested, when they are

#DFDI

error free.

D Merges DFU attributes/specifications and creates DFU format in the work file.

#DFFB

iii If enter/update or inquiry, creates source specifications describing display screens for the job.

#DFWS

o
m

Writes the DFU format as a subroutine member in the library and calls end of job to terminate the job
setup step.

#DFWS

If enter/update or inquiry, called (as a job step) to convert display screen source to display screen load
format.

$SFGR

Diagram 3·2 (Part 2 of 2). DFU Job Setup

Data File Utility (DFU) 3·5

Licensed Material-Property of IBM

From: DFU Overview (Diagram 3-1) if
format existed, or Job Setup
(Diagram 3-2) if format did not exist.

• INPUT _ _ _ _..

~OCESS

D

If enter, allocates file.

D Initializes enter/update processing.
II If update mode, prompts the operator for

System input: Utility
control statements
(DFU and END)

Main storage,
(COMMON):

the key of the next record to be updated.
Data files (disk): VTOC
for file to be updated.

">
...

o

Library (disk):
•

DFU format
(subroutine)

•

Screen format
(load)

•

DFU message
member
(#oF#MG)

Display station output: Operator creates
or changes record

g

If entry or insert mode, prompts the
operator for the record key and data of
the next record to be created.

>

0

Information pointers

0

Buffer addresses

Display station display:

Examines operator responses to display
screen prompts.

m

Writes completed records to disk.

Q

Accumulator
displays

0

Enter/update record
displays

D Updates accumulator values.

Repeats
steps 2 through 6 until end of job is
requested.

Data file (disk): New/
updated/deleted records

1m If end of job is requested, terminates

Printer:

processing.
0

New records

0

Updated records

G

Deleted records

0

Accumulator values

:j

I

To: System
Diagram 3-3 (Part 1 of 2). DFU Enter/Update Execution

3-6

Licensed Material-Property of IBM

MODULE/
ROUTINE

OEseR IPTION

o
D

Allocates and creates VTOC entry for a new file.

#OFEX

Reads and processes utility control statements, allocates buffers for all files, and locates and reads the OFU
format. Allocates and opens the data file and display station and initializes the COMMON area.

#OFEX

II In update, prompts the operator for the key of the record to be updated. This key must exist in the file.
D If creating records, the record key and associated data is prompted for at the same time. The record key must

#OFUO
#OFEI

not exist in the file.

D Interprets all operator function control and command function key responses.

#OFEI
(entry/insert)
#OFUO
(update)

m
D

When a record is completed, writes new/updated record or deletes record. If requested in the OFU format,
the record is printed using printer data management. The printer is opened the first time it is requested.

#OFEI
(entry /i nsert)
#OFUO
(update)

Changes or adds to the accumulator hold areas. If requested by the operator, displays batch accumulators;
they are also printed if the printer is opened.

#OFEI
(entry /i nsert)
#OFUO
(update)

m

Displays new/updated/deleted record counts, and displays batch and final accumulators. Prints this information
if the printer is opened. Calls end of job.

#OFEI
(entry /insert)
#OFUO
(update)

Diagram 3·3 (Part 2 of 2). DFU Enter/Update Execution

Data File Utility (OFU)

Licensed Material-Property,of IBM

3·7

From: DFU Overview (Diagram 3-1) if
format existed, or Job Setup
(Diagram 3-2) if format did not
exist .

'" INPUT - - - -..

D
fJ

Utility control statements (DFU and END)
Data file (disk): VTOC
for file to be displayed. _---"""""~

... >

Library (disk):
•

DFU format
(subroutine)

•

Screen format
(load)

•

DFU message
member (#DF#MG),

OUTPUT _ _ __

• ~OCESS
Initializes inquiry processing.

Main storage
(COMMON):

Retrieves record to display.
•

Information pointers

•

Buffer addresses

.:II
.::. Determines record type.

D Displays record.
II Examines operator responses.

Display station display:
Records displayed
from file

Repeats
steps 2 through 5 until end of job is
requested.

Printer: Formatted
print of selected
records

II Calls end of job.

Display station input:
Operator requests to
display records.

---------:it

To: System

MODULE!
ROUTINE

DESCRIPTION

D
fI

D
D
II

II

Reads and processes utility control statements, allocates buffers for all files, and locates and reads the
DFU format. Allocates and opens the data file and initializes the execution COMMON area.

#DFEX

Initially retrieves the first record in the file, later retrieves the record specified by the operator. The operator
request records by a specific record key, or scrolling the file.

#DFIN

Examines the record information sectors of the format description to check if the retrieved record matches
any defined record types. If a match is found, reads the field information sectors that indicate the fields to
display for this record type.

#DFIN

Displays the record as described in the DFU format.

.#OFIN

Examines operator responses, prints the record if requested (via printer data management), and allocates and
opens the printer on first print request. Oetermines operator's next record key request.

#OFIN

When operator requests end of job, calls end of job to terminate the job and close all files.

#OFIN

Diagram 3-4. DFU Inquiry Execution

3-8

Licensed Material-Property of IBM

From: DFU Overview (Diagram 3-1) if
format existed, or Job Setup
(Diagram 3-2) if format did not
exist.

OUTPUT _ _ __

~INPUT----.

~OCESS

UtilitY control statements (DFU and END)

D

If file is to be sorted, create sort sequence
specs.

Library (disk):

fJ

If file is to be sorted, call #GSORT to sort
file.

D

Initialize for list processing.

Disk data file: File of
sorted tag records
(#oFTAG)

D

Read record and determine if it is to be
listed.

Main storage
(COMMON):

•

•

DFU format
(subroutine)
DFU message
member (#DF#MG)

Disk data files:
~

•

•

>

VTOC for data
file to list
VTOC for master
file

Library (disk): Source
member of sort
sequence specs

m

Read master record (if needed).

m

Process control level fields.

IJ

Print fields from record(s). Repeat steps
4 through 7 until end of file is reached.

o

Processing
information

o

Record addresses

Printer: Data fields
and accumulators

If end of file, print final totals and
II terminate.

To: System

MODULE/
ROUTINE

OESeR IPTION

D

fJ

EI

If file is to be sorted before listing, this module is called via OCl to create sort sequence specifications
from information in the DFU format.

#DFSB

If file is to be sorted before listing, the sort module is called via OCl to create a file of sorted tag records.
This file has RETAIN-J; so it exists only for this job.

#GSORT

Reads and processes utility control statements, allocates buffers for all files. Allocates and opens the printer
and all data files. locates and reads the DFU format. I nitializes the COMMON area.

#DFEX

Note: All printing is done via printer data management.

II

If sorted, reads a tag record and then the associated data record. If not sorted, reads next record from data
file. Determines record tYpe. If found, determines if the record satisfies record selection criteria (if specified).

#DFlS

m
m

Reads the master record if necessary.

#DFlS

Determines if a control field changed value. If so, prints and updates accumulators.

#DFlS

IJ

If detail records are printed, formats and prints data including generated result fields.

#DFlS

II

Prints final accumulator and calls end of job.

#DFlS

Diagram 3-5. DFU List Execution
Data File Utility (DFU)

Licensed

Material~Property

of IBM

3-9

Program Organization
This section contains module flow charts (Figures 3-1 through
3-3) to define interaction wtihin the program. Additionally,
storage maps (Figures 3-4 and 3-5) for the DFU job setup and
job execution are included in this section.

3-10

Licensed

Material~Property

of IBM

Yes

DFU job setup
(Figure 3-2)

Yes

Create display
format load
member

Yes

Remove display
format source
member

DFU job
execution
. (Figure 3-3)

No

Remove format
from library

End DFU

Figuro 3·1. DFU Modulo Flow Ovorviow
Data File Utility (DFU)

Licensed Material-Property of IBM

3-11

Create DFU
attributes

YN
or

YY

Go

#DFDI
Inquiry

Enter/Update

#DFOI

Diagnose DFU
specifications

#DFOE

Create inquiry
DFU specifications

Create list DFU
specifications

Create enter/update
DFU specifications

#DFUP

#DFUP

Allow update of
DFU specifications

Allow update of
DFU specifications

Allow update of
DFU specifications

#DFDI

#DFDI

#DFDI

Diagnose DFU
specifications

Diagnose DFU
specifications

Diagnose/save DFU
specifications

Yes

No

#DFFB
Create DFU
format in work
file

#DFWS
Write DFU format
and display
source

Figure 3·2. DFU Job Setup Module Flow

3·12

Licensed Material-Property of IBM

Enter/Update

Create sort
sequence
specifications

#DFEX

#GSORT

Allocate new file

Sort data file

#DFEX

#DFEX

#DFEX

Initialize enter/
update execution

Initialize list
execution

Initialize inquiry
execution

Print data records

Display data
records

#DFUD

#DFEI

Alter data
records

Create data records

End of
execution
Figure 3·3. DFU Job Execution Module Flow

Data File Utility (DFU)

Licensed Material-Property of IBM

3-13

X'OOOO'

Copyright Information
Job setup communications area
(COMMON)

#DFMP

•

Data used by more than one module.

•

Subroutines used by more than one
module.

Module overlay area-First 5 bytes give
name of module in storage. ,(Label
DFMPOOOO in the #DFMP module
addresses this area.)
Buffers for individual modules. (See the
Data Areas section of a module's prologue to determine individual usage.)

#DFOL
#DFOI
#DFOE
#DFUP
#DFDI
#DFFB
#DFWS

Buffers to read/write/display DFU
attributes/specifications (used by all job
setup modules).

X'3800'
Additional buffers to read/write/display
DFU attributes/specifications (if region
size larger than 14K).
Figure 3-4. DFU Job Setup Storage Map

3-14

Licensed Material-Property of IBM

X'QOOQ'

Copyrigt"tt Information
Job execution communications area
(COMMON)

•

Data used by more than one module.

• Subroutines used by more than one
module.
#DFEX

•
•

Printer DTF.
Data file DTF.

Module overlay area-First 5 bytes give
name of module in storage (label
DFEXOOOQ in the #DFEX module
addresses this area).

#DFEI
#DFUD
#DFlS
#DFIN

Data areas referred to in COMMON:

•

DTFs for display station, master file,
tag file.

•
•
•
•

Accumulator hold areas.
Control level hold areas.
I/O buffers for files.
Read buffer for DFU format.

(See the Data Areas section of a module's
prologue to determine individual usage.)
X'380Q'

Additional buffers to read DFU format
(if region size larger than 14K).

Note: The module to create sort sequence specifications,

#DFSB, is loaded via OCl as a separate job step. Since
the module contains no overlays, it is not described in a
storage map.
Figure 3·5. DFU Job Execution Storage Map

Data File Utility (DFU)

Licensed Material-Property of IBM

3-15

Directory
This directory identifies the DFU executable load modules
for quick reference to program listings and microfiche.
Modules are listed alphabetically by name, and each entry in
the di rectory provides the following information:
•

Module Name is the symbolic label identifying the
module in the program listings and on microfiche.

•

Major Functions is a brief list of specific functions the
module performs within the program.

Module
Name

Major Functions

#DFDI

•

Diagnoses DFU specifications.

•

Saves the DFU source specifications if
requested when they are error free.

•

Prompts the operator for key and data
fields for a new record (entry/insert modes).

•

Creates the record from operator responses
and writes it to disk. Totals accumulator
fields.

#DFEI

Module
Name

Major Functions

#DFIN

•

Retrieves the key and data fields of the
requested record from the file and places
the fields into the display buffer.

•

Puts the requested record out to the
display station and gets the next operator
response .

•

Calls indexed random/sequential input
data management to get one of the
following:
Requested record using key entered
by operator.
Next record (Roll Up function control
key).
Preceding record (Roll Down function
control key).

•

Prints record if requested.

•

Processes end-of-job request.

•

Reads records from the file.

#DFLS

•

Determines if record is to be listed.

Allocates a printer, if necessary, and prints
new/updated/deleted records.

•

Reads the master file record if necessary.

•

Processes end-of-job request.

e Prints accumulator/control break fields

•

Reads and processes DFU utility control
statements.

•

when control fields change.
#DFEX

#DFFB

•

Allocates a new file for the enter function.

•

Initializes job execution communications
area (COMMON) for update, inquiry, and
list functions.

•

Passes control to the execution module to
process the file.

•

Reads DFU specifications from the work
file.

•

Reads DFU attributes from the work file.

•

Merges DFU attribute/specification
information to create DFU format in the
work file.

#DFMP

3-16

Licensed Material-Property of IBM

•

Prints detail information from record.

•

Allocates and opens the display station
and work file.

•

Initializes the job setup communications
area.

•

Reads from SYS IN and processes the
parameters from the DFU utility control
statement.

•

Reads and processes the records from the
RPG II source member.

•

Builds DFU attributes and writes them
in the work file.

Module
Name
#DFMP
(continued)

#DFOE

#DFOI

#DFOL

#DFSB

Major Functions

Module
Name

Major Functions

•

Prompts for description of related master
file and builds attributes 'for the master
file.

#DFUD

•

Allows the operator to review/change
previous record processed.

•

•
Reads D F U specifications and writes them
in the work file.

Prompts the operator for the key of the
record to update.

•

•
Prompts the operator, checks the syntax
of the responses, and builds DFU specifications from the following enter/update
displays:
- General information
Key field speCification
Record key description
Record type selection
Data field specification

Displays and allows the operator to
change/delete an existing record.

•

•

• Totals accumulator field changes.

#DFUP
Prompts the operator, checks the syntax
of the responses, and builds DFU specifications from the following inquiry
displays:
General information
Key field specification
Record key description
Record type selection
Data field specification
Prompts the operator, checks the syntax
of the responses, and builds DFU specifications from the following list displays:
General information
Record key description
Record type selection
Data field specification
Result field specification
Sort field specification
Control field specification
Select field specification

#DFWS

•

Allocates a printer, if necessary, and
prints new/updated/deleted records.

•

Processes end-of-job request.

•

Displays DFU specifications/attributes,
including any errors diagnosed.

•

Prints DFU attributes/specifications if
requested by operator.

•

Allows the updating, deletion, and addition of DFU specifications.

•

Reads the DFU format from the work file.

•

Creates display station source specifications for enter/update/inquiry functions.

•

Rewrites DFU format in work file with
enter/update/inquiry information inserted.

•

Writes DFU format as a subroutine
member in the library.

Reads DFU and END DFU utility control
• statements.

•

Finds DFU format and determines if
information matches file to be sorted.

•

Creates sort sequence specifications as a
source member in the library to describe
how file is to be sorted.

Data File Utility (DFU)

Licensed Material-Property of IBM

3-17

Data Areas
This section discusses the following data areas used by DFU:
•

Job setup communications area (COMMON)

• Job setup disk work file
•

Additionally, the area is used as an intermediate area for
creating and storing the DFU format, before it is written as
a library subroutine member. This data is written beginning
in the first new sector after the DFU specifications.

DFU format description

• Job execution communications area (COMMON)
~n explanation is provided for the type of data in each
data area. The exact data layout is not provided; rather,
references are made to the module listings (microfiche)
containing the detailed data layout.

JOB SETUP COMMUNICATIONS AREA (COMMON)

Th is area passes information between the job setup
modules and is initialized by the first setup module
(#DFMP). Succeeding setup modules are loaded after the
area, and do not overlay any data in the area. Index
register 1 addresses this area whenever a new job setup
module is loaded. This area contains constants, keyword
translations, work file pointers, display station DTF, and
several subroutines used by all setup modules. The label
COMMON in the following job setup modules can be used
to locate the start of this area:

This disk work file is allocated by the first job setup module
(#DFMP) with a minimum size of 50 sectors, and a maximum size of 500 sectors. The first sector address is found
at the label ATTRFIL, and the first sector past the end of
the work file is found at the label ENDWORKA in the job
setup communications area.

DFU FORMAT DESCRIPTION

The DFU format description (DFU format) is a library subroutine member that describes the current job processing.
A detailed description of the data in the DFU format can
be found starting at the label DFUFORMT in the following
DFU modules:
#DFFB
#DFWS
#DFSB
#DFEX
#DFEI
#DFUD
#DFIN
#DFLS
Generally, the DFU format looks as follows:

#DFMP
#DFOL
#DFOI
#DFOE
#DFUP
#DFDI
#DFFB
#DFWS

• The first sector is the file information sector. It describes
the general characteristics of the job: file description
and file processing. See label DFUFILE for a description
of the file information.

JOB SETUP DISK WORK FILE (DFUWORKA)

The job setup disk work file stores the following information about the current job:
•

DFU attributes-describes the file to be processed (see
ATTRFIL in job setup communications area).

•

DFU specifications-describes the processing to be performed on the file (see DFUFI L in job setup communications area).

• The second sector is the first (or only) sector of the
record information. Each record type in the file to be
processed is described in a record identification entry.
See label DFURTYPE for a description of a record type
entry. Entry RCDFPTR is a pointer to the first sector
of field information for a record.
• The third sector is the first field information sector.
More than one sector can be required to describe the
fields for a given record type. See label DFUFIELD for
a description of the field information entries.

3-18

Licensed Material-Property of IBM

JOB EXECUTION COMMUNICATIONS AREA (COMMON)

This area passes information between the various job execution modules and is initialized by the first job execution
module (#DFEX). Succeeding execution modules are
loaded after the area, and do not overlay any data in the
area. Index register 1 addresses this area whenever a new
job execution module is loaded.
This area contains constants, keywords, control block
pointers, and several subroutines used by all job execution
modules. The label COMMON in the following job execution modules can be used to locate the start of this area.
#DFEX
#DFIN
#DFLS
#DFEI
#DFUD

Data File Utility (DFU)

Licensed

M~terial'7ProJ)erty

of IBM

3-19

Diagnostic Aids
The following list (Figure 3-6) details the message identification codes (MICs) and the modules that diagnose and issue
the displayed error messages (described in the Displayed
Messages Guide). Refer to the DFU Reference Manual
(Appendix B) for a list of printed messages issued while
module #DFMP is diagnosing the RPG II specifications.

3-20

Licensed Material-Property. of IBM

MESSAGES

Message

Module

Message

Module

Message

Module

Message

Module

0001*

#DFEI
#DFUD
#DFEI
#DFEI
#DFEI
#DFUD
#DFIN
#DFLS
#DFEI
#DFUD
#DFEX
#DFEI
#DFUD
#DFIN
#DFLS
#DFUD
#DFIN
#DFEX
#DFEI
#DFUD
#DFIN
#DFEX
#DFEX
#DFSB
#DFEX
#DFSB
#DFEX
#DFSB
#DFMP
#DFSB
#DFEX
#DFIN
#DFSB
#DFEX
#DFIN
#DFEI
#DFUD
#DFEI
#DFEI
#DFUD
#DFUP

0025

#DFUP
#DFMP
#DFEX
#DFEI
#DFUD
#DFLS
#DFIN
#DFUD
#DFIN
#DFIN
#DFIN
#DFEI
#DFUD
#DFLS
#DFEX
#DFEI
#DFIN
#DFUD
#DFSB
#DFEI
#DFMP
#DFMP
#DFMP
#DFMP
#DFOI
#DFOL
#DFOE
#DFUP
#DFDI
#DFOE
#DFDI
#DFOE
#DFDI
#DFOE
#DFDI
#DFOE
#DFOE
#DFOI
#DFDI
#DFDI

0056*

#DFDI
#DFOL
#DFOI
#DFOE
#DFDI
#DFDI
#DFOE
#DFOI
#DFIN
#DFEI
#DFOE
#DFUD
#DFOI
#DFOL
#DFOI
#DFDI
#DFOL
#DFOE
#DFOE
#DFOL
#DFOE
#DFOL
#DFOL
#DFDI
#DFOL
#DFOL
#DFOL
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFOL
#DFOL
#DFDI
#DFOL
#DFDI

0076*

#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFDI
#DFOL
#DFWS
#DFSB
#DFDI
#DFEI
#DFUD
#DFUP
#DFMP
#DFOL
#DFOI
#DFOE
#DFIN
#DFLS
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI

0002*
0003*
Q004

0005*
0006

0007*
0008
0009*

0010
0011
0012
0013
0014

0015
0016
0017*

0018*
0019*
0022

0026*
0029*
0031*
0032*
0033*
0035
0037

0039
0040*
0041
0044
0045
0046

0047*
0048*
0049*
0050*
0051*
0053*
0054*
0055*

0057*
0058*

0059*

0060*

0061*
0062*
0063*
0064*
0065*
0066*
0067*
0068*
0069*
0070*
0071*
0072*
0073*
0074*
0075*

0077*
0078*
0079*
0080*
0081*
0082*
0083
0084
0085
0089

0090*
0111*
0112*
0113*
0114*
0115*
0116*
0117*
0118*
0119*
0120*
0121*
0122*
0123*
0124*
0125*

Note: All messages are SYSLOG messages unless annotated with an asterisk. The asterisked messages are
displayed messages.
Figure 3-6 (Part 1 of 2). DFU Message-to-Module Cross Reference

Data File Utility (DFU)

licensed Material-Property of IBM

3-21

Message

Module

Message

Module

0126*
0127*
0128*

#DFDI
#DFDI
#DFDI
#DFOL
#DFOI
#DFOE
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFUP
#DFDI
#DFDI
#DFDI
#DFDI
#DFMP
#DFDI
#DFMP
#DFMP
#DFOI
#DFOE
#DFOL
#DFFB
#DFMP
#DFOI
#DFOE
#DFOL
#DFUP
#DFDI
#DFFB
#DFWS
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
Procedures
Procedures
Procedures

0205
0206

Procedures
Procedures
#DFMP
Procedures
Procedures
Procedures
Procedures
#DFMP
#DFMP
#DFOL
#DFOI
#DFOE
#DFUP
#DFEI
#DFUD
#DFIN
#DFMP
#DFOL
#DFOE
#DFOI
#DFUP
#DFEI
#DFUD
#DFIN
#DFSB
#DFMP
#DFEX
Procedures
#DFMP
#DFMP
#DFMP
#DFMP
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
#DFDI
Procedures
Procedures
Procedures
Procedures
#DFDI
#DFEX
#DFEX
#DFEX
#DFEX
#DFDI
#DFLS

0129*
0130*
0131*
0132*
0133*
0134*
0135*
0136*
0137*
0139*
0141 *
0142*
0143
0145*
0146*
0152*
0161*
0162
0163*
0164
0167

0169

0172*
0174*
0181*
0182*
0183*
0188*
0189*
0201
0203
0204

0209
0212
0214
0216
0217

0218

0224

0254*
0255*
0256*
0258*
0259*
0264*
0265*
0266*
0269*
0270*
0275
0276
0277
0278
0280*
0281
0282
0283
0284
0286*
0289

Message

0290
0291*

Module
Procedures
#DFDI

Note: All messages are SYSLOG messages unless annotated with an asterisk. The asterisked messages are
displayed messages.
Figure 3-6 (Part 2 of 2). DFU Message-to-Module Cross Reference
3-22

Licensed,. !Y1aterial-Prop~rty of IBM

PROCEDURES
The following procedures are invoked by DFU when the
applicable commands are entered.

Enter Procedure
When the ENTER command is entered, DFU invokes the
following procedure.

* ENTER FILENAME,FORMAT,RPGNAME,# REC,DATA TYPE,CATL,LIBNAME"USERLIB,DISPLAY
II MEMBER PROGRAM1-#DF#MG
II MEMBER USER1-#DF#MG
II IFF ?5'D'?/D #ERR 0201,C,DFU
II IF DATAF1-?lR'0202'? #ERR 0203,C,DFU
II IFF ?9'#LIBRARY'?I#LIBRARY IFF DATAF1-?9? #ERR 0224,C,DFU
II IF INQUIRY-NO IF ?11'1'?1 *
II ELSE IF ?11'2'?1 *
II IF ?2?1 * 0261
II IF ?2R'0262'?1 #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,E,#DF?WS??11?
II ELSE IFF SUBR-'?2?,?9?' #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,E,#DF?WS??11?
II IFF ?2?1 IFF LOAD-'?2?,?9?' #ERR 0278,C,DFU
II LOAD #DFEX
I I FILE NAME-#DFDATA, LABEL.-? 1?, DISP-NEW, RETAIN-P, RECORDS-?4R' 0207'?
II RUN
II DFU FL-?1?,FT-?2?,LB-?9?,DF-#DF?WS??11?,UT-E
II END
II LOAD #DFEX
II FILE NAME-#DFDATA,LABEL-?l?,DISP-SHR,RETAIN-P
II RUN
II DFU FL-?1?,FT-?2?,LB-?9?,DF-#DF?WS??11?,UT-U
II END
II IFF ?2?1 RETURN
II LOAD $MAINT
II RUN
II DELETE NAME-#DF?WS??11?,LIBRARY-ALL,LIBRNAME-?9?
II END

FORMAT SOURCE NAME

Data File Utility (OFU)

Licen'sed Material-Property of IBM

3-23

Update Procedure
When the UPDATE command is entered, DFU invokes the
following procedure.

* UPDATE FILENAME,FORMAT,RPGNAME"DATA TYPE",CATL,LIBNAME"USERLIB,DISPLAY FORMAT
II MEMBER PROGRAM1-#DF#MG
II MEMBER USER1-#DF#MG
II IFF ?5'D'?/D #ERR 0201,C,DFU
II IFF DATAF1-?lR'0208'? #ERR 0209,C,DFU
/
II IFF ?9'#LIBRARY'?I#LIBRARY IFF DATAF1-?9? #ERR 0224,C,DFU
II IF INQUIRY-NO IF ?11'1'?1 *
II ELSE IF ?11'2'?1 *
II IF ?2?1 * 0261
'
II IF, ?2R'0262'?1 #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,U,#DF?WS??11?
II ELSE IFF SUBR-'?2?,?9?' #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,U,#DF?WS??11?
II IFF ?2?1 IFF LOAD-'?2?,?9?' #ERR 0278,C,DFU
II LOAD #DFEX
II FILE NAME-#DFDATA,LABEL-?l?,RETAIN-P,DISP-SHR
II RUN
II DFU FT-?2?,UT-U,DF-#DF?WS??11?,LB-?9?,FL-?1?
II END
II IFF ?2?1 RETURN
II LOAD $MAINT
II RUN
II DELETE NAME-#DF?WS??11?,LIBRARY-ALL,LIBRNAME-?9?
II END

SOURCE NAME

Inquiry Procedure
When the INQUI RY command is entered, DFU invokes the
following procedure.

* INQUIRY FILENAME,FORMAT,RPGNAME"DATA TYPE,CATL,LIBNAME"USERLIB,DISPLAY FORMAT SOURCE NAME

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

MEMBER PROGRAM1-#DF#MG
MEMBER USER1-#DF#MG
IFF ?5'D'?/D #ERR 0201,C,DFU
IFF DATAF1-?lR'0210'? #ERR 0209,C,DFU
IFF ?9'#LIBRARY'?I#LIBRARY IFF DATAF1-?9? #ERR 0224,C,DFU
IF INQUIRY-NO IF ?11'1'?1 *
ELSE IF ?11'2'?1 *
IF ?2?1 * 0261
IF ?2R'0262'?1 #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,I,#DF?WS??11?
ELSE IFF SUBR-'?2?,?9?' #DFMP ?1?,?2?,?3?,?10?,?6?,?7?,,?9?,I,#DF?WS??11?
IFF ?2?1 IFF LOAD-'?2?,?9?' #ERR 0278,C,DFU
LOAD #DFEX
FILE NAME-#DFDATA,LABEL-?l?,RETAIN-P,DISP-SHR
RUN
DFU FT-?2?,UT-I,LB-?9?,DF-#DF?WS??11?,FL-?1?
END
IFF ?2?1 RETURN
LOAD $MAINT
RUN
DELETE NAME-#DF?WS??11?,LIBRARY-ALL,LIBRNAME-?9?
END

3-24

Licensed Material-Property of IBM

List Procedure

When the LIST command is entered, DFU invokes the following procedure.

*

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

LIST FILENAME,FORMAT,RPGNAME,SORT/NOSORT,DATA TYPE,CATL,LIBNA~~,MASTERNAME,USERLIB
MEMBER PROGRAM1-#DF#MG
MEMBER USER1-#DF#MG
IFF ?5'D'?/D #ERR 0201,C,DFU
IFF DATAF1-?lR'0211'? #ERR 0209,C,DFU
IFF ?8?1 IFF DATAF1-?8? #ERR 0290,C,DFU
IFF ?9'#LIBRARY'?I#LIBRARY IFF DATAF1-?9? #ERR 0224,C,DFU
IFF ?4R'0274'?1 ,IFF ?4?/NOSORT IFF ?4?/SORT #ERR 0212,C,DFU
IF INQUIRY-NO IF ?11'1'?1 *
ELSE IF ?11'2'?1 *
IF ?2?1 * 0261
IF ?2R'0262'?1 #DFMP ?1?,?2?,?3?,?4?,?6?,?7?,?8?,?9?,L,#DF?WS??11?
ELSE IFF SUBR-'?2?,?9?' #DFMP ?1?,?2?,?3?,?4?,?6?,?7?,?8?,?9?,L,#DF?WS??11?
IF ?4'NOSORT'?/SORT IF JOBQ~NO #DFST ?1?,?27A78?~?9?A#DP?WS??11?
ELSE IF ?4?/SORT #DFST ?1?,?2?,?8?,?9?,#DP?W~?3·
.
IF JOBQ-NO * 0223
LOAD #DFEX
FILE NAME-#DFDATA,LABEL-?l?,RETAIN-P,DISP-SHR
IF ?4?/SORT FILE NAME-#DFTAG,LABEL-#DFTAG,BETAIN-S
IFF ?8?1 FILE NAME-#DFMAST,LABEL-?8?,RETAIN-P,DISP-SHR
RUN
DFU FT-?2?,DS-?4?,MF-?8?,LB-?9?,UT-L,DF-#DF?WS??11?
END
IFF ?2?1 RETURN
LOAD $MAINT
RUN
DELETE NAME-#DF?WS??11?,LIBRARY-R,LIBRNAME-?9?
END

Data File Utility (DFU)

Licensed Material-Property of.! 8M

3-25

#DFMP Procedure
#DFMP is invoked by DFU when DFU must enter the
setup step.

* #DFMP FILENAME,FORMAT,RPGNAME,SORT/NOSORT/DISPLAY SOURCE,CATL,LIBNAME,MASTERNAME,USERLIB,UTILTYPE,DEFAULT NAME

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

IFF ?9?/L IFF ?2?1 IF LOAD-'?2?,?8?' #ERR 0276,C,DFU
IFF ?9?/L IFF ?4?1 IF SOURCE-'?4?,?8?' #ERR 0277,C,DFU
IFF ?5'NN'?/NN IFF ?5?/NY IFF ?5?/YN IFF ?5?/YY IFF ?5?/GO #ERR 0205,C,DFU
IFF ?5?/NN IF ?6?1 #ERR 0214,C,DFU
IFF ?5?/NN IFF ?5?/NY IFF SOURCE-'?6?,?8?' #ERR 0206,C,DFU
IF ?5?/NY IF SOURCE-'?6?,?8?' #ERR 0204,C,DFU
IFF ?9?/L IFF ?4?1 IF ?4?1?6? #ERR 0275,C,DFU
IFF SOURCE-'?3R'0215'?,?8?' #ERR 0216,C,DFU
LOAD #DFMP
WORKSTN RESTORE-YES,UNIT-?WS?
RUN
DFU FL-?1?,FT-?2?,RG-?3?,DS-?4?,SP-?5?,SN-?6?,MF-?7?,LB-?8?,UT-?9?,DF-?10?
END
IF ?9?/L RETURN
LOAD $SFGR
RUN
IF ?2?1 LOADMBR NAME-?10?,REPLACE-YES
ELSE LOADMBR NAME-?2?
INOUT PRINT-NO,INLIB-?8?,OUTLIB-?8?
IF ?4?1 CREATE SOURCE-?10?,NUMBER-32
ELSE CREATE SOURCE-?4?,NUMBER-32
END
IFF ?4?1 RETURN
LOAD $MAINT
RUN
DELETE NAME-?10?,LIBRARY-S,LIBRNAME-?8?
END

#DFST Procedure
DFU invokes this procedure when modules are required for
a list with sort.

* #DFST FILENAME,FORMAT,MASTER NAME,USER LIBRARY,DEFAULT NAME
IF JOBQ-NO * 0219

II
II
II
II
II
II
II
II
II
II'
II
II
II
II

LOAD #DFSB
RUN
DFU FL-?1?,FT-?2?,MF-?3?,LB-?4?,DF-?5?
END
LOAD #GSORT
FILE NAME-INPUT,LABEL-?l?,DISP-SHR
FILE NAME-OUTPUT,LABEL-#DFTAG,RETAIN-J,BLOCKS-10
RUN
SOURCE ?5?,?4?
LOAD $MAINT
RUN
DELETE NAME-?5?,LIBRARY-S,LIBRNAME-?4?
END

3-26
\.

..

.

Licensed Material-Property of IBM

DFUDROP Procedure
DFU invokes this procedure when requested to delete DFU
from a specified library.

*

S726-UT1 COPYRIGHT IBM CORP 1977 LICENSED MATERIAL - PROGRAM PROPERTY OF IBM

* DFUDROP USERLIB

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

MEMBER PROGRAM1-#DF#MG
MEMBER USER1-#DF#MG
IF JOBQ-NO * 0221
LOAD $MAINT
RUN
DELETE NAME-ENTER,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-UPDATE,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-INQUIRY,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-LIST,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-DFUSAVE,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-DFULOAD,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-#DF.ALL,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-#DF.ALL,LIBRARY-O,LIBRNAME-?l'#LIBRARY'?
DELETE NAME-DFUDROP,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
END

DFULOAD Procedure
DFU invokes this procedure when requested to load DFU
into a specified library.

II
II
II

MEMBER PROGRAMl-#DF#MG
MEMBER USERl-#DF#MG
IF JOBQ-NO * 0222

DFUSAVE Procedure
DFU invokes this procedure when requested to save DFU
on diskette.

* DFUSAVE USERLIB-NAME

II
II
II
II
II
II
II
II
II
II
II
II
II
II
II
II

MEMBER PROGRAMl-#DF#MG
MEMBER USERl-#DF#MG
IF JOBQ-NO * 0220
LOAD $MAINT
FILE PACK-PPUTIL,UNIT-Il,RETAIN-999,NAME-DFU
RUN
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-DFUDROP,LIBRARY-P
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-ENTER,LIBRARY-P,ADD-YES
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-UPDATE,LIBRARY-P,ADD-YES
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-INQUIRY,LIBRARY-P,ADD-YES
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-LIST,LIBRARY-P,ADD-YES
COpy FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-DFUSAVE,LIBRARY-P,ADD-YES
COPY FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-DFULOAD,LIBRARY-P,ADD-YES
COPY FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-#DF.ALL,LIBRARY-P,ADD-YES
COPY FROM-?l'Fl'?,TO-DISK,FILE-DFU,NAME-#DF.ALL,LIBRARY-O,ADD-YES
END
Data File Utility (DFU)

Licensed Material-Property of IBM
.'

'I

•• '

3-27

3-28

Licensed Material-Property of IBM

Chapter 4. Source Entry Utility

Introduction

PHYSICAL CHARACTERISTICS

The source entry utility (SEU) portion of the Utilities
Program Product is used to create and maintain source and
procedure members in System/34 libraries. SEU operates
in five modes:

SEU is composed of 32 load members, four procedure
members, two source members, and 16 expansion buffers.

Load Members
G

Enter/update, to enter and change statements under
control of display screen formats.

•

Delete, to delete statements from members.

•

Move, to move statements within a member.

•

#SEU-common. #SEU contains the following routines,
and must not be overlaid:
SEUPNT-printer interface
SEUKEY -display station interface
SEUDM-work file data management
SEUMSG-warning message

o Include, to include statements in a member from another
or from the same member.

o #SEIN-initialization

o Scan, to scan a member for a particular statement.

o #SELL-Roll t (Roll Up), Roll -l- (Roll Down), and
search end of source interface.

HOW THE PROGRAM WORKS

o #SEDX-work file data management for deleting statements, counting statements, and chaining new index
sectors to the index area in the work file.

The operator signs on SEU by entering the SEU command.
Parameters in the command specify, either explicitly or by
default: member name, member type, format member
name, statement length, and library name.
After sign-on, SEU is in the enter/update mode. The
operator can select a different mode by pressing one of the
SEU command function keys. The operator requests
specific functions in each mode by entering responses to
the SEU prompts and by pressing command function keys.

•

Mode execution:
#SEET -enter/update
#SEDL-delete
#SEMV-move
#SEIC and #SEID-include
#SEAN-scan

G

Syntax checkers for RPG II and auto report specifications:
#SERA, #SERB, #SERC, and #SERD-calculation
#SERE-control, option, copy, extension, and line
counter
#SERF, #SERG, and #SERH-file description
#SERI and #SERJ-input
#SE R L-extension
#SERO and #SERP-output
#SERT and #SERU-telecommunications

•

#SEED and #SEEJ-SEU end of job.

•

#SE@FMT-display screen formats for SEU prompts and
messages.

Data entered and changes made by the operator are stored
in the SEU work file until SEU end of job. The SEU work
file is a disk work area labeled #SEU#.nn, where nn is the
ID of the SEU operator's display station. At normal SEU
end of job, the contents of the work file are copied to the
library identified by the SEU command, and the work file
is deleted.

Source Entry Uti I ity

Licensed' Material-:...Property ofl BM

4-1

o #SE@FORM and #SE@XTRA-supplied display screen
formats for entering and updating statements.
o #SE#M 1 and #SE#M2-level 1 and level 2 messages,
respectively.
The control flow between load members is illustrated in
Program Organization, in this chapter. An alphabetical
listing of member names with a short description of each
member is contained in Directory, in this chapter.

•

A new or changed member in the specified library.

•

Required messages.

•

Selected printed statements if the pript option is used.

•

A listing of the new or changed member if a listing is
requested.

I/O STORAGE REQUIREMENTS

Procedure Members
SEU
SEUDROP
SEULOAD
SEUSAVE

Output from SEU is:

SEU requires 14K (14,336) bytes of main storage.

signs on SEU.
deletes SEU from a library.
issues a load message.
saves SEU on a diskette.

SYSTEM CONFIGURATION

The contents of the procedure members are listed in the
Program Organization section of this chapter.

SEU runs on all models of System/34.

Sou rce Members
#SE@FORM and #SE@XTRA contain the display screen
format specifications that define the display screen formats
supplied with SEU.

Expansion Buffers
So that SEU remains a fixed size, SEU contains 16 expansion buffers to absorb any increase in code caused by
changes to SEU. The buffers are labeled #SESO through
#SES15.

INPUT/OUTPUT
After the operator signs on SEU, input to the program
consists of:
., A copy of the selected member in the SEU work file
if the member already exists in a library.
o

Responses to SEU prompts.

o

Data entered from the keyboard if the operator enters
or updates statements.

4-2

Licensed Material-Property of. I8M

Method of Operation

From: System

~OCESS

INPUT

Library members

__

.

fJ Processing, Diagram 4·3.

II End of Job, Diagram 4-4.

I

~

!IJ

OUTPUT . ._~_

Disk: New or updated
library member

-----:il

To: System

Diagram.4·1. SEU Overview

Source Entry Utility

Licensed Material-Property of IBM

4·3

From: Common Routine
(#SEU)

II INPUT _ _ _ __

Keyboard: SEU

Main storage: Names
of SEU routines

Main storage: Preopen disk DTF

Main storage: Postopen disk DTF
Disk: Work file

Disk: Member to
be processed

I

D Reads and diagnoses the SEU control

~:::::::::::::::::::::::::::::~>

fJ locates all the needed SEU routines.
D Finds the names of the display screen

I

-I->

P=>

f1b
J >
1

-=---~>

r

SEU communications
area: Parameter lists
.-~_.Joo~> for SEU routines1
...

-->

Disk: SEU procedure

Disk: Member to
be processed

~UTPUT

]

~~~e::~~sor DCl

Disk: Display screen
formats

~OCESS

statements.

I

Display screen: Name
of routine not found

.....

-~

r

formats in the first two sectors of the
format load member and determines
which ones are valid.

n~ Main

storage: Post-

1i.I-,/" open disk DTF

II Finds the member to be processed and
determines how many statements are in
the member.
g"Allocates and opens the work file.

raJ If the run is a recovery run, rebuilds the

===;>m

work file. Then exits to enter/update.

o

Writes the work file record.

D If the member exists in the library, copies
the statements into the work file.

D

I

0

To: Enter/Update
(#SEET)

Diagram 4-2 (Part 1 of 2). Initialization

4-4

Licensed Material-Property of IBM

Disk: Work file

MODULE!
ROUTINE

OEseR IPTION

D

Reads, by way of SYSIN, the SEU control statements SEU NAME-... and END. Diagnoses the two statements.
If either is in error, calls SYSLOG to issue a message and cancels the job. SYSIN and SYSLOG are described
in the publication SSP Logic System.

fJ

#SEIN

Finds the SEU routines. Builds parameter lists for loading the routines and saves the parameter lists in the
SEU communications area. If a routine is not found, calls SYSLOG to issue an error message and cancels
the job.

II

Finds directory entries for the format load member(sl. Finds in the first two sectors of the format member(s)
indexes of the display screen formats and determines which formats are valid. The format length of valid
formats must be equal to or greater than 1, and equal to or less than 120. The indexes of valid formats are
saved by #SEIN.

II

Finds the member to be processed and determines the number of statements in the member. If the member
is not found, initialization assumes the member will be created.

II Allocates and opens the work file.

Calculates the start and end extents of the index for the work file, and
calculates the start and end extents of the statement area.

m

If the job is a recovery run, rebuilds the index from the statement area. Also determines whether or not the
parameters in the SEU command for the recovery run are the same as the parameters saved in the work file
record (the work file record is described in Data Areas, in this chapter!. If the parameters are not the same,
calls SYSLOG to issue an error message and cancels the job. When the work file is rebuilt, passes control to
enter/update (#SEET).

IJ Creates the work file record and writes it to the work file.

iii If the job is not a recovery run and the member to be processed exists, calls the source library get routine
(#MASGT) to copy statements from the member to the work file. The source library get routine is described
in the publication SSP Logic: System.

Diagram 4-2 (Part 2 of 2). Initialization

Source Entry Utility

Licensed Material-Property of IBM

4-5

From: Initialization (Diagram 4-2) or
Display Station Interface
(SEUKEY) in Common Routine
(#SEU)

INPUT - - - - . .
Disk: Format load
member(s)

I

r

~~

I V

.....:----1'.....

D

Enters/updates statements. Goes to step
2, 3, 4, or 5 or exits to SEU end of job.

Keyboard:
•

Data

•

Function
control keys

•

II Deletes statements.

Goes to step 1, 3, 4,
or 5 or exits toSEU end of job.

o

II Moves statements.

IJ

o

IJI

Goes to step 1, 2, 4,
or 5 or exits to SEU end of job.

Command
function keys

Disk: Work file
Disk: Include
member(s)

OUTPUT _ _ __

PROCESS

Includes statements. Goes to step 1,2,
3, or 5 or exits to SEU end of job.

IIScans statements. Goes to step 1,2,3,
or 4 or exits to SEU end of job.

Printer: Printed
statements
Display screen:
Prompts and
messages
Disk: Updated
work file

Display screen:
Prompts and
messages

To: SEU End of Job
(Diagram 4-4)

MODULE/
ROUTINE

DESCRIPTION

D

D

D

a

Enter/update allows the operator to enter new statements into a member and to update existing statements
in a member. Statements are entered or updated under control of display screen formats. If the member·
type specified in the SEU command is A or R, SEU can check·the syntax of statements entered or updated
under control of the supplied RPG II or auto report formats. Statements that are entered or updated can
also be printed.

#SEET

Delete allows the operator to delete statements from a member. If no statements exist in the member, the
delete mode is not allowed. Statements that are deleted can also be printed.

#SEDL

Move allows the operator to move statements from one location in a member to a new location in the same
member. The statements are deleted from the original location. If no statements exist in the member, the
move mode is not allowed. Statements that are moved are not printed.

#SEMV

Include allows the operator to include existing statements in the member being processed. Statements are
included from a source or procedure member that exists in a library. Statements that are included can also
be printed.

#SEIC

m

Scan searches a member for a statement that contains a string of characters specified by the operator. If no
statements exist in the member, the scan mode is not allowed.

Diagram 4-3. Processing

4-6

Licensed Material-Property of IBM

#SEAN

•
•
•
•
INPUT _ _ _•__

OUTPUT -_a..RJO

Keyboara:

•

Response

•

Function
control keys

Display screen:
Prompts and
messages

J--=---'

Main storage: Preopen disk DTF
Disk:
•

Work file record

o Work file
•

Work library

Ellssues additional prompts for serialization
and for procedure members. Checks all
responses.
Main storage: Postopen disk DTF

D Allocates a work library for compressed
statements.

o

Disk: Work library

Creates a directory entry for the member.

DUses the library record put routine to copy
statements from the work file to the
work library.

]J

II Uses the library sector get/put routine to
Keyboard: Response _....,.-_--"

Disk: Replaced
member

copy the member from the work library
to a library.

Printer: Listing
Disk: Work file
VTOC entry

BPrints st'.ltements if a listing is requested.
Disk: Work file VTOC
entry

BReleases the space occupied by the
work file.

--------:il

SSP Termination
Interface
(#CTEIF)

Diagram 4-4 (Part 1 of 2). End of Job

Source Entry Utility

Licensed Material-Property of IBM

4-7

MODULE/
ROUTINE

OEseR IPTION

D
fJ

Displays end-of-job options 0 through 5. Checks the validity of the response.

#SEEO

If serialization is requested (end-of-job option 3 or 4) and the member in the work file contains statements,
end of job issues additional prompts and checks the val idity of each response:

#SEEJ

•

If the member in the work file is not a procedure member (member type not P) and the statement length of
the member is 80 or more, end of job prompts for an indication of program name duplication.

•

End of job prompts for a serial start position.

•

If the member in the work file is a procedure member (member type PI, end of job prompts for options
related only to procedures .

.lEI Calculates size of work library and requests work library space to contain the statements in the work file
after the statements are compressed.

II Creates a directory entry for the member that was created or changed during the job.
iii Uses the library record put routine ($MAPUR) to move statements one at a time from the work file to the
work library. Statements are compressed. they are moved. If serialization is requested, statements are
serialized as they are placed in the work' Jrary. The library record put routine is described in the publication SSP Logic: System.

m

Uses the library sector get/put rout;'; ($MAPGS) to copy the member from the work libra' ~'l the library
specified by the SEU command. Tile library sector get/put routine is described in the PUI:".1l _•.• on SSP
Logic: System.

IJ If a listing is requested, uses the printer data management routine (#DPDM) to list statements from the
work file (if serialization is also requested, serializes the statements before printing them). Statements are
printed after they are copied to the library specified by the SEU command.

o

Changes the retain status of the work file from T to S.

Diagram 4-4 (Part 2 of 2). End of Job

4-8

Licensed Material.;...Property of IBM

Program Organization
This section illustrates control flow between SEU members
for SEU sign-on and SEU operation. Figure 4-1 illustrates
sign-on, and Figure 4-2 illustrates operation.

SEU command

SEU procedure

j
#SEU

j
#SEIN

j
#SEET

I
(

operation)

Figure 4-1. Control Flow for SEU Sign-On

Source Entry Utility

Licensed Material-Property of IBM

4-9

#SEET

#SEDL

-

-

#SEMV

#SEIC

#SEAN

#SE@FORM,
#SE@XTRA,
and user·
created format
members

Called as required; return is to caller

#SEEO
#SE#M 1, #SE@FMT
as required
#SERE]
#SERL
#SERF
-#SERG

#SEEJ -

J

#SERHJ
Return to
system

#SERIJ
#SERJ,-

:::~?;]J
#SERA
#SERD
-#SERO]
#SERP
#SERTJ
#SERU

Return

Figure 4·2. Control Flow for SEU Operation
4·10

Licensed Material-Property of IBM

-

-

#SE@FMT, #SE#M1
as required

Directory

Module
Name

Module
Name

Major Functions

#SE#M1

Contains level 1 messages issued by SEU.

#SE#M2

Contains leyel 2 messages issued by SEU.

#SE@FMT

Contains display screen formats for SEU
prompts and messages.

#SE@FORM

Contains the SEU-supplied free-form
formats and SEU-supplied display screen
formats for display screen format, RPG II
and auto report, and work station utility
specifications.

#SE@XTRA

Contains SEU-supplied display screen
formats for assembler, magnetic
character reader, sort, and FORTRAN
IV specifications.

#SEAN

Scans a member for a statement that
contains a specified character string.

#SEU

Loads the SEU communications area
and the four main storage resident
routines (SEUDM, SEUKEY, SEUMSG,
and SEUPNT).

#SEDL

Deletes statements from the member
being worked on.

#SEDX

Performs the following data management
operations on the SEU work file: deletes
statements, counts statements, and chains
new index sectors to index.
Checks and reformats statement number
responses.

#SEEJ

#SEED

Copies the statements from the SEU
work file into the library member. Performs statement serialization, program
name duplication, and member listing
as requested. Deletes the SEU work file.
Allocates a printer to SEU if printing is
requested, changes the number of display
screen lines per statement, displays the
command function key display, and
displays and handles the response to the
end-of-job options.

Major Functions

#SEET

Enters statements into the member or
updates statements that already exist in
the member. Retrieves selected display
screen formats. If print option is on,
uses printer data management (#DPDM)
to print statements.

#SEIC

Includes statements from a member in a
library into the member being worked on.
Performs roll up and search end of source
functions for include members. If print
option is on, uses printer data management (#DPDM) to print statements.

#SEID

Checks responses to INCLUDE
LIBRARY NAME and INCLUDE
MEMBER NAME. Changes the roll
factor.

#SEIN

Initializes variables and diagnoses the
SEU control statements. If it already
exists, copies the member being worked
on into the work file from the library.

#SELL

Performs roll up, roll down, and search
end of source functions on all members
except include members.

#SEMV

Moves statements to a new location and
deletes them from their old location in
the member being worked on.

#SERA

Continues syntax-checking RPG II
calculation specification (phase 3 of 4).
Syntax checks all specifications that have
a slash (/) in position 7.

#SERB

Continues syntax-checking RPG II
calculation specification (phase 2 of 4).

#SERC

Syntax checks RPG II calculation
specification (phase 1 of 4).

#SERD

Continues syntax-checking RPG II
calculation specification (phase 4 of 4).

#SERE

Syntax checks RPG II control, extension,
and line counter specifications; and auto
report option and ICapy specifications
(phase 1 of 2).

Source Entry Utility

Licensed Material-Property of IBM

4-11

Module
Name

Major Functions

#SERF

Syntax checks RPG II file description
specification (phase 1 of 3).

#SERG

Continues syntax-checking RPG II file
description specification (phase 2 of 3).

#SERH

Continues syntax-checking RPG II file"
description specification (phase 3 of 3).

#SERI

Syntax checks RPG II input specification
(phase 1 of 2).

#SERJ

Continues syntax-checking RPG II input
specification (phase 2 of 2).

#SERL

Continues syntax-checking RPG II extension specification (phase 2 of 2).

#SERO

Syntax checks RPG II output specification (phase 1 of 2).

#SERP

Continues syntax-checking RPG II output
specification (phase 2 of 2).

#SERT

Syntax checks RPG II telecommunications specification (phase 1 of 2).

#SERU

Continues syntax-checking RPG II telecommunications specification (phase 2
of 2).

#SESO through
#SES15

Reserve space for expansion.

SEUDM

Performs data management functions for
the SEU disk work file.

SEUKEY

Provides SEU with an interface to the
display station.

SEUMSG

Retrieves messages needed by SEU from
#SE#M 1 and #SE#M2.

SEUPNT

Provides SEU with an interface to the
printer.

4-12

Licensed Material-Property of IBM

Data Areas

Work File Record

This section describes the SEU communications area and
the SEU work file, both of which are used by more than
one SEU module. For a detailed description of field
contents of all SEU data areas, see the SEU microfiche.
For a description of system data areas used by SEU, see the
Data Areas and Diagnostic Aids Handbook.

SEUWBEXT in the SEU communications area contains the
3-byte disk address·of the start of the work file record. The
work file record, which is initialized by #SEIN, occupies
the first six sectors of the SEU work file.

COMMUNICATIONS AREA
The SEU communications area contains constants, variables,
pointers, keywords, and OTFs that are used by more than
one SEU module. The communications area is initialized
by #SEU and is included in each executable SEU load
member. The communications area is 3328 (hex 0000)
bytes long and begins in main storage at label SEUINCOM.

WORK FILE
The SEU work file is organized as follows:
Work File Record

Index Area

Always 6 sectors

Variable length

Data Area

Variable length

The first sector contains information about the SEU job.
This information is required for recovery of the work file
in the event of a system failure. The sector definition
begins in the load member #SEIN at SINWABUF, and in
the load member #SEEJ at SEJWABUF.
The second sector of the work file record contains index
values for all displays shown on the display screen by each
of the five SEU modes. The sector definition begins in the
load member #SEET at SSFUBBF.
The last four sectors of the work file record contain index
values for the display screen formats available for entering
and updating statements. The values refer to display
screen formats in #SE@FORM and, if the member is
specified in the SEU command,,#SE@XTRA or a format
member created by the user. The four sectors can contain
a maximum of 64 index values (64 is the maximum
number of statement display screen formats available for
one SEU job). The definition of the four sectors
begins in the load member #SEET at SSFUBBF.
Labels and contents of the work file record are summarized
in the following illustration.

Source Entry Utility

Licensed Material-Property of IBM

4-13

SINWABUF in #SEIN
SEJWABUF in #SEEJ

Job Information
for Recovery

SINWA2 in #SEIN

Index Values for
SEU Mode
Displays

SSFUBBF in #SEET

Index Values for Enter/Update Display Screen Formats

Index Area
The index area in the SEU work file contains an index of
the statements in the work file data area. The following
fields in the SEU communications area identify and define
the index area:
• SEUXBEXT-Contains the 3-byte disk address of the
start of the index area.
• SEUXLEXT-A one-byte field that identifies the
number of sectors in the index area.
• SDMXSECT -A 256-byte definition of each sector in
the index area.

Data Area
The data area in the SEU work file contains one record for
each statement in the member being created or changed.
Each record contains a packed statement number and one
statement. The following fields in the SEU communications area identify the data area:
• SEUDBEXT-Contains the 3-byte disk address of the
start of the data area.
• SEUDLEXT-A one-byte field that identifies the number
of sectors in the data area.

4-14

Licensed Material-Property of IBM

Diagnostic Aids
This section presents diagnostic information unique to SEU.
Diagnostic aids common to all of System/34 are described
in the Data Areas and Diagnostic Aids Handbook.

MESSAGES

Figures 4-3 and 4-4 relate all SEU message identification
codes (MI Cs) to the SEU modules that diagnose error conditions. Messages from the syntax checkers are described in
the SEU Reference Manual. All other messages are described
in the Displayed Messages Guide.

MIC

Diagnosing Module

MIC

Diagnosing Module

0101
0102
0103
0104
0105
0106
0201
0204
0301
0302
0305
0307
0309
0313
0315
0327
0435
0436
0437
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510

SEU procedure
SEU procedure
SEU LOAD procedure
SEU procedure
SEUDROP procedure
SEUSAVE procedure
SEU procedure
SEU procedure
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN
#SEDL
#SEMV
#SEIC
#SEET
#SEDL, #SEET, #SEIC, #SEMV
#SEDL, #SEMV
#SEDL
#SEMV
#SEMV
#SEMV
#SEET
#SEET
#SEAN, #SEDL, #SEEJ, #SEET,
#SEIC, #SEID, #SEMV
#SEIC, #SEID
#SEIC
#SEIC
#SEIC
#SEIC
#SEIC

0517
0518
0519
0522
0523
0524
0525
0526
0528
0530
0531
0533
0538
0539
0540
0543
0544
0545
0546
0549
0550
0552
0553
0555
0558
0561
0562
0564
0565
0566
0567
0568
0569
0570
0571

#SEET
#SEET
#SEID
#SEEJ
#SEEO
#SEEJ
#SEEJ
#SEEJ
#SEEO
#SEMV
#SEET
#SEID
#SEIN (issued by SYSLOG)
#SEIN
#SEID
#SEIN
#SEIN
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEEJ (issued by SYSLOG)
#SEEJ (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEIN (issued by SYSLOG)
#SEEJ
#SEET
#SEEO (issued by SYSLOG)
#SEEO (issued by SYSLOG)
#SEIN
#SEAN
#SEAN
#SEAN
#SEAN
#SEAN, #SEET
#SEEJ
#SEEO

0511
0512
0513
0514
0515
0516

Figure 4-3. Level 1 Messages for SEU
Source Entry Utility

Licensed Material-Property of IBM

4-15

MIC

Diagnosing Module

MIC

Diagnosing Module

0307
0309
0313
0315
0538
0545
0546
0550
0552
0553
0561
1001
1002

#SEIN
#SEIN
#SEIN
#SEIN
#SEIN
#SEIN
#SEIN
#SEEJ
#SEIN
#SEIN
#SEED
#SEET, #SERA
#SERE, #SERF, #SERI, #SERD,
#SERT
#SERA
#SERE
#SERF, #SERH
#SERG
#SERG
#SERG
#SERG
#SERH
#SERH
#SERG
#SERH
#SERH
#SERH
#SERH
#SERG
#SERF
#SERF
#SERH
#SERG
#SERG
#SERG
#SERG
#SERH
#SERH
#SERH
#SERH
#SERH
#SERH
#SERG
#SERH
#SERH
#SERF
#SERF
#SERF
#SERE
#SERE
#SERE
#SERL

1205
1206
1207
1208
1209
1210
1251
1252
1301
1302
1303
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1401
1402
1403
1404
1405
1406
1407
1408
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1501
1502
1503
1504
1505
1506
1507

#SERL
#SERL
#SERL
#SERE
#SERL
#SERL
#SERE
#SERE
#SERT
#SERT
#SERT
#SERT
#SERT
#SERU
#SERU
#SERU
#SERU
#SERT
#SERT
#SERU
#SERU
#SERT
#SERT
#SERT
#SERI
#SERI, #SERJ
#SERI
#SERJ
#SERJ
#SERI
#SERJ
#SERJ
#SERI
#SERJ
#SERJ
#SERJ
#SERJ
#SERD
#SERJ
#SERJ, #SERP
#SERJ
#SERI
#SERI
#SERI
#SERD
#SERD
#SERB, #SERC
#SERB,#SERC
#SERB, #SERC
#SERC, #SERD
#SERA,#SERB,#SERD

1009
1081
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1132
1133
1134
1201
1202
1203
1204

Figure 4-4 (Part 1 of 2). Level 2 Messages for SEU
4-16

Licensed Material-Property of IBM

MIC

Diagnosing Module

1508
1509
1510
1511
1512
1513
1514
1515
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612

#SERB, #SERD
#SERB
#SERA
#SERA
#SERA
#SERA
#SERA
#SERA
#SERO
#SERO
#SERO
#SERO
#SERP
#SERO, #SERP
#SERO
#SERP
#SERO
#SERO
#SERO
#SERP

Figure 4-4 (Part 2 of 2). Level 2 Messages for SEU

Source Entry Utility

Licensed Material-Property of IBM

4-17

MAIN STORAGE STATUS FOR SEU MEMBERS

Three fields in main storage identify SEU members present
in main storage.
o SEUINSUB + (X'D;' through X'OB'). Contains the
hexadecimal representation of the name of the SEU load
member last called by the executing SEU mode member.

e SEUMLOAD + (X'D;' through X'DB'). Contains the
hexadecimal representation of the name of the SEU
mode member currently in main storage. Mode
members are #SEAN (scan), #SEDL (delete), #SEET
(enter/update), #SEIC (include), and #SEMV (move).
#SEEJ (end of job) is named at the same location.
• SEUMODE. A 1-byte field that indicates the current
mode of SEU:
Value
X'BO'
X'40'
X'20'
X'10'
X'OB'
X'OO'

Meaning
Enter/update
Delete
Move
Include
Scan
Initialization or end of job

PROCEDURES
SEU

The procedure member SEU contains:

*

5726-UT1 COPYRIGHT IBM CORP 1977 REFER TO COPYRIGHT

* INSTRUCTIONS FORM NO. G120-2083.

II MEMBER USER1-#SE#M1
II MEMBER USER2-#SE#M2
II MEMBER PROGRAM1-#SE#M1
II MEMBER PROGRAM2-#SE#M2
II * 0104
II IF ?lR'0101'?1 #ERR 0201,C,SEU
II IF ?2R'0102'?1 #ERR 0204,C,SEU
II LOAD #SEU
II WORKSTN RESTORE-YES,UNIT-?WS?
II RUN
II SEU NAME-?1?,TYPE-?2?,FORMAT-?3?,LENGTH-?4?,LIBRARY-?5?
II END

4-18

Licensed Material-Property of IBM

The SEU procedure is

c~lIed

by the SEU command:

SEU pl ,p2,p3,p4,p5
where the positional parameters have the following
meanings:
Parameter

Meaning

pl
p2
p3 ..
p4
p5

Member name
Member type
Format member name
Statement length
Library name

The Oel statements generated by the SEU procedure are:

II
II
II
II
II
II
II
II
II

MEMBER USERl-#SE#Ml
MEMBER USER2-#SE#M2
MEMBER PROGRAMl-#SE#Ml
MEMBER PROGRAM2-#SE#M2
LOAD #SEU
WORKSTN RESTORE-YES,UNIT-?WS?
RUN
SEU NAME-pI, TYPE-pI, FOID1AT-p3, LENGTH-p4, LIBRARY-p5
END

SEUDROP
SEUDROP contains:

II MEMBER USERl-#SE#Ml
II * 0105
II LOAD $MAINT
II RUN
II DELETE NAME-#SE.ALL,LIBRARY-ALL,LIBRNAME-?l'#LIBRARY'?
II DELETE NAHE-SEU,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
II DELETE NAME-SEULOAD,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
II DELETE NAME-SEUSAVE,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
II DELETE NAME-SEUDROP,LIBRARY-P,LIBRNAME-?l'#LIBRARY'?
II END

Source Entry Utility

Licensed Material-Property of IBM

4-19

SEULOAD

SEULOAD contains:

II MEMBER
II * 0103
*

USER1-#SE#Ml

THIS PROCEDURE IS HERE ONLY FOR S-32 COMPATIBILITY

SEUSAVE

SEUSAVE contains:

II MEMBER USER1-#SE#M1
II * 0106
II LOAD $MAINT
II FILE PACK-PPUTIL,UNIT-Il,RETAIN-999,NAME-SEU
II RUN
II COpy FROM-?1'F1'?,TO-DISK,FILE-SEU,NAME-#SE.ALL,LIBRARY-ALL
II COpy FROM-?l'Fl'?,TO-DISK,FILE-SEU,NAME-SEU.ALL,LIBRARY-P,ADD-YES
/1

END

4-20

Licensed Material-Property of IBM

Chapter 5. Sort

Introduction

PHYSICAL CHARACTERISTICS

The sort program is designed to sort records from a disk
file. Sorting is based on control field values from within
each input record. Records are selected for or omitted
from a sort according to their record types. The record
types are determined by comparing fields to constants, to
other fields within the same record, or to all or part of the
program date. The include sets and omit sets that differentiate the record types are created by using OR conditions,
AND conditions, or a combination of both. The sort program performs three types of ascending and descending
sorts: an addrout sort, a tagalong sort, or a summary tagalong sort.

The sort program consists of the following:
• Thirty-four load modules
• One message member (#GS#MM)
•

Four procedures

•

Fifteen expansion buffers (#GSSO-#GSS14) used to
maintain the sort program at a fixed size on disk

INPUT/OUTPUT

The sort program manipulates data contained in a user data
file on disk. The user data file remains intact unless it is
overlayed by the output file. The output of the sort program is part or all of the input data or 3-byte binary relative
record numbers for some or all of the records in the input
file.

HOW THE PROGRAM WORKS

The sort program has two parts: generation and execution.
During generation, the sort sequence specifications are read
and diagnosed; the specifications and diagnostic messages
are printed if requested; the select/build routine is generated; and the sort is designed. During execution, the input
records are read; the select/build routine determines which
input records to include in the sort; a work record is built
for each input record to be included in the sort; the work
records are sorted, generating strings on a work file; the
strings are merged in ascending or descending sequence
until the number of strings remaining can be handled by a
final merge; then the sorted work records are written to the
output file as the final merge is performed.

The output of an add rout sort is an output file (addrout
file) containing 3-byte binary relative record numbers of
some or all of the input records. Zero indicates the first
record in the output file. The output of a tagalong sort or
summary tagalong sort consists of sorted output records.
These output records may contain all the information in
the input records or only selected fields from the input
records.
In addition to creating the output file, the sort program, if
requested by the sort sequence specifications, produces a
report. This report may consist of images of all the sort
sequence specifications, as well as diagnostic and status
messages. Input to sort consists of information from Oel
statements, the sort sequence specifications, and the input
file.

I/O STORAGE REQUIREMENTS

The minimum region size for the sort program is 14K
(14,336) bytes of main storage.

Sort

Licensed Material-Property of IBM

5-1

SYSTEM CONFIGURATION

Phase

Description

The sort program runs on all models of System/34.

Phase 00

•

Phase OE

Designs the sort by determining specific
fields in COMMON.

Phase

Description

Phase OA

•

Partially initializes COMMON.

• Allocates the output file, if the output
file does not overlay the input file.

•

Determines the location of the sort
sequence specification statements.

• Allocates the work file, if a work file
(FI LE) statement is not present.

•

Determines if input, output, and work
file (FILE) statements are present.

•

Determines if the work file is large enough
to hold at least one work block.

•

Completes initialization of COMMON.

Phase OG

•

Handles error conditions for generation
phases.

Phase 1

•

Prepares variable-length strings and places
them in the work file.

•

Reads the input records and builds a work
record for each input record selected for
inclusion in the sort.

Phase 2

•

Merges strings until only one pass
remains.

Phase 3

8

Performs the final pass and places the
sorted records into the output file.

Phase 4

•

Ends the job (cancels the job if any
errors are present or indicates a successful completion).

Phase OB

• Allocates and dummy opens the input
file.
•

Phase OC

Reads alternate collating sequence
(ALTSEQ) statements.

•

Allocates the work file, if a work file
(FI LE) statement is present.

•

Reads the sequence specification statements and checks them for errors.

•

Builds the select/build routine.

•

Creates the summary table.

5-2

Licensed Material-Pro'perty of IBM

Method of Operation
From: System

·1

13 IN PUT l:I::z,mnt :p"

Sort OCl and
sequence
specifications

Select/build
routine from main
storage
:

~OCESS_.

:> II

Input record file
Work file

-

;..

~

'1----->

~ OUTPUT

(

Main storage:
(')

Initializes COMMON.

Establ ished sort
variables in
COMMON area

Reads and diagnoses header.

o Select/build

0

Diagnoses FI lE statement
information.

at

Reads and diagnoses sequence
specifications and generates the
select/build routine.

•
~

j

Prepares to sort the records (generation
phases) :

•
•

-

; G*: i *GtH¢t: to

routine

Designs execution phases.

Work file

fJ Sorts the records (execution phases):
0

Creates sort strings.

0

Does intermediate merge.

(!)

Does final merge.

.11'

I~

!.

_ _ _ _ _?.... Output file: Sorted
records or relative
record numbers

.'1",'

·~.II~'Z

II,

Diagram 5-1. Sort Overview

I

limn
To: System

Sort

Licensed' Material-Property of IBM

5-3

Program Organization
Diagram 5-2 shows the program organization of the sort
program generation phases.
Diagram 5-3 shows the program organization of the sort
program execution phases.

5-4

Licensed Material-Property of IBM

(

Scheduler Work
Area (format 1 's)

,

--Enter

)

Phase OA (O.#GSORT)
Partially initializes COMMON.
Determines the location of the sort sequence specification statements.

Header
specification

r\

r===>

\
ALTSEO
statements

\

_ _----J

c:=::::>

~

Determines if input, output, and work file (FILE)
statements are present.

,

•

Termi~al

~"

Completes initialization of COMMON.

~

r:::=:>

Allocates and dummy-opens the input file.

Phase OC (O.#GSCA)

------'

"','1

Phase 08 (O.#GSBA)

~

-----...>

I

Creates summary table.

,

~

i

~

Terminal Error

III

!-1

"1;

Reads sequence specification statements and checks
them for errors.
Builds select/build routine.

Listing of header
specification
errors and
ALTSEO statements and errors.

~

Allocates the work file, if a work file (FILE) statement is present.

\

Error
,

Reads AL TSEO statements.

Sequence
specification
statements

Listing of header
specification

r==>

Select/build
routine

c:=:>

Summary table

~

.

i
:

Listing of
sequence specifications and errors

Terminal Error

,

II'

Diagram 5-2 (Part 1 of 2). Sort Generation Phase Organization

Sort

5-5

Phase 00 (O.#GSOB)

,
,

Designs sort by determining specific fields in
COMMON.

I

Terminal Error

Phase OE (O.#GSEA)

.

Allocates output file, if not the same file as the input
file.
Allocates the work file, if work file (FI LE) statement
not present.
Determines if work file is large enough to hold at
least one work block.

,

Ir

Phase OG (O.#GSGA)

I
No

~

Cancel

jOb)

Execution
phases

...

:.C. .__~_ab_nc_e_'_

....)

••••t~
L..-_ _ _ _>.....

Diagram 5-2 (Part 2 of 2). Sort Generation Phase Organization

5-6

Listing of
messages

>

I

Handles error conditions for the generation phases.

Control flow
Data flow

,
,
,

C
---==-Enter

0.#GS1L

)

Loads required phase 1 modules.

Phase 1 (0.#GS1X)

~

~------------------~--~~

Prepares variable length strings.

<:===J

Places strings in work file.

Select/build
routine

0.#GS1Z
Handles error conditions for execution phases.

Listing of
messages

Gives control to proper phase (O.#GS2L, O.#GS3L,
or O.#GS4A).

Yes

0.#GS2L
Loads required phase 2 modules.

EJ
Work file

r===->

<:""~'--_ _..I

Phase 2 (0.#GS2A)

I

1-----=---1
c:J
I

Merges strings until only one pass remains.
- - - - I

Diagram 5-3 (Part 1 of 3). Sort Execution Phase Organization

Sort

Licensed Material-Property of IBM

5-7

I-_O_.#G_S_1_Z_ _ _ _ _ _ _ _ _ _ _ _ _ _--1~

Listing of

~

End of pass reporter

messages

~

Terminal Error

Last Pass
" !r

O.#GS3L
Performs initialization of COMMON for phase 3.
Loads required phase 3 modules.

Yes
• :J<

Summary
sort

Db;

No

es

M

"
. Phase 3 (O.#GS3S)
Allocates output file, if it is the same file as the
input file.

<¢:=l,

Performs final pass on strings.

t:JL

Places summarized sorted records in output file.

Work file

Output file

.

Phase 3 (O.#GS3A)

c::::::::>

1

Allocates output file, if it is the same file as the
input file.
Performs final pass on strings.

l~

Places sort records in output file.

I

.--------..,
O.#GS1Z
End-of-pass reporter.

Terminal Error

c::=::>

Listing of
messages

~
Terminal Error

Diagram 5-3 (Part 2 of 3). Sort Execution Phase Organization

5-8

Licensed Material-Property of IBM

Phase 4 (O.#GS4A)
Cancels job if any errors are found.

listing of
r:nessages

Indicates successful completion of job.
No Selected
Records

••••••

Control flow

1.-._ _ _>......

Data flow

(

End of jOb)

Diagram 5-3 (Part 3 of 3). Sort Execution Phase Organization

Sort

Licensed Material-Property of IBM

5-9

Directory

Module
Name

This section contains a quick-reference table that can be
used .to find sort phases on microfiche. The module names
are indexed on the microfiche records.

•

Determines the location of the sort
e
sequence specification statements.

•

Reads first sort sequence specifications
statement.

•

Determines if there are input, output,
and work file (FILE) statements .

•

Determines if the input and output
files are the same file.

•

Prints sort's COMMON area with labels
after phases OA, OB, OD, OE, and all
passes.

Finishes diagnosing the header statement and issues messages if any
errors are detected.

•

Allocates and dummy opens the input
file.

Converts 4-bit groups into their
equivalent 8-bit EBCDIC values.

•

Allocates the work file, if work file
(FI LE) statement present.

Converts 1 byte of storage to printable
EBCDIC values, 1 bit at a time.

•

Reads the statement following the
header statement.

•

If ALTSEQ specified, loads and calls
O.#GSBC.

•

Reads and diagnoses sort sequence
specifications for one sort run.

#GSCA1

•

Initializes the COMMON fields used
by Phase ~C.

#GSCA2

•

If the print option entry is 0, prints
the current statement.

•

Partially diagnoses the current
statement.

•

Determines which phase OC module(s)
(O.#GSCE, O.#GSCF, O.#GSCK,
O.#GSCL, and O.#GSCZ) to call to
finish diagnosing the current statement
and to generate code for it.

#GSAB

The table consists of the following:
• Module Name is the symbolic label identifying the
module in the program listings and on microfiche.

#GSAF

• Major Functions is a brief list of specific functions the
module performs within the program.
Module
Name

Major Functions

O.#GS$A

•

@GSZE

@GSZF

O.#GS$D

•

•

•

Major Functions

O.#GSBA
(phase OB)

Phase OD COMMON constants

• Serves as input to O.#GS$A when
dumping COMMON.
O.#GS$E

•

•

O.#GS$X

•

Determines if there is enough available
storage to load O.#GS$A (sort
COMMON dump routine).
If there is enough available storage,
loads O.#GS$A.

O.#GSCA
(phase OC)

Phase 1, 2, and 3 COMMON constants.

• Serves as input to O.#GS$A when
dumping COMMON.
#GSAA

•

Determines the region size that the
sort program has available to execute
in.

•

Determines if the statement read by
#GSAB is a header specification
statement.

•

Partially diagnoses the header statement
and issues messages if any errors are
detected.

5-10

.Licensed Material-Property of IBM

Module
Name

#GSCA5

#GSCA6

#GSCA8

Major Functions

Module
Name

•

Moves code generated in O.#GSCE and
O.#GSCF to the generated code area.

O.#GSCC

•

Determines if there is enough storage
available for more code to be generated.

•

Determines the zone of a given byte
by testing the zone portion of that
byte.

Builds the error table starting with the
• highest
available address.
0

O.#GSBC

Checks error table; if full, passes
control to O.#GSCZ.
O.#GSCF

•

Reads and diagnoses AL TSEO statements and issues messages if any errors
are detected.

•

Modifies the 256-byte alternate
collating sequence table as specified
on the AL TSEO.statements that are
read in.

@GSDC

•

Computes the initial area in phase 1
to be assigned to the internal sort area.

@GSEG

•

Determines the space needed for the
work file and uses special allocate to
automatically allocate it.

@GSZB

@GSZC

O.#GSCB

O.#GSCE

•
•

•

Moves the select/build routine to its
final position in storage.

•

Moves the summary table behind
select/build routine if summary sort
is used.

•

Diagnoses the sequence specification
statements to determine if they are
valid include or omit statements.

•

Generates code segments from the
information on the include/omit
statements.

Diagnoses the sequence specification
• statements
to determine if they are
valid field statements.

•
O.#GSCK

Generates code segments from the
information on the field statements.

Diagnoses include/omit record type
• specifications
with a factor 2 keyword.
o Generates a valid include/omit
sequence specification statement.

O.#GSCL
@GSCA9

•

Calculates module length.

Diagnoses errors in the factor 1 and
• factor
2 field lengths for include/omit
record type specifications.

Converts an unsigned zoned decimal
number (up to 7 bytes long) to a 3-byte
hex number.
Converts a 3-byte hex number to a
7-byte zoned decimal number and
concatenates a sign byte to the result.

Issues error messages based on the
• error
table generated in phase

Major Functions

@GSCA7

~C.

Determines if any terminal errors were
• diagnosed
by phase
if they were,

•

Diagnoses errors in the from and to
location entries for field specifications.

•

Calculates displacement values for
include, omit, and field statements.

CD

Converts the to and from fields of
factors 1 and 2, and the to and from
location entries for field specifications,
to binary.

~C;

passes control to O.#GSGA.

Sort

Licensed Material-Property of IBM

5-11

Module
Name

Major Functions

O.#GSCZ

• Completes select/build code.

Major Functions

•

Performs a tournament sort.

Moves the summary table to phase 1
location behind COMMON.

•

Produces variable length strings of
sequenced work records.

the active program lengths
• ofDetermines
modules 0.#GS1 X, 0.#GS2A,

•

Places a string of a variable number of
work record blocks onto the work file.

•
O.#GSDA

Module
Name

0.#GS1X
(phase 1)

0.#GS3A, and 0.#GS3S.
O.#GSDB
(phase 00)

O.#GSEA
(phase OE)

•

• At end of pass for a summary sort,
moves the summary table from the
next byte after the select/build code
to the next byte after COMMON.

Designs the execution phases of the
sort program (phase 1, phase 2, and
phase 3).

• Checks for terminal error in design
of sort; if found, passes control to
O.#GSGA.

0.#GS1Z

• Allocates output file, if not the same
file as the input file.

0.#GS2A
(phase 2)

•

preceding execution phase.

than or equal to the sort's order of
merge.
0.#GS2L

into storage the required phase
• 2Loads
modules for 0.#GS2A.

0.#GS3A
(phase 3)

• Allocates the output file, if it is the
same file as the input file.

•

Issues messages indicating errors
found in and information determined
in the preceding generation phases.

O.#GSORT
(phase OA)

•

Initial sort load module.

• Contains COMMON and initializes
portions of it.
O.#GSZA

Moves a given number of bytes from
• one
area in storage to another.

0.#GS1D

• Calculates and places in COMMON
the sector address (SSS) of the current
work block.

0.#GS3L

• Calculates and places in COMMON the
SSS of the next work block.

•
•

Merges strings created in phase 1 until
• the
total number of strings is less

If work file (FI LE) statements
omitted, calls automatic work file
allocation (@GSEG).

O.#GSGA
(phase OG)

0.#GS1 L

messages indicating errors found
• inIssues
and information determined in the

Performs initialization for 0.#GS1 X.
Loads into storage the required phase 1
modules for 0.#GS1 X.

5-12

Licensed Material-Property. 01':1 BM

•

Performs last pass of the merge.

•

Places the sorted records consecutively
in the output file.

Performs initialization for the phase 3
• modules
(0.#GS3A/0.#GS3S).

•

Loads into storage the modules
required by 0.#GS3A/0.#GS3S to
perform phase 3.

•

If the number of remaining strings
is less than the order of merge,
redesigns the sort for phase 3.

Module
Name

Major Functions

0.#GS3S
(phase 3)

• Allocates the output file, if it is the
same file as the input file.
• Performs last pass of the merge.
•

If no summary table exists, deletes
duplicate records.

•

If a summary table exists, summarizes
duplicate records as specified.

• Places the sorted records consecutively
in the output file.
@GSZD

•

@GSZM

• Multiplies two 3-byte hex numbers.

0.#GS4A
(phase 4)

•

Divides a 3-byte hex number into
another 3·byte hex number.

Issues displayed message and ends the
job after unsuccessful completion via
the SYSLOG transient routine.

• Terminates the sort program after
successful completion.
0.#GS9G

• Provides the logical get I/O function
for the work file.

0.#GS91

•

0.#GS9P

• Provides the logical put I/O function
for the work file.

0.#GS9S

•

Reads sort sequence specification statements from a procedure member or
entered through the display station
keyboard.

Reads sort sequence specification
statements from a source member.

Sort

Liqense~ ~aterial-Property

of IBM

5-13

Data Areas

Data Area

Description

This section describes data areas used by the sort program:

ALTERNATE
COLLATING
SEQUENCE
TABLE

The alternate collating sequence table,
if requested, is located in the last 256
bytes in main storage until phase 2 and
contains all the hex values. The table
is modified by O.#GSBC according to
the AL TSEQ statements.

OLDS
STRUCTURED
ELEMENT
ARRAY

The OLDS structured element array,
built by 0.#GS9G, contains information on a maximum of 18 old sort
strings. OLDS@ in COMMON contains
the address of this array. Each 16-byte
entry contains:

Data Area

Description

COMMON

COMMON is a 256-byte-plus-two-DTFlengths interphase table used by phases
in both generation and execution portions of sort. COMMON is loaded into
storage as the first 256-bytes-plus-twoDTF-Iengths of the phase OA load
member.
#GSC in COMMON, the first 4 bytes
of COMMON, contains C'#GSC'. This
field serves as an identification for sort
COMMON.
The macro DSEQU generates the
labels required by each individual
module to access fields it needs in
COMMON. To locate these labels and
the offsets for them, look up #GSC in
the cross-reference table of any
module.

PHASE@

ERROR TABLE

PHASE@ in COMMON contains either
the address of the current phase or the
address of the next phase to be loaded.
Immediately before control is to be
passed to the next phase, PHASE@ is
loaded with the address of where to
load that phase. During execution of
the current phase (before the point
where control is to be passed to the
. next phase), PHASE@ contains the
address of where the current executing
phase was loaded.
The error table is built backwards by
O.#GSCA; that is, the first entry is at
a higher location in storage than the
second entry. A 3-byte entry is placed
in the table for each error found on
the sequence specification statements.
The first 2 bytes contain the statement
number where the error was found; the
third byte contains the error number.
BEGER1 in COMMON contains the
address of the error table.

5-14

AVAIL TABLE

Byte

Contents

0-2

Sector address (SSS) of
current block of strings

3-4

Total number of records in
block

5-6

Number of records taken
from block

7-8

Buffer address

9-10

Block address

11-12

Address of current record in
block

13-15

Sector address (SSS) of next
block of string

0.#GS9G builds the AVAI L table so
that the first entry is at a higher location in storage than the second entry.
The address of the table is found at
@AVAIL in COMMON. Each 5-byte
entry contains this information about
the available blocks on disk:

Byte

Contents

0-2

Sector address (SSS) of
block

3-4

Total number of records in
block

Data Area

Description

Data Area

Description

SUMMARY
TABLE

This table, built by O.#GSCF, contains
information about the type, length,
and location of the summary fields
within the work record. The table
consists of 1-25 entries. If bit 3 of
ATTRQ1 in COMMON is 1, then the
first entry is that of the overflow
indicator field. Otherwise, the first
entry is the first summary data field.
The entries contain:

TABLE of WORK
FILE EXTENTS

O.#GSBA or O.#GSEA builds this
21-byte table in COMMON. The highorder byte is MVFTBL in COMMON.
The first 3 bytes in the table contain
three 1-byte device addresses
(MVFQ1-MVFQ3), one address for
each extent. The remainder of the
table gives 6 bytes of information for
each extent in this format:

Byte

Contents

0-2

Disk SSS

3-5

Accumulated number of
sectors with this extent

Overflow Indicator
Byte

Contents

o

XL l'FF'=Overflow indicator

2-3

Overflow indicator character
(from record character
column)

The last 3 bytes of each 6-byte entry
are converted by O.#GSDA. Each
entry then contains:

Displacement of field from
start of work record

Byte

Contents

0-2

Disk SSS

3-5

Accumulated number of work
file blocks with this extent
(MVF#l-MVF#3)

First Summary Field
Byte

Contents

o

XL l'OO'=Digit or unpacked
decimal
XL l'80'=Character (integer)
XL l'40'=Packed decimal
Field length minus 1

2-3

Displacement of first field
from start of work record
(rightmost byte)

Following Summary Fields
Byte

Contents

o

Type
Field length minus 1

2-3

Displacement of this field
from previous field (rightmost
byte)

Sort

Licensed Material-Property of IBM

5-15

Diagnostic Aids

Message

Module

This section lists the displayed and printed messages
diagnosed by sort and the modules that diagnose them.

SORT-7230
SORT-7232
SORT-7234
SORT-7236

MESSAGES

SORT-7238
SORT-7240
SORT-7242
SORT-7244
SORT-7246
SORT-7248
SORT-7250
SORT-7252
SORT-7254
SORT-7256
SORT-7258
SORT-7262
SORT-7264
SORT-7266
SORT-7268
SORT-7276
SORT-7278
SORT-7280
SORT-7282
SORT-7284
SORT-7286
SORT-7288
SORT-7391
SORT-7395
SORT-7401
SORT-7402
SORT-7403
SORT-7404
SORT-7422
SORT-7423
SORT-7425
SORT-7450
SORT-7451
SORT-7452
SORT-7453
SORT-7461
SORT-7462
SORT-7600
SORT-7601
SORT-7602
SORT-7603
SORT-7620
SORT-7681
SORT-7690
SORT-7691

#GSCA
#GSCE
#GSCE
#GSCE
@GSCA9
@GSCA9
@GSCA9
#GSCF CA9
#GSCA
#GSCF
#GSCF
@GSCA9
#GSCF
@GSCA9
@GSCA7
@GSCA9
#GSCB
#GSCE
@GSCA9
#GSCF
#GSCF
#GSCF
#Gscz
#Gscz
#GSCF
@GSCA9
#GSDB ':
@GSEG

Message

Module

SORT-7002
SORT-7004
SORT-7005
SORT-7007
SORT-7101
SORT-7102
SORT-7103
SORT-7104
SORT-7105
SORT-7150
SORT-7151
SORT-7152
SORT-7154
SORT-7155
SORT-7156
SORT-7157
SORT-7158
SORT-7159
SORT-7160
SORT-7161
SORT-7162
SORT-7176
SORT-7177
SORT-7178
SORT-7179
SORT-7181
SORT-7202
SORT-7204
SORT-7206
SORT-7208
SORT-7210
SORT-7212
SORT-7214
SORT-7216
SORT-7218
SORT-7220
SORT-7222
SORT-7224
SORT-7225
SORT-7226
SORT-7228

SORT procedure
SORT procedure
SO RT procedure
SO RT procedure
#GSORT
#GSORT
#GSORT
#GSORT
#GSORT
#GSCB
#GSBA
#GSBA
#GSBA
#GSBA
#GSBA
#GSBA
#GSBA
#GSBA .
#GSBA
#GSBA
#GSBA
#GSBC
#GSBC
#GSBC
#GSBC
#GSBC
#GSCA
#GSCA
#GSCA
#GSCA
#GSCA CK
#GSCA
#GSCA
#Gscz
#GSCA
#GSCA
#GSCF
#GSCK CA9
#GSCK
@CSCA9
@GSCA9

Figure 5-1 (Part 1 of 2). Sort Message - to - Module Cross Reference

5-16

Licensed Material-Property of IBM

#GSCB
#GS91
#GSCB DB EG

#GS1X
#GS1Z

Message
SORT-7692
SORT-7693
SORT-7694
SORT-7695
SORT-7721
SORT-7722
SORT-7723
SORT-7724
SORT-7725
SORT-7727
SORT-7728
SORT-7729
SORT-7730
SORT-7731
SORT-7732
SORT-7733
SORT-7781
SORT-7800
SORT-7801
SORT-7901
SORT-7902
SORT-7928
SORT-7929
SORT-7930
SORT-7931
SORT-7932

Module

#GS1X

#GS9S
#GSCB
#GS91
#GS1X
#GSCB DB EG
#GS$A
#GS1X
#GS1X 9G 9P
#GS3A 3S
#GS1D
#GS3A 3S
@GSEG
#GSCB, 1Z, 2A, 3 L, 3A, 3S, 4A, 9G
#GS$E

#GS1X
#GS1X 9G 9P
#GS3A 3S
#GS1D
#GS3A 3S

Figure 5-1 (Part 2 of 2). Sort Message - to - Module Cross Roference

Sort

Licensed Material-Property of IBM

5-17

PROCEDURES

When the SORT command is entered, the following procedure is executed:

II
II
II
II
II
II

II

MEMBER PROGRAMl-#GS#r.1M
MEMBER USERl-#GS#ID~
LOAD #GSORT
FILE NAME-INPUT,LABEL-input file label,DISP-SHR
FILE NAME-OUTPUT,LABEL-output file label,RECORDS-number of
records
RUN
SOURCE source member ,[user library name]

5-18

Licensed' Material-Property of IBM

Appendix. Acronyms and Abbreviations

The following acronyms and abbreviations are used in this
manual:
APAR
CDB
CSA
CSB
CSP
DFU
DSA
DSB
DTF
EJ
EOJ
ES
EW
FDB
FIA
FSA
FSB
hex
HIPO
ID
IPB
IJ
IW
JCR
JDB
K

MDB
MIA
MIC
MSA
MSB
NEP
OCl
PPSA
PSA
PSB
QSA
QSB
RID
RSA
RSB
RTN

Authorized Program Analysis Report
C-spec data block
C-spec specification area
C-spec specification block
C-specification
Data file utility
Data specification area
Data specification block
Define the file
End of WSU job
End of job
End of sequence
End of work session
File data buffer
Format index area
File specification area
File specification block
hexadecimal
Hierarchy, plus input, process, output
identification
Initialization parameter block
Job initiation
Work session initiation
Job control record
Job data block
1024 (bytes)
Message data block
Master index area
Message identification code
Message specification area
Message specification block
Never ending program
Operation control language
Procedure parameter save area
Process specification area
Process specification block
Queued save area
Queued save area blocks
Record identifier
Routine specification area
Routine specification block
WSU execution routine

SAV
SCB
SDA
SDB
SEU
SFGR
SRB
SSA
SSB
SSP
SSS
TRN
TSA
TSB
VTOC
WCA
WCB
WCR
WDB
WSDTF
WSU

Screen save/restore area
Storage control block
Screen design aid
Screen data buffer
Source entry utility
Screen format generation routine
Storage request block
Screen specification area
Screen specification block
System Support Program Product
The format for representing the physical address
of a data field (sector) on disk.
Transient
Transient specification area
Transient specification block
. Volume table of contents
Work station control area
Work station control block
Work station control record
Work session data block
Work station DTF
Work station utility

Acronyms and Abbreviations

Licensed Material-Property of IBM

A-1

A-2

Licensed Material..;...Property of IBM

READER'S COMMENT FORM
Please use this form only to identify publication errors or request changes to publications. Technical questions about IBM systems, changes in I BM programming
support, requests for additional publications, etc, should be directed to your IBM representative or to the IBM branch office nearest your location.
Error in publication (typographical, illustration, and so on). No reply.
Page Number

Error

Inaccurate or misleading information in this publication. Please tell us
about it by using this postage-paid form. We will correct or clarify the
publication, or tell you why a change is not being made, proVided you
include your name and address.

"'tJC

iil ;.~
3 en ~
r-"'tJ1'D

003

tCtC_

-'..,

n III
~3
III

Comment

CAl
~

"'tJ

::l

..,

C

0

III

Page Number

m

a;~
_.

tC

Q.

-c

~

r-

-<

I\J
~

6
U1

0)

CAl

6

Note: All comments and suggestions become the property of IBM.

Name "-________________~------------------------Address

• No Dostaae necessarY if mailed in thA U_S_A_

L Y21-0563-0

n
c

P+

»

0'
::I

IQ

r:;'
(II

to

:i:

en
<
:q.

Fold

Fold

(I)

3

W
~

~

....

FIRST CLASS
PERMIT NO. 40
ARMONK, N. Y.

(ii'

en
"'0

a
cc
Dl

3

"'0

a0.

c

BUSINESS

REPLY

~

MAIL

"'0

a

cc

NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES

Dl

3

b
cc

POSTAGE WILL BE PAID BY •••

('i'

.:i:
III

::I

C

!!!..

IBM Corporation
General Systems Division
Development Laboratory
Publications, Dept. 245
Rochester, Minnesota 55901

Fold

Fold

------- ---------- - --------_.
Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2011:10:07 18:56:04-08:00
Modify Date                     : 2011:10:07 21:47:18-07:00
Metadata Date                   : 2011:10:07 21:47:18-07:00
Producer                        : Adobe Acrobat 9.46 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:b05895ef-965f-46a9-86c0-019d254a1a7f
Instance ID                     : uuid:590c0af2-485d-444b-aa1e-c082f0cf5702
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 191
EXIF Metadata provided by EXIF.tools

Navigation menu