Professional Documents
Culture Documents
Guest Lecture
Final Presentation
October 2009 – 2nd Version
presented by
A member of IEEE and ACM
Dipl. Ing.
Ing. Werner Hoffmann
EMAIL: pwhoffmann@t-
pwhoffmann@t-online.de Please see the notes
pages for additional
See: © Copyright Note in Note Page.
comments.
Date: 03.10.2009 SE_PGM_Design_V2.ppt Page: 1
Welcome to the guest lecture called “Program Design & Development". This
lecture is one small part of “Software Engineering”.
This additional lecture contains some exercises.
© Note: Permission to make digital or hard copies of all or parts of this work
for personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
1
Audience
"Learning is experience.
Everything else is
information.“
Albert Einstein.
•Assumed Background:
Program Design & Development
I assume that you have a firm grasp of basic information processing technology and that you have
had some experience analyzing and designing information systems. Consequently, you understand
the underlying principles.
• Software Design Methods,
• Modular Design/Structured Programming Technology,
• Data Structure Methods.
2
Goal
See above…
3
Agenda
1. Introduction
2. Some Examples/Exercises
3. Conclusion
Program Design is shown using “Pseudo Code”; Programs are written in PL/I for /390 or z/OS.
4
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion "You do not really understand
something unless you can
explain it to your
grandmother."
Albert Einstein.
5
Introduction (1)
See above…
6
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion
I like to start with a review of Structured Programming and I like to remember a design method called Pseudo
Code.
7
Review: Structured Programming (1)
3. Proper Programs
“Intellectuals solve
problems. Geniuses
prevent them.”
Albert Einstein.
… see above.
8
Review: Structured Programming (2)
p 1
F B
3. DO WHILE Block:
A
T
F
1 p
9
Review: Structured Programming (3)
A A
T DOWHILE (p)
F
A 1 p A
ENDWHILE
10
Review: Structured Programming (4)
11
Review: Structured Programming (5)
LOOP
- LOOP’s F1
EXITIF (p1)
…
- CASE block’s Fn
ENDLOOP
etc.
Date: 03.10.2009 Program Design & Development Page: 12
12
Review: Structured Programming (6)
3
F
T Pseudo-Code:
p3
DOWHILE (p1)
B IF (p2)
THEN DOWHILE (p3)
B
A ENDWHILE
2 ELSE A
ENDIF
p2 ENDWHILE
F T C
p1
T
F
The goal is to construct a
C well defined hierarchy for
the solution.
3) Proper Program:
A Proper Program is a program that is constructed in such a way that the program, each of its modules, and
each of its control structures has the following characteristics:
No dead code; no infinite loops; one entry point and one exit point.
13
Indecomposable program figures (1)
Terms:
Having noted, that program figures may be indecomposable, we need to add the possibility of operations and
tests to be able to restructure the flowchart. The additional operations and tests correspond to “flag” setting
and testing. But we can coach these operations in the concept of a push down stack to show their economy.
In addition to the functions and predicates original to a given program we introduce three new functions and
one predicate as shown above. More specifically, we define process nodes with functions named TRUE, FALSE,
and POP, and a predicate node with function named TOP, which add truth values TRUE and FALSE, remove
and test such truth values, respectively.
14
Indecomposable program figures (2)
T T
1 p B q
F
F
The above example of an indecomposable control flow is used to show how we can use the previous defined
new function to restructure this control flow getting a structured program flow.
Theorem: Any indecomposable program is equivalent to a program whose formula contains at most the graph
labels BLOCK, IF_THEN_ESLE, and REPEAT_UNTIL, and additional functions TRUE, FALSE. And POP, and
predicate function TOP.
For more detail see book: “Software Productivity”, Harlan d. Mills, 1988.
15
Indecomposable program figures (3)
Pseudo-Code: TRUE
REPEAT
POP
IF p
THEN {A,TRUE}
ELSE {B, IF q
THEN TRUE
ELSE FALSE
ENDIF}
ENDIF
UNTIL TOP
Date: 03.10.2009 Program Design & Development Page: 16
16
Conclusion (1)
Unstructured Solution!
Our main goal in designing and coding of programs is to define a hierarchical modular structure of a given
requirement using only basic control elements defined in “Structured Programming”. One a higher system level
we can decomposes a complex problem by defining modules or functions. Each construct follows one rule: one
entry and one exit.
17
Conclusion (2)
… ! ? GOTO…
Note: By the way, sometimes I’m still using a goto…., but only in very special cases!
18
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion
I hope you learned a lot about “Modular Design” during your study about “Software Engineering”.
Here I only like to remember some terms and basic concepts.
19
Modular Design (1)
Key Terms:
Cohesion - A measure of a module’s completeness.
Control flow - The transfer of control into or out from a module.
Coupling – A measure of a module’s independence; fewer parameters flowing into or out from a module imply looser
coupling.
Data flow - Data in motion; the transfer of data into or out from a module.
Logical model – A model that exists on paper or in an analyst’s mind; logical models are easily manipulated; contrast with
physical.
Module - A portion of a larger program that performs a specific task.
Physical — Real; actual, operational hardware, software, or data; contrast with logical.
Primitive - A process (or transform) that requires no further decomposition.
Process - An activity that changes, moves, or manipulates data.
Requirement - An element (process, data, etc.) that must be part of a system.
Structure chart - A hierarchy chart on which the data flows and control flows between modules are traced.
Structured analysis - A set of tools and techniques intended to transform an abstract problem into a feasible logical
design.
Structured design - A set of (tools) and techniques intended to convert a logical design into a concrete information
system.
Transform analysis - The act of grouping together the modules (or processes) that manipulate a particular set of data or a
particular data structure.
Concepts:
System inputs/outputs - The methodology is output oriented. It focuses on the system outputs, the exact data the users
need to perform their tasks.
The logical definition phase - The analyst begins by analyzing and designing a logical system and then specifying the
system’s logical requirements.
Define the application context - Key objectives of this first phase include establishing a clear boundary for the proposed
application or system and identifying the application’s internal and external entities. Next, the system’s major functions
(the tasks or processes the system must perform) are defined and translated into measurable system objectives. The major
functions produce the desired system outputs.
Define the application functions - After studying the interrelationship between various entities in the application entity
diagram, the analyst prepares a mainline functional flow diagram to sequentially link all the processes in the proposed
system.
Define the application results - All the required inputs and outputs are generated. Data layouts for each input/output are
determined
20
Modular Design (2)
Key Terms:
Composition - Bottom-up - A methodology that starts with the details and works upward.
Complexity - The control of program complexity is the underlying objective of most of the
software engineering techniques.
Construction - The construction activities are those that directly related to the development of
software, e.g. gathering the requirements of the software, develop design, implement and test the
software etc. Some of the major construction activities are listed below.
· Requirement Gathering, · Design Development, · Coding, · Testing.
Coupling - Coupling is a measure of the strength of interconnection between modules.
Data-driven - A methodology or tool that starts with the data and derives the processes.
Data structure - A set of related data elements.
Function – A meaningful operation or process that produces a desired result for a proposed
system; similar to a process.
Hiding – Knowing that only certain modules (subroutines) have access to (shared) data may
permit fewer checks to-be made on the validity of stored values, and thereby increase efficiency.
Logical data structure - A set of related data elements that ignores how the data are physically
stored.
Physical data structure - A set of related data elements as they are physically stored.
Process - An activity that changes, moves, or manipulates data.
System objective – A desired function of and/or operation performed by a proposed system.
Decomposition – Top-down - Decomposition is a top-down, goal-oriented approach that is used
when the problem is too complex or too abstract to study directly. The idea is to divide (or
decompose) the problem into logically consistent, more manageable sub-problems, and then to
attack the sub-problems.
21
Modular Design (3)
• Used Notation:
o o *
For our Examples and exercises we may used the above notation.
22
Modular Design (4)
Segment D1 Segment D2
Main Module
-Data- Include data D2
Include data D1
Include process P1
External
Process P1
Module E1
CALL E1
Internal
CALL E2
Module E2
Include process P2
Process P2
Process Modules
Date: 03.10.2009 Program Design & Development Page: 23
23
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: Data Model, (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion
During your study you learned methods which are very usable to describe data: Data Structures, Entity –
Relationship Methods, Input – Process – Output Analysis etc.
Also in this section I only would like to remind of some terms, concepts and basic methods.
24
(1)
Data Model, (H)IPO and Data Structures
Data Modeling:
D E
Data Modeling
Data modeling answers a set of specific questions that are relevant to any data processing application. What
are the primary data objects to be processed by the system? What is the composition of each data object and
what attributes describe the object? Where do the objects currently reside? What are the relationships
between each object and other objects? What are the relationships between the objects and the processes
that transform them?
Data Objects, Attributes, and Relationships - The data model consists of three interrelated pieces of
information: the data object, the attributes that describe the data object, and the relationships that connect
data objects to one another.
Cardinality and Modality - The data model must be capable of representing the number of occurrences
objects in a given relationship. The modality of a relationship is 0 if there is no explicit need or the relationship
to occur or the relationship is optional. The modality is 1 if an occurrence of the relationship is mandatory.
Data Flow Diagrams - As information moves through software, it is modified by a series of
transformations. A data flow diagram is a graphical representation that depicts information flow and the
transforms that are applied as data move from input to output.
Data Structure Diagrams - These give a broad brush view of the data stored/used by the system.
They generally describe each collection of data in the system (and are backed up by forms describing the
structure and format of each collection). In addition the relationships between the data collections are
documented. These relationships are important to the consistency of the data. The data structure diagrams
may describe physical or logical views as seen by the system/program.
Data structures are used in almost every program or software system. Specific data structures are essential
ingredients of many efficient algorithms, and make possible the management of huge amounts of data, such
as large databases, files etc. Some formal design methods and programming languages emphasize data
structures, rather than algorithms, as the key organizing factor in software design. The implementation of a
data structure usually requires writing a set of procedures that create and manipulate instances of that
structure. The efficiency of a data structure cannot be analyzed separately from those operations.
25
(1)
Data Model, (H)IPO and Data Structures
A A A
Null
component
o o
B C B C B *
-
HIPO (Hierarchy plus Input-Process-Output) - The HIPO (Hierarchy plus Input-Process-Output) technique is a
tool for planning and/or documenting a computer program. A HIPO model consists of a hierarchy chart that
graphically represents the program’s control structure and a set of IPO (Input-Process-Output) charts that
describe the inputs to, the outputs from, and the functions (or processes) performed by each module on the
hierarchy chart.
A completed HIPO package has two parts. A hierarchy chart is used to represent the top-down structure of
the program. For each module depicted on the hierarchy chart, an IPO (Input-Process-Output) chart is used to
describe the inputs to, the outputs from, and the process performed by the module.
IPO(S) Input – Process – Output - Storage - IPO (Input-Process-Output) is one of the most fundamental design
patterns. And it makes perfect sense. Before a computer can operate on data, the data need to be entered at
an input device. Now calculations may be performed. And, finally, a result may be displayed on an output
device. The components of the IPO model are defined as:
I: Input - The information, ideas, and resources used
P: Processing - Actions taken upon/using input or stored material
O: Output - Results of the processing that then exit the system
S: Storage - Location(s) where material inside the system is/are placed for possible use at a later time
(optional)
Output Analysis Strategy - The output analysis problem solving strategy begins by looking at the output that
the program is to produce. From the output, the analyst works backwards -- continually asking the question:
Where does this data item come from? An item of data in the output could result from: a calculation; or an
input operation. If the source is a calculation, then the above question is applied to the each data item in the
calculation. This process continues until the sources or values of each data item is known.
Even for data structures I like to use the above shown notation.
Simple component: A simple data element is represented by a box as shown in the above foil.
Sequence: A sequence of operations is represented by boxes connected with lines. In the example above,
operation A consists of the sequence of component B, and C. Note: A is the sequence, B and C are simple
components of A, which must appear in the shown sequence and each component must be there.
Iteration: An iteration is again represented with joined boxes. In addition the iterated component has a star in
the top right corner of its box. In the example above, operation A consists of an iteration of zero or more
invocations of component B. Note: A is the iteration, B is the simple component of A. The number of iteration
is dependent from a condition. The condition is not shown in the diagram, but is part of A.
Selection: Selection is similar to a sequence, but with a circle drawn in the top right hand corner of each
optional operation. In the shown example, operation A consists of one and only one of operations B, or C.
Note: A is the selection, B and C are simple components of A. There is no sequence between B and C. Which
component will be selected is dependent from a condition. The condition is not shown in the diagram, but is
part of A.
Null component: A Null component is an empty simple component and may be a special case of Selection. It
describe the occurrence or absence of a selection component. Note: Be carefully in defining null components.
26
(2)
Data Model, (H)IPO and Data Structures
A Sequence
Iteration B D Selection
o o
C * E F
Note: The components of a tree have only a connection up and/or below, but not
to components at the same level.
27
(3)
Data Model, (H)IPO and Data Structures
B * C B-Body C
B o C o D
B-C Body D
B* C* B-Body C-Body
28
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion
For our tasks (examples and exercises) I now describe a basic workflow I like to follow.
29
(1)
A general Program Design Strategy
Design Concept:
"The beginning of wisdom for a [software engineer /
Programmer] is to recognize the difference between getting
a program to work, and getting it right.“
Design Process:
Design Concept: A set of fundamental software design concepts has evolved over the past four decades.
Although the degree of interest in each concept has varied over the years, each has stood the test of time.
Each provides the software designer with a foundation from which more sophisticated design methods can be
applied. Each helps the software engineer to answer the following questions:
• What criteria can be used to partition software into individual components?
• How is function or data structure detail separated from a conceptual representation of the software?
• What uniform criteria define the technical quality of a software design?
Design Process: The design process converts the ‘‘what’’ of the requirements to the ‘‘how’’ of the design.
The results of the design phase should be a document that has sufficient detail to allow the system to be
implemented without further interaction with either the specifier or the user.
The following are phases in design:
•Data design—This phase produces the data structures.
•Architectural design—This phase produces the structural units.
•Interface design—This phase specifies the interfaces between the units.
•Procedural design—This phase specifies the algorithms of each method.
30
(2)
A general Program Design Strategy
One lesson to be learned from the past is that we should avoid to start with flowcharts or similar methods.
For many people it has long been an article of faith that flowcharting should precede coding. There is a
kernel of important truth here: coding cannot be the first stage in building a program; it must be proceeded
by design. But flowcharting is not designing! Design is about structure, and flowcharts, as their name
suggests, are about flow of control. At the time when the designer should be thinking about the shape of his
problem, the flowchart encourages him to think about execution of the program inside the computer.
Another, more positive, lesson is that program structures should be based on data structures. There are
deeply underlying reasons why this is so, and I depict them in the above shown diagram.
The problem environment is the real world, or that part of it which affects and is affected by the computer
system. The computer system we have to implement sees the world through the medium of its data
structures. The tasks to be performed must make sense in the real world. The program we are trying to build
consists essentially of operations to be executed by the computer. Some of these operations are concerned
with finding our way around the data structures: eg. Reading or writing records. Other operations are more
directly concerned with task to be performed, eg. “add price to invoice total”.
Each operation must appear somewhere in the program text, in some program component. To make an
intelligible and correct program we must ensure that for each operation there is an appropriate component in
which it may appear.
In general, both types of operation, those concerned with finding our way around the data structures and
those more directly concerned with the task to be performed, can be associated with components of the
underlying data structures. If, therefore, we give our program the same structure as the data it processes we
can expect that we will have no difficulty.
These ideas are the basics of the design techniques discussed in this sessions.
31
(3)
A general Program Design Strategy
• Design and draw the input data (file) and output data (file) structures, they may be
physically or logically oriented.
• Identify the correspondences between the input data structures and the output
structures. If additional program internal data needed, define those data (structures).
• Merge the input data structures and output data structures on the points of
correspondence to produce the basic process structure diagram.
• Add additional process boxes (Start- / End- processes etc.) to form the final process
structure diagram.
• Allocate conditions to the selections and iterations that exist on the basic process
structure diagram.
• Analyze elementary operations and allocate them to appropriate parts of the final
process structure diagram.
• Generate the schematic logic (Pseudo Code) from the final process structure diagram.
• Translate the schematic logic into the desired computer programming language.
The individual steps required in designing and creating a program are shown in the above foil.
32
(4)
A general Program Design Strategy
The starting point may be to define logical data structures, identifying relationships; than construct a module
/ code structure.
We list the executable operations needed to carry out the task, and allocate each operation to a component of
the program structure, here we are using “Pseudo Code” to do this step.
There are, of course, further steps in the design process, but these three are the first and most important: the
quality of the work we do as we take these steps will determine the quality of the program we write!
33
Agenda
1. Introduction
2. Some Examples/Exercises
• Task 1: Stores Movement Summary
• Task 2: Stores Movement Summary – Maintenance (Homework)
• Task 3: Collating or Matching Problem
• Task 4: Inventory Update – Collating Problem (Homework)
• Task 5: Telegram Analysis – Boundary Clash (Homework)
3. Conclusion
“My experiences also strongly
confirmed my previous opinion
that the best theory is inspired by
practice and the best practice is
inspired by theory.“
Donald E. Knuth,”Theory and Practice”, Theoretical
Computer Science,1991.
Now let me enter into the main part of my session: Examples and exercises.
34
(1)
Task 1: Stores Movement Summary
Examples:
MRIA5/13672 0802020822 120
MRIA5/13672 0802101430 310
MRIA5/13672 0803121500 50
MRRA5/13672 0803121610 100
MRRA5/17924 0802030915 10000
MRIA5/17924 0802051030 333
MRIB31/82 0802021150 55
etc.
This example is a small part of an IBM programming seminar in the early ’70…
35
(2)
Task 1: Stores Movement Summary
Examples:
A5/13672 -380
A5/17924 667
B31/82 -55
etc.
The report has header-lines including the Report-ID, the Report-name, the Factory-Name, a page number, the report
columns names, and a separation line (layout – see above).
36
(3)
Task 1: Stores Movement Summary
B) Solution
• Step 1.1: Physical Structures.
SM-Store * Page *
Movement Records
A first look at the “specification” I can define a physical data structure for input and output.
Do not stop the data design at this point and do not start with a program design at this point.
We first have to look at the data structures in more detail and than we have to analyze the task to be
performed.
37
(4)
Task 1: Stores Movement Summary
B) Solution
• Step 1.2: Logical Data Structures.
Group - Part *
Net Movements Page *
___________________
Part_Number
Stores_Movement_Summary
SM
SM-Store *
Movement Records Header Line * Print Line *
PCB
Here I ‘ll show how you can get a better solution regarding a logical data structure reflecting the given task..
- Looking at the tasks we have to perform we can define additional program internal data. The needed internal data flow
can now defined. The relationships between data elements can be shown.
38
(5)
Task 1: Stores Movement Summary
B) Solution
Step 1.2: Logical Data Structures. Boundary clash !
Group - Part *
Net Movements Page *
___________________
Part_Number
Stores_Movement_Summary
SM
SM-Store *
Movement Records Header Line * Print Line *
PCB
Relationship:
Between both data structures there is only one relationship: the data of a group part which are printed in a report line.
Structure Clash:
A structure clash between the input and output data structures occurs if the rules of correspondence are broken. This typical
cause of structure clash is the requirement for the output to be grouped into sections that are not the same size as the pages
of the report. This is known as a boundary clash, because the boundaries of the pages do not coincide with the boundaries
of groups in which the data occur.
-Now you can define a (modular) program structure for both data structures.
-Solutions: (The program structures fits best following the data structures!)
-1) You can define two procedures, which may run in parallel. Following programming language features are needed: Sub-
tasking, wait/post elements.
-2) The data structure/program structure (Input) as shown above on the left site will be defined a the main procedure, the
printing task will be implemented as a sub-procedure (some compromises are necessary to design and to write such a sub-
routine. Here I’m using a general defined print service routine.
39
(6)
Task 1: Stores Movement Summary
Group Net-
-The hierarchical program
movements structure fits best when it
Group - Part * follows the data structures !
SM-Record
Processing
Issue-Record SM-Store *
Processing Movement Records
Receipt Record
Processing
Because we made the decision to use the logical SMF data structure as the basic to build the program structure, we can
build a hierarchical module / code structure. The elements of the report structure are separate into simpler compounds and
added to the program structure as shown in the next foil.
40
(7)
Task 1: Stores Movement Summary
…
Group Net-
movements
Page *
SM-Record
Processing
Issue-Record
Processing Header Line * Print Line *
Receipt Record
Processing
EPRINT
Termination Routine
We design a data control element PCB, which holds all elements needed to produce the SMS report.
The declaration and the code elements to initialize and to terminate the report are moved over to the main module.
The interface between both data structures is one print line.
We now can design a subroutine, which two main components: 1) controlling and printing header lines and 2) printing a
prepared line. Additional this routine has to support eg. Page count, ASA control character etc.
41
(8)
Task 1: Stores Movement Summary
After designing the program structure we now can add needed operations to the program components.
The pseudo code in the above and next foil shows the result to this design step.
42
(9)
Task 1: Stores Movement Summary
*H2 Check for printing Header Lines.* PCB: Print Control Block
IF PCB: MLNO – Number {SL: XASA} <= 0 -…
THEN - MLCNT * Number of max. lines/page
*H2.1 Set Current Date into Header.* - MLNO * Residuary printable no. of lines
{Check and set Date into Header Line.} - MPNO * Current page number
*H2.2 Print Header Lines.* - MHNO * Number of Header lines
Initialize PCB: MLNO by PCB: MLCNT. - YPL * PrintLine
{Count PCB: MPNO by 1; Edit Page Number. - YHL(*) * Header Lines
DO for all Header Lines [PCB: MHNO].
Write Header Line to FSMS. SL: Print Line based on YPL
IF SL: XASA = ‘1’ - XASA * ASA Cpntrol Character
THEN Subtract PCB: MLNO by 1. - XLINE * Remaining Print Line
ELSE Subtract PCB: MLNO by Number {SL: XASA}.
ENDIF.
ENDDO.
ENDIF.
The two main components of the subroutine EPRINT can now be designed. The result is shown in the above foil.
Note: If you can define such subroutines as a “Standard” in your installation, they must not documented each time you can
use this subroutine. Build a library, where you document such standard routines. Further usages only need to have a
reference to this library.
43
(10)
Task 1: Stores Movement Summary
C) Review:
• Regarding of reading SM records I’m using a method called “read ahead”. Why?
PGM:
See above.
44
Agenda
1. Introduction
2. Some Examples/Exercises
• Task 1: Stores Movement Summary
• Task 2: Stores Movement Summary – Maintenance
(Homework)
• Task 3: Collating or Matching Problem
• Task 4: Inventory Update – Collating Problem (Homework)
• Task 5: Telegram Analysis – Boundary Clash (Homework)
3. Conclusion
45
(1)
Task 2: Stores Movement Summary- Maintenance
Examples:
MRIA5/13672 200802020822 120
MRIA5/13672 200802101430 310
MRIA5/13672 200803121500 50
MRRA5/13672 200803121610 100
MRRA5/17924 200802030915 10000 Note: Century added to date/time!
MRIA5/17924 200802051030 333
- Layout of PartNumber: see nexct foil!
MRIB31/82 200802021150 55
etc.
To get a “more stable” program, each input record needs to check for possible errors. Check all fields for formal errors!
- Records with failures should be printed into a separate report and should not go into the SMS report process.
46
(2)
Task 2: Stores Movement Summary - Maintenance
Report Layout: Stores Movement Summary -Summary values of Receipts and Issues
are added to the report;
--- Stores Movement Summary Page: 1
-A summary line of a assembly (first part
Report: SMS XYZ FACTORY Date: 04.10.09
of the PartNumber) is added;
Part_Number Receipts Issues Net_Summary
_______________________________________________________ -Assembies are separated by a blank line.
A5/13672 100 480 -380
A5/17924 10000 333 +9667 -Specification of the PartNumber:
A5/820 0 55 -55
LAaa/NNNnnnn
A5 10100 868 +9232 | |+--- 2nd. Part: 3 to max. 7
| | numeric digits,
A6/13672 100 480 -380 | +---- slash-sign
A6/17924 10000 333 +9667 +---------- 1st. Part: Assembly
Number, must start with a
A6 10100 813 +9287
letter followed by 1 to max. 3
alphanumeric character
A61/821 0 55 -55 (A…Z,ÄÖÜ,0…9)
A61 0 55 -55 PartNumber: max. length: 10 character;
left boundary.
etc.
The report has header-lines including the Report-ID, the Report-name, the Factory-Name, a page number,a date which
represents the date the report was produced, the report columns names, and a separation line (layout – see above).
Additional a summary line for the assembly (first part of the PartNumber) is requested as shown in the report layout.
47
(3)
Task 2: Stores Movement Summary - Maintenance
etc.
ISMS01 V3PSMSV3 ended.
The “Stores Movement Summary” Message Report should look as shown in the foil.
As described before, each input record should be checked for possible errors. If error(s) are detected, they should be shown
in the Message Report; but before a message is written, you should print the record.
Notes:
-Each Message Line starts with a MSG-NO:
- Layout: tSMSnn Message text
|| +---- message number
| +-------- PGM ID; here: SMS
+--------- MSG Type:
I -> Informational message, Return Code: -
W-> Warning message, Return Code: 4
F-> Failure message, Return Code: 8
E-> Emergency error message, Return Code: 12
T-> Termination Message, Return Code: 16
- The highest Return code should bet given back to the Job-Control.
48
(4)
Task 2: Stores Movement Summary - Maintenance
B) Home Work:
49
(5)
Task 2: Stores Movement Summary - Maintenance
C) Solution
• Step 1.1: Physical Structures.
SM-Store * Page *
Movement Records
Output
MSG Report
Page *
Here and in the following foils you can study and compare your solution with my thinking.
50
(6)
Task 2: Stores Movement Summary - Maintenance
C) Solution
• Step 1.2: Logical Data Structures – Part 1.
SCB – Group Control Block Start/ Transfer
Stop MSG
(Proved) FSM-
2
Store Movements Output
Input / SANETM Internal presentation SMS Report
Process
Group - Assembly Assembly_Number
Receipts
Number * Issues
Stores_Movement_Summary
Group – Part Page *
SGNETM Internal presentation
Number *
Part_Number
Receipts
SM Issues
EGETSM Stores_Movement_Summary
Proved SM-Store *
1
Here I ‘ll show a logical data structure reflecting the given task.
51
(7)
Task 2: Stores Movement Summary - Maintenance
C) Solution
• Step 1.3: Logical Data Structures – Part 2.
SCB – Group Control Block
Input / FSM-Store ESMOK
Process Movements Output
SM Missing MSG Report
Information!
FSM Record *
Page *
MCB
FSM Record Error MSG *
MSG Control Block
________________________
…
Here I ‘ll show the similar task, but now for the MSG report: a logical data structure reflecting the given task..
52
(8)
Task 2: Stores Movement Summary - Maintenance
Group - Assembly
Assembly Net- Number *
movements
Group – Part
Group Net-
movements Number *
SM-Record
Processing
Receipt Record EGETSM
Proved SM-Store *
Processing
Movement Records
Issue-Record
Processing
We design a data control element PCB and MCB, which holds all elements needed to produce the SMS report or MSG
report.
The declaration and the code elements to initialize and to terminate the report are moved over to the main module.
The interface between the data structures is one print or message line.
We now can reuse the subroutine EPRINT as design in an earlier task , and we can design a message subroutine with two
main components: 1) controlling and printing header lines and 2) printing a prepared line. Additional this routine has to
support eg. Page count, ASA control character, interpret the message type and save the highest return code etc.
We made an additional decision: We define a subroutine EGETSM to get the next proved SM record. We are not interested
to get SM records into the main program logic which are erroneous.
53
(9)
Task 2: Stores Movement Summary - Maintenance
…
Assembly Net-
movements
Page *
Group Net-
movements
SM-Record
Processing
Receipt Record
Processing Header Line * Print Line *
Issue-Record
Processing
EPRINT
Termination Routine
EPRINT
This foil and the next foil shows the logical data structures to produce the SMS
report and the MSG report.
54
(10)
Task 2: Stores Movement Summary - Maintenance
…
Assembly Net-
movements
Page *
Group Net-
movements
SM-Record
Processing
Receipt Record
Processing Header Line * Print Line *
Issue-Record
Processing
EPRINT
55
(11)
Task 2: Stores Movement Summary - Maintenance
Proved SM Record
FSM-Store
Movements
FSM R. in Error SM
FSM Record
*
FSM Record
During analyzing which operations are needed to design the EGETSM subroutine
we can find that in component “SM Record processing” we have no direct
information to make a decision to step to the part “proved SM record” or to step
to the part “FSM record in error”.
To get this information we make the decision to design a function ESMOK. If
this function finds one error, we know what we have to do.
Looking at the operations which are needed to detect errors, we find, that we
don’t have a programming element to detect an error regarding PartNumber and
Quantity. We need to add an additional function EVERIFY.
56
(12)
Task 2: Stores Movement Summary - Maintenance
Here and in the next foils we can add needed operations to the program / code
structure. Pseudo Code is used to finish this design step.
57
(13)
Task 2: Stores Movement Summary - Maintenance
58
(14)
Task 2: Stores Movement Summary - Maintenance
59
(15)
Task 2: Stores Movement Summary - Maintenance
D) Solution . Step 3.4: Design Program (EVERIFY).
Usage: Input: Value, Mask; Result: TRUE = ok., FALSE = in error
*H1 Initialization Routine.*
Get actual length of Value and Mask: [LIv,Lim].
IF LIv < 1 or Lim < 1
THEN {Set Result to FALSE; RETURN Result.}
{SET Iv and Im to 1; Pick up first character of Value and Mask: [Yv,Ym].}
{Set Result to TRUE. *We assume Value is ok.*; Set Bmoretodo to TRUE.
*H2 Step through value and mask.*
DOWHILE Bmoretodo.
*H2.1 Check current character of Value.* Procedural Design:
SELECT Ym. Pseudo Code
External Routine
*H2.1.1 Letter specification:*
WHEN ‘L’ IF Yv not in Letter THEN {Set Result to FALSE; Set Bmoretodo to FALSE.}
ELSE {Add 1 to Iv and Im.}
WHEN ‘l’ IF Yv not in Letter THEN {Add 1 to Im.} Used Data:
ELSE {Add 1 to Iv and Im.}
*H2.1.2 Alphanumeric specification.*
WHEN ‘A’ IF Yv not in alphanumeric THEN {Set Result to FALSE; Set Bmoretodo to FALSE.}
Value: max. 30 character,
THEN {Add 1 to Iv and Im.} Mask: max. 40 character.
WHEN ‘a’ IF Yv not in alphanumeric THEN {Add 1 to Im.}
ELSE {Add 1 to Iv and Im.} Letter: A…Z ÄÖÜ
*H2.1.3 Numeric spwcification.*
Alphanumeric: A…Z ÄÖÜ0…9
WHEN ‘N’ IF Yv not in numeric THEN {Set Result to FALSE; Set Bmoretodo to FALSE.}
ELSE {Add 1 to Iv and Im.} Numeric: 0…9
WHEN ‘n’ IF Yn not in numeric THEN {add 1 to Im.} Xspecial: any EBCDIC charcter
ELSE {Add 1 to Iv and Im.}
*H2.1.4 Special character.*
WHEN ‘>’ IF Im > Lim THEN {Set Result to FALSE; Set Bmoretodo to FALSE;}
ELSE {Pick up Xspecial from [Mask(Im+1]; IF Xspecial = Yv THEN {Add 1 to Iv; Add 2 to Im.}
ELSE {Set Result to FALSE; Set Bmoretodo to FALSE;}
*H2.1.5 Blank specification.*
WHEN ‘B’ IF Yv = ‘ ‘ THEN {Add 1 to Iv and Im.}
ELSE {Set Result to FALSE; Set Bmoretodo to FALSE.
WHEN ‘b’ IF Yv = ‘ ‘ THEN {Add 1 to IV and Im.}
ELSE {Add 1 to Im.}
*H2.1.6 Invalid Mask specification.*
OTHERWISE {Set Result to FALSE; Set Bmoretodo to FALSE.}
ENDSELECT.
*H2.2 Check for next process action.*
IF Iv > LIv THEN {Set Bmoretodo to FALSE.}
ELSE {Pickup next character of Value [Value(Iv)]}
IF Im > Lim THEN IF Iv <= LIv THEN {Set Result to FALSE; Set Bmoretodo to FALSE.}
ELSE {Set Bmoretodo to FALSE.}
ELSE {Pickup next character of Mask [Mask(Im)].}
ENDWHILE.
*H3 Termination Routine.*
RETURN Result.
Date: 03.10.2009 Program Design & Development Page: 60
60
(16)
Task 2: Stores Movement Summary - Maintenance
D) Solution . Step 3.5: Design Test Program for EVERIFY. Procedural Design:
Pseudo Code
Used Data:
Usage: EVERIFY: Input: Value, Mask; Result: TRUE = ok., FALSE = in error
Value: max. 30 character,
*H1.1 Initialization Routine.* Mask: max. 40 character.
ON ENDFILE SYSIN Set Bmoretodo to FASLE.
Set Bmoretodo to TRUE.
Print Start MSG to file SYSPRINT.
PGM:
- This example is a typical method for a “bottom up” design and coding.
61
(17)
Task 2: Stores Movement Summary - Maintenance
• Expand this function to allow checking signed numeric values: eg. -3.55 or + 10.20
62
(18)
Task 2: Stores Movement Summary - Maintenance
• Why is function ESMOK designed and coded? Is this function dependent to other
code parts?
PGM:
63
Agenda
1. Introduction
2. Some Examples/Exercises
• Task 1: Stores Movement Summary
• Task 2: Stores Movement Summary – Maintenance (Homework)
• Task 3: Collating or Matching Problem
• Task 4: Inventory Update – Collating Problem (Homework)
• Task 5: Telegram Analysis – Boundary Clash (Homework)
3. Conclusion
64
(1)
Task 3: Collating or Matching Problem
FIA
PGM
Merging or
Comparison FOUT
FIB
Multiple Input Data Streams:
• logical independent or
• logical dependent.
Merging or Comparison:
In the commercial data processing this has to be led together from several files to one single file. Reasons may be bring
information up to date or to combine data. Depending on a way of the treatment of the input records we can discuss two
different type of processing systematically: The Merging and Comparison. The essential difference consists that when
merging all input records are left in their original form and only the order of their expense will be defined, against
comparison new output records can be created or can be deleted.
Multiple Input Data Streams:
In the case of multiple input data streams, it must be cleared at the design stage, whether these data streams can "logically
independently" of each other be processed - that is after each other- or whether they are "logically dependent" therefore a
common processing is required.
65
Task 3: Collating or Matching Problem (2)
Example 1: Merging of two datasets Example see: JSP, Klaus Kilberth, page 108…110
File FIA: 4, 5, 6, 7, 9
File FIB: 1, 2, 3, 4, 7, 8 Both files are in ascending order!
The records of FIA and FIB are written into file FOUT in the following groups:
• If records have the same key, the record of file FIA has to be written first to the output file.
Merging:
Multiple input data streams are merged into an output data stream. Each input
record is written to the output data stream. The sequence of records is defined by
processing a processing rule. No record is lost. The number of output records is
equal to the sum of numbers of the input records. The records in the output file
are in ascending order.
66
Task 3: Collating or Matching Problem (3)
Group O *
As shown in the previous foil we can define a sequence component for each
group of a sequence of IA records and IB records. At the first and at the last O
group the body of group IA or group IB may be empty. The input/output data
structures are expanded by a level representing a key group.
The references between data elements are shown.
67
Task 3: Collating or Matching Problem (4)
Group O *
Process Rec. IA *
(3)
Process Group IB -
Group IA * Group IA - Group IB - Group IB *
Process Rec. IB *
Conditions:
(1): ¬ (Key IA||Key IB = HIGH)
(2): ¬ (Key IA||Key IB = HIGH) & Key IA <= Key IB
(3): ¬ (Key IA||Key IB = HIGH) & KEY IB < Key IA
The control of the processing is dependent of the keys of records IA and IB. The
current keys are saved into the SCB control block.
Now the program structure can be easily defined as shown in the above foil.
Note: The conditions concerning the component control can be established
already at this time.
68
Task 3: Collating or Matching Problem (5)
Used Data:
D) Task 3: V01 Design Pseudo Code
Files: FIA, ON ENDFILE:
Set SCB Key value
FIB, to HIGH
Example 1: Merging of two datasets FOUT
Records: SIA
- XKEY
Usage: Input: Files FIA,FIB; Output: FOUT; - XTEXT
Record Layouts: SIA, SIB; Control block: XCB respectively SCB SIB
*H1.1 Initialization Routine.* - XKEY
{OPEN File FIA, FIB INPUT; File FOUT OUTPUT.} - XTEXT
*H2 Merge File FIA, FIB to File FOUT.* Internal: SCB or XCB
*H3 Process group O,* - XKEYIA
{CALL EGETIA; CALL EGETIB.} EGETIA: - XKEYIB
DOWHILE XCB not HIGH. *HG1 Initiation Routine.*
*H4.1 Process one group IA.*
ON ENDFILE FIA
DOWHILE (XCB not HIGH) & SCB.XKEYIA <= SCB.XKEYIB.
{Set SCB.XKEYIA to HIGH; RETURN.}
*H4.1.1 Process record IA.*
*HG2 Read and prepare record for processing.*
Write SIA to file FOUT.
{Read a record from FIA;
CALL EGETIA.
Set SCB.XKEYIA to SIA.KEY.}
ENDWHILE.
RETURN.
*H4.2 Process one group IB.*
DOWHILE (XCB not HIGH) & SCB.XKEYIB <= SCB.XKEYIA.
EGETIB:
*H4.2.1 Process record IB.*
*HG1 Initiation Routine.*
Write SIB to file FOUT.
ON ENDFILE FIB
CALL EGETIB.
{Set SCB.XKEYIB to HIGH; RETURN.}
ENDWHILE.
*HG2 Read and prepare record for processing.*
ENDWHILE.
{Read a record from FIB;
*H1.2 Termination Routine.*
Set SCB.XKEYIB to SIB.KEY.}
Close all Files.
RETURN.
PGM:
Now we can design the program control elements and the needed operations.
69
Task 3: Collating or Matching Problem (6)
70
(1)
Task 3: Collating or Matching Problem
FIA
PGM
Merging or
Comparison FOUT
FIB
Multiple Input Data Streams:
• logical independent or
• logical dependent.
Merging or Comparison:
In the commercial data processing this has to be led together from several files to one single file. Reasons may be bring
information up to date or to combine data. Depending on a way of the treatment of the input records we can discuss two
different type of processing systematically: The Merging and Comparison. The essential difference consists that when
merging all input records are left in their original form and only the order of their expense will be defined, against
comparison new output records can be created or can be deleted.
Multiple Input Data Streams:
In the case of multiple input data streams, it must be cleared at the design stage, whether these data streams can "logically
independently" of each other be processed - that is after each other- or whether they are "logically dependent" therefore a
common processing is required.
71
Task 3: Collating or Matching Problem (2)
File FIA: 4, 5, 6, 7, 9
File FIB: 1, 2, 3, 4, 7, 8 Both files are in ascending order!
The records of FIA and FIB are written into file FOUT in the following groups:
• If records have the same key, the record of file FIA has to be written first to the output file.
Merging:
Multiple input data streams are merged into an output data stream. Each input
record is written to the output data stream. The sequence of records is defined by
processing a processing rule. No record is lost. The number of output records is
equal to the sum of numbers of the input records. The records in the output file
are in ascending order.
72
Task 3: Collating or Matching Problem (3)
Group O *
As shown in the previous foil we can define a sequence component for each
group of a sequence of IA records and IB records. At the first and at the last O
group the body of group IA or group IB may be empty. The input/output data
structures are expanded by a level representing a key group.
The references between data elements are shown.
73
Task 3: Collating or Matching Problem (4)
Used Data:
C) Task 3: V02 Design Program Structure
Files: FIA, FIB, GOUT
Rec. SIA
Example 1: Merging of two datasets - XKEY, ON ENDFILE:
Set SCB Key value
- KTEXT to HIGH
SIB
Logical data structures - XKEY
Merge IA,IB to O
- XTEXT
SCB Internal: SCB
(1) - XKEYIA
Process Group O *
FIA-File FOUT-File FIB-File - XKEYIB
(2)
Process Rec. IA
Group O *
(3)
Process Rec. IB
Record IA * Record IA Record IB Record IB *
Conditions:
(1): ¬ (Key IA||Key IB = HIGH)
(2): Key IA <= Key IB
(3): else condition
The control of the processing is dependent of the keys of records IA and IB. The
current keys are saved into the SCB control block.
Now the program structure can be easily defined as shown in the above foil.
Note: The conditions concerning the component control can be established
already at this time.
74
Task 3: Collating or Matching Problem (5)
Used Data:
D) Task 3: V02 Design Pseudo Code
Files: FIA, ON ENDFILE:
Set Key value to
FIB, HIGH
Example 1: Merging of two datasets FOUT
Records: SIA
- XKEY
Usage: Input: Files FIA,FIB; Output: FOUT; - XTEXT
Record Layouts: SIA, SIB; Control block: XCB respectively SCB SIB
*H1.1 Initialization Routine.* - XKEY
{OPEN File FIA, FIB INPUT; File FOUT OUTPUT.} - XTEXT
*H2 Merge File FIA, FIB to File FOUT.* Internal: SCB or XCB
*H3 Process group O,* - XKEYIA
{CALL EGETIA; CALL EGETIB.} EGETIA: - XKEYIB
DOWHILE XCB not HIGH. *HG1 Initiation Routine.*
*H4.1 Process one input record SIA or SIB.*
ON ENDFILE FIA
IF SCB.XKEYIA <= SCB.XKEYIB
{Set SCB.XKEYIA to HIGH; RETURN.}
THEN {
*HG2 Read and prepare record for processing.*
*H4.1.1 Process record IA.*
{Read a record from FIA;
Write SIA to file FOUT.
Set SCB.XKEYIA to SIA.KEY.}
CALL EGETIA.
RETURN.
}
ELSE {
EGETIB:
*H4.2.1 Process record IB.*
*HG1 Initiation Routine.*
Write SIB to file FOUT.
ON ENDFILE FIB
CALL EGETIB.
{Set SCB.XKEYIB to HIGH; RETURN.}
}
*HG2 Read and prepare record for processing.*
ENDWHILE.
{Read a record from FIB;
*H1.2 Termination Routine.*
Set SCB.XKEYIB to SIB.KEY.}
Close all Files.
RETURN.
Make it as simple as possible! PGM:
Now we can design the program control elements and the needed operations.
75
Agenda
1. Introduction
2. Some Examples/Exercises
• Task 1: Stores Movement Summary
• Task 2: Stores Movement Summary – Maintenance (Homework)
• Task 3: Collating or Matching Problem
• Task 4: Inventory Update – Collating Problem (Homework)
• Task 5: Telegram Analysis – Boundary Clash (Homework)
3. Conclusion
76
(1)
Task 4: Inventory Update - Collating Problem
Inventory
FMSG Report
FSM
Multiple Input Data Streams:
• logical dependent.
77
(2)
Task 4: Inventory Update - Collating Problem
Examples:
IV A5/13571 Bolt x1/2 555
IV A5/13572 Bolt x20/3d 1200
IV A5/13672 Gear c1 30700
IV A5/13673 Gear c2 224
IV A6/17924 Generator T51 55
IV A6/17925 Generator T651 123
IV B31/823 Wheel x2/3 10005
IV B31/950 Motor T6 5555
IV CA522/2005Nut x2 99500
etc.
78
(3)
Task 4: Inventory Update - Collating Problem
Examples:
SMIA5/13672 200802020822 120
SMIA5/13672 200802101430 310
SMIA5/13672 200803121500 50
SMRA5/13672 200803121610 100
SMRA5/17924 200802030915 10
SMIA5/17924 200802051030 66
SMIA6/17952 200802051035 2
SMIA6/17952 200802051040 3
SMIB31/82 200802021150 55
SMIB31/823 200802021155 10
SMIB31/823 200802021410 15
etc.
Date: 03.10.2009 Program Design & Development Page: 79
The layout of the Inventory File FSM is shown. Multiple records may be there for a Part Number.
Note: For this exercise we assume, that the records are formal correct.
79
(4)
Task 4: Inventory Update - Collating Problem
Example:
ISMS02 Statistics:
ISMS02 No. IV records read: 9
ISMS02 No. SM records read: 11
ISMS02 No. SM records not processed: 3
ISMS02 No. IV records written: 9
ISMS02 No. IV records updated: 3
ISMS01 V3PINVV1 ended.
80
(5)
Task 4: Inventory Update – Collating Problem
B) Home Work:
81
(6)
Task 4: Inventory Update – Collating Problem
FSM-Store
FIV Inventory FOIV Inventory
Movements
The logical data structures of both input data sets and the logical data structure of
the output data set is shown.
82
(7)
Task 4: Inventory Update – Collating Problem
Conditions:
(1): PartNo IV < PartNo SM
(2): PartNo IV = PartNo SM IV Group *
FMSG
(3): PartNo SM < PartNo IV
IV Record *
unmatched SM Record * SM Record *
IV Record SM Record * IV Record *
unmatched 0 matched o
IV Record IV Record
SM Issue 0 SM Receipt o
Record REcord
matched SM Record *
IV Record
Starting from the two input data sets, I now design the data structure (IV Update)
as seen by the IV Update program. The relationships between input and output
data elements are shown.
At this design point you can define conditions to control groups. Additional you
can design program internal control structures like SCB and STAT.
Note: Data structures for the message report are not shown again. A standard as
shown in earlier tasks will be used; so we do not repeat the design steps for this
part.
83
(8)
Task 4: Inventory Update – Collating Problem
Used Data:
D) Solution: Program Design
SCB STAT Files: FIV, FSM, FOIV, FMSG
Rec. SIV
FMSG ON ENDFILE:
IV Update IV Update IV Update - XPartNo,
Set SCB Key
-… value to
(1)
SSM HIGH
IV Group * - XPartNo,
IV Group * -…
Unmatched Grp IV o (2)
Internal: SCB
unmatched Rec. IV - XPartNo IV XCB
- XPartNo SM
(5)
Unmatched
- YPartNo SM
Unmatched matched group
group IV o IV/SM 0 group SM o (3)
matched Grp IV/SM o
STAT
matched IV Rec, - No. IV records read,
unmatched - No. SM records read,
IV Record SM Record *
SM Rec. * (5) - No. SM records not processed,
- No. IV records written,
SM Issue. o
- No. IV records updated.
matched SM Record * …
IV Record
SM Receipt. o
EMSG
The IV Update data structure is the basic to define the program control structure.
Additional you can complete design elements for the used data and you can
complete conditions to control program elements.
84
(9)
Task 4: Inventory Update – Collating Problem
In this and the following foil I show the “Pseudo Code” to complete the initial
design phase.
85
(10)
Task 4: Inventory Update – Collating Problem
EGETIV:
*HG1 Initialization routine.*
ON ENDFILE FIV
{Set SCB.XPartNo IV to HIGH, RETURN.}
*HG2 Read and prepare next IV record.*
Read SIV record from FIV.
Save SIV.XPartNo to SCB.XPartNo IV.
Count IV record.
RETRUN.
EGETSM:
*HG1 Initialization routine.*
ON ENDFILE FSM
{Set SCB.XPartNo SM to HIGH, RETURN.}
*HG2 Read and prepare next SM record.*
Read SSM record from FSM.
Save SSM.XPartNo to SCB.XPartNo SM.
Count SM record.
RETRUN.
You can find the program code, test data, and test results through clicking the
PGM hyperlink on the above foil.
86
(11)
Task 4: Inventory Update – Collating Problem
PGM:
87
Agenda
1. Introduction
2. Some Examples/Exercises
• Task 1: Stores Movement Summary
• Task 2: Stores Movement Summary – Maintenance (Homework)
• Task 3: Collating or Matching Problem
• Task 4: Inventory Update – Collating Problem (Homework)
• Task 5: Telegram Analysis – Boundary Clash (Homework)
3. Conclusion
88
(1)
Task 5: Telegram Analysis
A) Task 5: Requirements
Telegram Report
PGM
Telegram FPRINT
FTELE Analysis
Specifications:
A program is required to process a stream of telegrams. This stream is available
as a sequence of letters and/or digits and blanks on a file FTELE. The file contains fixed
length records (80 bytes). The words in the telegram is delimited by the word ZZZZ.
The stream is terminated by the occurrence of the empty telegram that is a telegram
with no words. Each telegram is to be processed to determine the number of chargeable
words and to check for occurrences of over-length words. The words ZZZZ and STOP are
not chargeable and words of more than 12 letters are considered over-length. The
result of the processing is to be a neat listing of the telegrams each accompanied
by the word count and a message indicating the occurrence of over-length words.
89
(2)
Task 5: Telegram Analysis
FTELE:
Habe Informationen gefunden STOP
Die Erste Donau-Dampfschiffahrts-Gesellschaft (oft auch Donaudampfschiffahrtsges
ellschaft, kurz DDSG) ist eine österreichische Schifffahrtsgesellschaft zur
Beschiffung der Donau und ihrer Nebenflüsse STOP In den 1990er Jahren wurde die
Gesellschaft aufgeteilt und privatisiert STOP ZZZZ
Ihre Nachfolgegesellschaften sind die DDSG Blue Danube im
Passagierbereich und die DDSG Cargo im Frachttransportbereich STOP
Letztere wurde 2007 weiterverkauft und wieder in Erste
Donau-Dampfschiffahrts-Gesellschaft rück-umbenannt STOP
Die Zentrale befindet sich am Wiener Handelskai 265 ZZZZ Der Flottenstand der DD
SG umfasste zu dieser Zeit über 200 Dampfschiffe und ca. 1.000 Güterkähne STOP
Weiter verfügte die DDSG über eigene Schiffswerften sowie ein
Kohlebergwerk bei Fünfkirchen und mehrere Niederlassungen an der Donau
STOP Auf den Schiffen der DDSG wurden damals auch Postsendungen mit eigenen Brie
fmarken befördert STOP ZZZZ ZZZZ
90
(3)
Task 5: Telegram Analysis
A) Task 5: Report
Telegram Report
PGM
Telegram FPRINT
FTELE Analysis
Report: (Example)
TELEGRAM ANALYSIS
TELEGRAM 1
32 WORDS OF WHICH 5 OVERSIZE
TELEGRAM 2
33 WORDS OF WHICH 6 OVERSIZE
TELEGRAM 3
46 WORDS OF WHICH 4 OVERSIZE
END TELEGRAM ANALYSIS
- The "STOP" word is dealt with as a special word, i.e., it is not counted as a
chargeable word. Same is true for “ZZZZ”.
- An oversized word is counted.
-The telegram number is the serial number of the telegram in the telegram
sequence.
- Output starts with a heading message, and ends with termination message as
shown in the foil.
91
(4)
Task 5: Telegram Analysis
Tel. Body
seen by EP1
(1)
Stream I/O
(3)
Over sized - STAT
-NO
Conditions: Conditions: -NWORD
(1) ¬EOF (1) XWORD ¬= 'ZZZZ‘ -NOOSIZE
(2) ¬EOF & XCHAR = ' ' (2) XWORD = 'STOP'
(3) ¬BEOF & XCHAR ¬= ' ' (3) LENGTH(XWORD) > 12
-Note: Using a “stream I/O” technique we don’t see records. They are hidden to the program. We can define the FTELE
file as a sequence of characters.
92
(5)
Task 5: Telegram Analysis
Process FTELE *
seen by EP1
Stream I/O
String
Record *
Process String
Space * Character *
Get a Word
Looking at the first part we can define a program structure for this subtask.
Note: The communication area needs two control elements to communicate with the other subtask.
93
(6)
Task 5: Telegram Analysis
Line 1 Line 2
Report Ending
Over sized -
STAT
-NO
-NWORD
-NOOSIZE
The program structure for the second subtask can now be designed.
94
(7)
Task 5: Telegram Analysis
Now we can design the program logic for both subtasks EP1 and EP2 (see next foil).
Note: Both subtasks needs control elements to communicate with each other:
POST and WAIT:
POST means signal that I’m finished with my part of work, and
WAIT means I need to wait until the next element (here a telegram word XWORD) is ready for processing.
95
(8)
Task 5: Telegram Analysis
PGM:
… follow up.
The Main program only needs to invoke both subtasks and has to wait until both subtasks are finished.
96
(9)
Task 5: Telegram Analysis
PGM:
- See above….
97
(10)
Task 5: Telegram Analysis V02
Telegram Analysis
• Data structures,
• Program Structures,
• Pseudo Code,
• Program Code (PL/I),
• Basic Test.
98
(11)
Task 5: Telegram Analysis V02
Process Telegrams
Tel. Body
Report Report
Process Real Telegrams
Heading Ending
Real Null ZZZZ
Telegram * Telegram STOP Word
Tel. Body
Word
Telegram
ZZZZ * Word over size
Word * Telegram R.
* Print Telegram Infos
Report Ending
STOP 0 Word 0
Line 1 Line 2
Over sized -
STAT
-NO
-NWORD
-NOOSIZE
Looking at the data structures you can see, that the logical data structure to process a telegram is much more complex as
the logical data structure to build a telegram word.
That’s the reason I take the above data structures to define the main module. In the next step I need to integrate the
input/process data structures into the module hierarchy. See next foil.
99
(12)
Task 5: Telegram Analysis V02
String
STOP Word
Record *
Word
Looking at the input/process data structures, you can see that we have 2 important elements:
- skip over spaces, and build a telegram word.
We can define a subroutine EGETWRD to process these two parts.
The other declaration parts and initial coding and termination coding parts to process the input file ETELE are moved over
to the initial part and termination part of the main module ETELE2.
100
(13)
Task 5: Telegram Analysis V02
We can now define the program logic as shown in the above foil.
101
(14)
Task 5: Telegram Analysis V02
• Questions:
• ???
PGM:
102
Agenda
1. Introduction
• Review: Structured Programming / Pseudo Code
• Review: Modular Design
• Review: (H)IPO and Data Structures
• A general Program Design Strategy
2. Some Examples/Exercises
3. Conclusion
"Everybody is a genius. But if
you judge a fish by its ability to
climb a tree, it will spend its
whole life thinking its stupid."
Albert Einstein.
103
Conclusion (1)
Without a doubt, it is more interesting than computer programming (not that programming is dull) because it
involves studying the interactions of people, and disparate groups of people, and computers and organizations.
As Tom DeMarco said in his delightful book, Structured Analysis and Systems Specification (DeMarco, 1978):
[systems] analysis is frustrating, full of complex interpersonal relationships, indefinite, and difficult. In a word,
it is fascinating. Once you’re hooked, the old easy pleasures of system building are never again enough to
satisfy you.
I hope you will be armed with a tremendous amount of technical information that will help you develop
accurate models of complex systems, and you will know the step-by-step techniques for carrying out a
systems analysis effort. But you will still need a great deal of real-world work to learn the people skills: how to
interview a variety of disparate users to understand the true essence of a system; how to present the results
of your systems analysis work so that everyone can see a credible estimate of the costs and benefits of
developing a new system; and how to distinguish problems from symptoms. As Barry Boehm pointed out in his
classic work, Software Engineering Economics (Boehm, 1981):
Each of us as individual software engineers has an opportunity to make a significant positive impact on
society, simply by becoming more sensitive to the long-range human relations implications of our work, and by
incorporating this sensitivity into our software designs and products.
It takes some practice to do this well, and to learn how to balance human relations concerns with
programming and quantitative economic concerns. The big thing to remember in doing so is to keep our
priorities straight between programming, budgetary, and human considerations.
104
Conclusion (2)
PROGRAMMING AS A PROCESS:
“Of course! Why didn't I ever think of that?” D.E. Knuth
A Revolution in Programming?
•Programming starts with a problem and ends with an efficient solution. 'To have an idea' frequently amounts
to finding a solution irrespective of how inefficient it is, and it is hard to say what is more difficult: finding a
solution or refining it.
•Programming is program development. Development goes in small steps: Programming goes stepwise.
Independent of the architecture of the storage-controlled machine, program development is refinement. Thus,
programming is done by stepwise refinement. Refinement may mean: sub-structuring the operations. It may
also mean: sub-structuring the objects, introducing 'data structures'. Frequently, it is done by joint refinement.
Thus, programming means structuring.
105
Conclusion (3)
Closing remarks:
• After this lecture you should know how to design and
structure a given programming task.
• The resulting data structures, program structures and
pseudo-code may a good starting point to write good proper
programs.
My main goal was to build structured program logic. I tried to achieve this goal by applying a language
independent method. Additionally I explained side effects to achieve our goal.
In the first part of my presentation I gave a short review about basic control elements of the structure
theorem.
In the part example/exercises I explain basic methods to structure a given task by defining data structures,
which results in program structures. Having a program structure you can define the program logic by using
pseudo code. This step is independent of any programming language.
Before starting coding, you may discuss and prove your findings with your clients. This part of software
engineering techniques is not part of the given lecture.
The final result may be a starting point for further work, preparing testing tasks, - performance optimization, -
maintenance tasks, - other engineering tasks like documentation etc...
106
Source
See:
Books:
• Aktas, A. Z., Structured Analysis and Design of Information Systems, Prentice-
Hall,Englewood Cliffs, NJ, 1987.
• DeMarco, T., Structured Analysis and System Specification, Prentice-Hall,
Englewood Cliffs, NJ, 1979.
• Martin, J. and McClure, C., Structured Techniques: The Basis for CASE, Prentice-
Hall, Englewood Cliffs, NJ, 1988.
• Yourdon, E. and Constantine, L. L., Structured Design. Fundamentals of a Discipline
of Computer Program and Systems Design, Prentice-Hall, Englewood Cliffs, NJ, 1979.
• Yourdon E., Modern Structured Analysis, Prentice-Hall, Englewood Cliffs, NJ,1989.
• Yourdon, E., Techniques of Program Structure and Design, Prentice-Hall,
Englewood Cliffs, NJ, 1989.
• Principles of Program Design, M.A. Jackson, Academic Press, 1975
• Einführung in die Methode des Jackson Structured Programming, Klaus Kilberth,
Vieweg 1988.
• JSP for practical program design, K.E. Dudman, Springer 1996.
• Tom DeMarco, Structured Analysis and Systems Specification. Englewood Cliffs,
N.J.: Prentice-Hall, 1979.
In all sessions I like to motivate you to study additional books and publications about Reverse
Engineering/Code Restructuring.
107
Discussion (1)
108
Questions / Comments…
???
Questions, comments, further information?
Please feel free to e-mail me!
Dipl.Ing. Werner Hoffmann
EMAIL: pwhoffmann@t-online.de or
pwhoffmann@aol.com
Date: 03.10.2009 SE_PGM_Design_V2.ppt Page: 109
The time for this lecture is over. If you have additional questions or comments or
like to get further information please feel free to e mail me at pwhoffmann@t-
online.de or pwhoffmann@aol.com.
109
Now we can starting working…
… ??? …
110
The End…
Program Design & Development
I tha
n
your k you for
atten
tion
!
I hope this lecture was right for you! Thank you for your attention!
111
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
00139800
/*** GROUP NET MOVEMENTS INFORMATIONS ---------------------------*/ 00139900
DCL 1 SGNETM STATIC, /* GROUP NET MOVEMENTS */ 00140100
2 XPARTNO CHAR(10), /* PART NUMBER */ 00140300
2 NNETS BIN FIXED(31); /* NET MOVEMENTS */ 00140406
00140500
/*** SUBROUTINES/FUNCTIONS/BUILTIN ------------------------------*/ 00140600
DCL EPRINT ENTRY(FILE,POINTER);/* PRINT PROCEDURE */ 00141000
DCL EADDR1 ENTRY(POINTER,BIN FIXED(31)) RETURNS(POINTER); 00141110
DCL ADDR BUILTIN; /* */ 00142001
00150000
/*H1.1 INITIAL ROUTINE --------------------------------------------*/ 00151000
ON ENDFILE(FSM) BFSMEOF = '1'B;/*SET EOF CONDITION */ 00152011
PFSMS = SPCB1.QPL; /*POINT TO PRINT LINE */ 00160015
OPEN FILE(FSM) INPUT; /*OPEN STORES MOVEMENT FILE */ 00160111
OPEN FILE(FSMS) OUTPUT; /*OPEN PRINT FILE */ 00160201
/*H2 PROCESS FILE FSM ===========================================*/ 00161218
/*H3 PROCESS ALL GROUPS OF NETMOVEMENTS =========================*/ 00161318
READ FILE(FSM) SET(PSM); /*GET FIRST FSM RECORD */ 00161418
DO WHILE(¬BFSMEOF); 00161511
/*H3.1 PROCESS ONE GROUP OF NETMOVEMENTS --------------------------*/ 00161618
/*H3.1. GROUP NETMOVEMENTS PROCESSING (INITIAL ROUTINE)-------------*/ 00161718
SGNETM.XPARTNO = SSM.XPARTNO; /*SAVE PART NUMBER */ 00161818
SGNETM.NNETS = 0; /* CLEAR NET MOVEMENTS SUMMARY */ 00161906
/*H4 PROCESS SM RECORDS FOR ONE NETMOVEMENT GROUP ==============*/ 00162018
DO WHILE(¬BFSMEOF & (SSM.XPARTNO=SGNETM.XPARTNO)); 00162118
/*H4.1 PROCESS ONE SM RECORD -------------------------------------*/ 00162218
SELECT(SSM.XRTYPE); 00162318
/*H4.1.1 ISSUE RECORD ---------------------------------------------*/ 00162418
WHEN('I') /* */ 00162501
SGNETM.NNETS = SGNETM.NNETS - SSM.NQTY; 00162618
/*H4.1.2 RECEIPT RECORD -------------------------------------------*/ 00162718
WHEN('R') /* */ 00162801
SGNETM.NNETS = SGNETM.NNETS + SSM.NQTY; 00162918
/*H4.1.3 NOT USED -------------------------------------------------*/ 00163017
OTHERWISE; 00163114
END; 00163201
READ FILE(FSM) SET(PSM);/*GET NEXT FSM RECORD */ 00163318
END; 00163401
/*H3.2 GROUP NETMOVEMENTS PROCESSING (EDIT AND PRINT ROUTINE)------*/ 00163501
SFSMS.XPARTNO = SGNETM.XPARTNO; /*PREPARE PRINT LINE */ 00163611
SFSMS.NNETS = SGNETM.NNETS; 00163711
CALL EPRINT(FSMS,PPCB1); /*PRINT GROUP SUMMARY LINE */ 00163801
END; 00163901
/*H1.2 TERMINATION ROUTINE ----------------------------------------*/ 00164001
CLOSE FILE(*); /*CLOSE ALL OPEN FILES */ 00164101
END EPSMSV2; 00165010
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 2
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
File: V3DPCB01.TXT
/*PPL-TITLE: Print Control Block V01 */ 00010016
/********************************************************************/ 00020000
/* Print Control Block PGM V3PSMSV2 */ 00030016
/********************************************************************/ 00040000
DCL PPCB1 POINTER INIT(ADDR(SPCB1));/*Pointer to PCB V01*/ 00050001
DCL 1 SPCB1 UNALIGNED, /* Print Control Block V01*/ 00060016
2 QSN POINTER /* Address of Page Number */ 00070016
INIT(EADDR1(ADDR(SPCB1.YHL(1)),38)), 00080010
2 QDT POINTER /* Address Edit-Date */ 00081016
INIT(EADDR1(ADDR(SPCB1.YHL(2)),35)), 00082010
2 QPL POINTER /* Address of Print Area */ 00090016
INIT(ADDR(SPCB1.YPL)), 00091007
2 MLCNT BIN FIXED(15) /* Number of max. Lines per Page */ 00100016
INIT(60), 00110000
2 MLNO BIN FIXED(15) /* Residuary printable No. of Lines*/ 00120016
INIT(0), 00130000
2 MPNO BIN FIXED(15) /* Current Page Number */ 00140016
INIT(0), 00150000
2 MHNO BIN FIXED(15) /* Number of Header Lines */ 00160016
INIT(4), 00170010
2 YPL CHAR(133) /* PrintLine -Communication Area -*/ 00180016
INIT((133)' '), 00190010
2 YHL(4) CHAR(133) INIT /* Header Lines */ 00200016
('1--- Stores Movement Summary Page: NNNNN 00210014
', 00220001
' Report: SMS XYZ FACTORY Date: DD.MM.YY 00221012
', 00222001
' PART_NUMBER NET_SUMMARY 00222112
', 00222210
' _________________________________________ 00223002
'); 00224001
00230000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 3
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 7
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
JCL:
File: TASK01.TXT
File: TASK01M.TXT
File: TASK01G.TXT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 8
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Test Data:
File: SMT201.txt
File: SMT201.txt
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
11
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Report Output:
File: TASK01T1.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
08.44.07 JOB01562 ---- SATURDAY, 03 OCT 2009 ----
08.44.07 JOB01562 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
08.44.07 JOB01562 ICH70001I P390A LAST ACCESS AT 08:38:32 ON SATURDAY, OCTOBER 3, 2009
08.44.07 JOB01562 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
08.44.07 JOB01562 IEF403I P390AC - STARTED - TIME=08.44.07
08.44.09 JOB01562 IEF404I P390AC - ENDED - TIME=08.44.09
08.44.09 JOB01562 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 03 OCT 2009 JOB EXECUTION DATE
- 7 CARDS READ
- 86 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 4 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01562
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPSMSV2
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPSMSV2,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 XXSYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
//* TEST RUN VERSION 1
11 //GO.FSM DD DSN=P390A.RUN.DATA(SMT201),DISP=SHR
12 //GO.FSMS DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2660)
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PLIZG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 08:38:32 ON SATURDAY, OCTOBER 3, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A81 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO PRINT
IEF237I JES2 ALLOCATED TO CEEDUMP
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF237I 0A90 ALLOCATED TO FSM
IEF237I JES2 ALLOCATED TO FSMS
IEF142I P390AC GO PLICOMP - STEP WAS EXECUTED - COND CODE 0000
IEF285I P390A.PGM.LOAD KEPT
IEF285I VOL SER NOS= USR001.
IEF285I CEE.SCEERUN KEPT
IEF285I VOL SER NOS= Z5RES2.
IEF285I P390A.P390AC.JOB01562.D0000101.? SYSOUT
IEF285I P390A.P390AC.JOB01562.D0000102.? SYSOUT
IEF285I P390A.P390AC.JOB01562.D0000103.? SYSOUT
IEF285I P390A.P390AC.JOB01562.D0000104.? SYSOUT
IEF285I P390A.RUN.DATA KEPT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
12
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
File: TASK01T2.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
08.38.32 JOB01561 ---- SATURDAY, 03 OCT 2009 ----
08.38.32 JOB01561 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
08.38.32 JOB01561 ICH70001I P390A LAST ACCESS AT 08:36:09 ON SATURDAY, OCTOBER 3, 2009
08.38.32 JOB01561 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
08.38.32 JOB01561 IEF403I P390AC - STARTED - TIME=08.38.32
08.38.34 JOB01561 IEF404I P390AC - ENDED - TIME=08.38.34
08.38.34 JOB01561 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 03 OCT 2009 JOB EXECUTION DATE
- 7 CARDS READ
- 156 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 6 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01561
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPSMSV2
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPSMSV2,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 XXSYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
//* TEST RUN VERSION 2
11 //GO.FSM DD DSN=P390A.RUN.DATA(SMT202),DISP=SHR
12 //GO.FSMS DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2660)
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PLIZG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 08:36:09 ON SATURDAY, OCTOBER 3, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A81 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
13
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
14
Software Engineering - Task 1: Stores Movement Summary Date: 10/25/2009
H4/17924 -9667
H41/82 -55
I4/13673 +100
I4/17924 -9667
I41/82 -55
I5/13673 +100
1--- Stores Movement Summary Page: 2
Report: SMS XYZ FACTORY Date: 03.10.09
PART_NUMBER NET_SUMMARY
_________________________________________
I5/17924 -9667
I51/82 -55
I6/13673 +100
I6/17924 -9667
I66/82 -55
I7/13673 +100
I7/17924 -9667
I76/82 -55
I8/13673 +100
I8/17924 -9667
I86/82 -55
I9/13673 +100
I9/17924 -9667
I96/82 -55
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
15
Software Engineering - Task 2: Stores Movement Summary-Maintenance Date: 10/25/2009
Function EVERIFY
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 1
Software Engineering - Task 2: Stores Movement Summary-Maintenance Date: 10/25/2009
Function EVERIFY
INIT('0123456789'); 00020202
DCL Xblank CHAR(1) STATIC /*blank */ 00020302
INIT(' '); 00020402
DCL Xspecial CHAR(1) STATIC /*special sign - given by mask */ 00020502
INIT('?'); 00020602
DCL (INDEX,LENGTH,SUBSTR) BUILTIN;/*BUILTIN Functions */ 00020706
00020806
/*H1 Initate routine ------------------------------------------- */ 00020906
LIv = LENGTH(Xvalue); /*get real lengths */ 00021007
LIm = LENGTH(Xmask); /* */ 00022007
IF LIv < 1 | /*check for min. length */ 00022107
LIm < 1 /* */ 00022207
THEN /* */ 00023016
DO; /* */ 00023116
Bresult = '0'B; /*wrong usage */ 00023216
RETURN(Bresult); /*return to caller */ 00023316
END; /* */ 00024016
00024101
Iv = 1; /*point to first character -value */ 00024213
Im = 1; /*point to first character -mask */ 00024313
Yv = SUBSTR(Xvalue,Iv,1); /*pick up one char. of value */ 00024405
Ym = SUBSTR(Xmask,Im,1); /*pick up one char. of mask */ 00024505
Bresult = '1'B; /*I assume Xvalue may be ok. */ 00024616
Bmoretodo = '1'B; /*Set process status */ 00024716
/*H2 Step through value and mask --------------------------------*/ 00024806
DO WHILE(Bmoretodo); 00024901
/*H2.1 check a character of value ---------------------------------*/ 00025013
SELECT(Ym); 00025116
/*H2.1.1 Letter specification --------------------------------------*/ 00025213
WHEN('L') 00025302
IF INDEX(Xletter,Yv) = 0 00025403
THEN DO; Bresult = '0'B; Bmoretodo = '0'B; END; 00025509
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00025603
WHEN('l') 00025703
IF INDEX(Xletter,Yv) = 0 00025803
THEN Im = Im + 1; 00025904
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00026003
/*H2.1.2 Alphanumaric specification -------------------------------*/ 00026113
WHEN('A') 00026203
IF INDEX(Xalphanum,Yv) = 0 00026303
THEN DO; Bresult = '0'B; Bmoretodo = '0'B; END; 00026409
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00026503
WHEN('a') 00026603
IF INDEX(Xalphanum,Yv) = 0 00026703
THEN Im = Im + 1; 00026804
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00026903
/*H2.1.3 Numeric specification -------------------------------------*/ 00027013
WHEN('N') 00027103
IF INDEX(Xnum,Yv) = 0 00027203
THEN DO; Bresult = '0'B; Bmoretodo = '0'B; END; 00027309
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00027403
WHEN('n') 00027503
IF INDEX(Xnum,Yv) = 0 00027603
THEN Im = Im + 1; 00027704
ELSE DO; Iv = Iv + 1; Im = Im + 1; END; 00027803
/*H2.1.4 Special character -----------------------------------------*/ 00027913
WHEN('>') 00028003
IF Im + 1 > LIm 00028107
THEN DO; Bresult = '0'B; Bmoretodo = '0'B; END; 00028209
ELSE 00028303
DO; 00028403
Xspecial = SUBSTR(Xmask,Im + 1,1); 00028505
IF Xspecial = Yv 00028603
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 2
Software Engineering - Task 2: Stores Movement Summary-Maintenance Date: 10/25/2009
Function EVERIFY
JCL:
File: TASK02TM.TXT
File: TASK01G.TXT
Test Data:
File: V3TVER1.txt
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4
Software Engineering - Task 2: Stores Movement Summary-Maintenance Date: 10/25/2009
Function EVERIFY
Report Output:
File: TASK01T1.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
15.23.16 JOB01780 ---- WEDNESDAY, 07 OCT 2009 ----
15.23.16 JOB01780 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
15.23.17 JOB01780 ICH70001I P390A LAST ACCESS AT 15:21:28 ON WEDNESDAY, OCTOBER 7, 2009
15.23.17 JOB01780 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
15.23.17 JOB01780 IEF403I P390AC - STARTED - TIME=15.23.17
15.23.18 JOB01780 IEF404I P390AC - ENDED - TIME=15.23.18
15.23.18 JOB01780 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 07 OCT 2009 JOB EXECUTION DATE
- 6 CARDS READ
- 87 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 4 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01780
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=V3TMSK01
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=V3TMSK01,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 //GO.SYSPRINT DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2660)
X/SYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
11 //GO.SYSIN DD DSN=P390A.RUN.DATA(V3TVER1),DISP=SHR
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PLIZG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 15:21:28 ON WEDNESDAY, OCTOBER 7, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A81 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO PRINT
IEF237I JES2 ALLOCATED TO CEEDUMP
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF237I 0A90 ALLOCATED TO SYSIN
IEF142I P390AC GO PLICOMP - STEP WAS EXECUTED - COND CODE 0000
IEF285I P390A.PGM.LOAD KEPT
IEF285I VOL SER NOS= USR001.
IEF285I CEE.SCEERUN KEPT
IEF285I VOL SER NOS= Z5RES2.
IEF285I P390A.P390AC.JOB01780.D0000101.? SYSOUT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 2: Stores Movement Summary-Maintenance Date: 10/25/2009
Function EVERIFY
1V3TMSK01 STARTED.
C3/1234 LAaa>/NNNnnnnBBBB IS OK.
C/123 LAaa>/NNNnnnnBBBB IS IN ERROR.
C3AB/1234 LAaa>/NNNnnnnBBBB IS OK.
C3AB/12345 LAaa>/NNNnnnnBBBB IS OK.
C3/1234 X LAaa>/NNNnnnnBBBB IS IN ERROR.
13/1234 LAaa>/NNNnnnnBBBB IS IN ERROR.
V3/1A34 LAaa>/NNNnnnnBBBB IS IN ERROR.
V3/1234 LAaa>/NNNnnnnB IS IN ERROR.
/123456 LAaa>/NNNnnnnBBBB IS IN ERROR.
C3/1234 LAaa>/NNNnnnnbbbb IS OK.
V3TMSK01 ENDED.
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 1
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
DCL XMASK2
CHAR(40) VARYING STATIC /*Mask for numeric pos.d. */ 00168405
INIT('bbbbbbbNNNNNNNN'); 00168511
DCL VALIDDATE BUILTIN; /* */ 00168600
DCL SUBSTR BUILTIN; /* */ 00168700
DCL INDEX BUILTIN; /* */ 00168800
DCL STRING BUILTIN; /* */ 00168902
00169002
/*HG1.0 Initiation routine -----------------------------------------*/ 00169102
ON ENDFILE(FSM) /*Set EOF Condition */ 00169205
BEGIN; 00169302
SCB.YASSNO = HIGH(4); /*signal EOF Condition */ 00169402
SCB.YPARTNO = HIGH(10); /* */ 00169502
GOTO LRETURN; /*nothing to do anymore */ 00169605
END; 00169702
READ FILE(FSM) SET(PSM); /*GET NEXT FSM RECORD */ 00169800
DO WHILE((¬ESMOK); 00169905
/*HG2.0 Print SM Record on first error -----------------------------*/ 00170005
SLINE.XASA = '0'; /*Print SM Record */ 00170105
SLINE.XMSGTYPE = 'I'; 00170201
SLINE.XENO = 'SMS02'; 00170301
SLINE.XMSGTXT = STRING(SSM)||' **in error,see below.'; 00170401
CALL EMSG(FMSG,PMSG1); 00170509
/*HG3.1 Check Record ID --------------------------------------------*/ 00170605
IF SSM.XRID ¬= 'SM' 00170700
THEN 00170800
DO; 00170900
SLINE.XASA = ' '; /*Print Error Message */ 00171005
SLINE.XMSGTYPE = 'F'; 00171100
SLINE.XENO = 'SMS01'; 00171200
SLINE.XMSGTXT = 'Record_ID '||SSM.XRID|| 00171300
' is not SM as inspected.'; 00171400
CALL EMSG(FMSG,PMSG1); 00171509
END; 00171700
ELSE 00171800
/*HG3.2 Check Record Type ------------------------------------------*/ 00171905
DO; 00172000
IF INDEX('IR',SSM.XRTYPE) = 0 00172100
THEN 00172200
DO; 00172300
SLINE.XASA = ' '; /*Print Error Message */ 00172405
SLINE.XMSGTYPE = 'F'; 00172500
SLINE.XENO = 'SMS02'; 00172600
SLINE.XMSGTXT = 'Record_Type '||SSM.XRTYPE|| 00172700
' is wrong. Allowed are I or R.'; 00172800
CALL EMSG(FMSG,PMSG1); 00172909
END; 00173100
ELSE 00173200
DO; 00173300
/*HG3.3 Check Part Number ------------------------------------------*/ 00173405
XVALUE = SSM.XPARTNO; 00173500
IF ¬EVERIFY(XVALUE,XMASK1) 00173600
THEN 00173700
DO; 00173800
SLINE.XASA = ' '; /*Print Error Message */ 00173905
SLINE.XMSGTYPE = 'F'; 00174000
SLINE.XENO = 'SMS03'; 00174100
SLINE.XMSGTXT = 'PART NUMBER '||SSM.XPARTNO|| 00174200
' has an erroneous specification. See PGM description.'; 00174300
CALL EMSG(FMSG,PMSG1); 00174409
END; 00174600
/*HG3.4 Check Date -------------------------------------------------*/ 00174705
IF ¬VALIDDATE(SSM.NDATE,'YYYYMMDD') 00174800
THEN 00174900
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
DO; 00175000
SLINE.XASA = ' '; /*Print Error Message */ 00175105
SLINE.XMSGTYPE = 'F'; 00175200
SLINE.XENO = 'SMS04'; 00175300
SLINE.XMSGTXT = 'Date '||SSM.NDATE|| 00175400
' is wrong. Needed Format: YYYYMMDD or value is false.'; 00175500
CALL EMSG(FMSG,PMSG1); 00175609
END; 00175800
/*HG3.5 Check Quantity ---------------------------------------------*/ 00175905
XVALUE = SSM.NQTY; 00176000
IF ¬EVERIFY(XVALUE,XMASK2) 00176100
THEN 00176200
DO; 00176300
SLINE.XASA = ' '; /*Print Error Message */ 00176405
SLINE.XMSGTYPE = 'F'; 00176500
SLINE.XENO = 'SMS05'; 00176600
SLINE.XMSGTXT = 'Quantity '||SSM.NQTY|| 00176700
' has not a positive numeric value.'; 00176800
CALL EMSG(FMSG,PMSG1); 00176909
END; 00177100
END; 00177200
END; 00177300
/*HG4 Record is in error, get next SM Record -----------------------*/ 00177405
READ FILE(FSM) SET(PSM); /*Get next FSM Record */ 00177505
END; 00177700
/*HG5 SM Record is ok. , pick up SCB fields ------------------------*/ 00177805
SCB.YPARTNO = SSM.XPARTNO; 00178001
SCB.YASSNO = SUBSTR(SSM.XPARTNO,1,INDEX(SSM.XPARTNO,'/')-1); 00178101
LRETURN: 00178204
RETURN; 00178300
00178405
ESMOK: PROC REORDER RETURNS(BIT(1)); 00178501
/********************************************************************/ 00178601
/* SM Record - Precheck Routine */ 00178701
/* Result: '1'B SM record is ok. */ 00178801
/* '0'B SM record is in error */ 00178901
/* Note:-Control will be returned on first error. */ 00179009
/* -There is a dependency between this routine and routine */ 00179109
/* EGETSM. */ 00179209
/********************************************************************/ 00179309
DCL VALIDDATE BUILTIN; /* */ 00179409
00179509
/*HC1.1 Check Record ID --------------------------------------------*/ 00180305
IF SSM.XRID ¬= 'SM' 00180405
THEN RETURN('0'B); 00180501
ELSE 00181401
/*HC1.2 Check Record Type ------------------------------------------*/ 00181505
IF INDEX('IR',SSM.XRTYPE) = 0 00181701
THEN RETURN('0'B); 00181801
ELSE 00182701
DO; 00182801
/*HC1.3 Check Part Number ------------------------------------------*/ 00182905
XVALUE = SSM.XPARTNO; 00183001
IF ¬EVERIFY(XVALUE,XMASK1) 00183101
THEN RETURN('0'B); 00183201
/*HC1.4 Check Date -------------------------------------------------*/ 00184105
IF ¬VALIDDATE(SSM.NDATE,'YYYYMMDD') 00184201
THEN RETURN('0'B); 00184301
/*HC1.5 Check Quantity ---------------------------------------------*/ 00185205
XVALUE = SSM.NQTY; 00185301
IF ¬EVERIFY(XVALUE,XMASK2) 00185401
THEN RETURN('0'B); 00185501
END; 00186401
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
File: V3DPCB04.txt
/*PPL-TITLE: Print Control Block V04 */ 00010001
/********************************************************************/ 00020000
/* Print Control Block PGM V3PSMSV4 */ 00030001
/********************************************************************/ 00040000
DCL PPCB1 POINTER INIT(ADDR(SPCB1));/*Pointer to PCB */ 00050000
DCL 1 SPCB1 UNALIGNED, /* Print Control Block */ 00060000
2 QSN POINTER /* Address of Page Number */ 00070000
INIT(EADDR1(ADDR(SPCB1.YHL(1)),52)), 00080000
2 QDT POINTER /* Address Edit-Date */ 00081000
INIT(EADDR1(ADDR(SPCB1.YHL(2)),49)), 00082000
2 QPL POINTER /* Address of Print Area */ 00090000
INIT(ADDR(SPCB1.YPL)), 00091000
2 MLCNT BIN FIXED(15) /* Number of max. Lines per Page */ 00100000
INIT(60), 00110000
2 MLNO BIN FIXED(15) /* Residuary printable No. of Lines*/ 00120000
INIT(0), 00130000
2 MPNO BIN FIXED(15) /* Current Page Number */ 00140000
INIT(0), 00150000
2 MHNO BIN FIXED(15) /* Number of Header Lines */ 00160000
INIT(4), 00170000
2 YPL CHAR(133) /* PrintLine -Communication Area---*/ 00180000
INIT((133)' '), 00190000
2 YHL(4) CHAR(133) INIT /* Header Lines */ 00200000
('1--- Stores Movement Summary Page: NNNNN 00210000
', 00220000
' Report: SMS XYZ FACTORY Date: DD.MM.YY 00221000
', 00222000
' Part_Number Receipts Issues Net_Summary 00222100
', 00222200
' _______________________________________________________ 00223000
'); 00224000
00230000
File: V3DMSG01.txt
/*PPL-TITLE: MSG Control Block V01 */ 00010008
/********************************************************************/ 00020002
/* Message Control Block PGM V3PSMSV3 */ 00030008
/********************************************************************/ 00040002
DCL PMSG1 POINTER INIT(ADDR(SMSG1));/*Pointer to MSG CB */ 00050008
DCL 1 SMSG1 UNALIGNED, /* Message Control Block */ 00060008
2 QSN POINTER /* Address of Page Number */ 00070008
INIT(EADDR1(ADDR(SMSG1.YHL(1)),112)), 00080009
2 QDT POINTER /* Address Edit-Date */ 00081008
INIT(EADDR1(ADDR(SMSG1.YHL(2)),109)), 00082010
2 QPL POINTER /* Address of Message Print Area */ 00083008
INIT(ADDR(SMSG1.YPL)), 00084002
2 MLCNT BIN FIXED(15) /* Number of max. lines per page */ 00085008
INIT(60), 00086002
2 MLNO BIN FIXED(15) /* Residuary printable No. of lines*/ 00087008
INIT(0), 00088002
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 7
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
PGMs Subprograms
File: V3PEPRT.TXT
*PROCESS OPTIONS INSOURCE SOURCE NEST MACRO STORAGE; 00001003
*PROCESS AGGREGATE, OFFSET, CMPAT(V1); 00002004
*PROCESS OPT(2) TEST(ALL,SYM) ATTRIBUTES(FULL) XREF(SHORT); 00003003
/*PPL-TITLE: Print Routine */ 00010020
/********************************************************************/ 00020000
/* */ 00030000
/* ENTRY POINT: EPRINT */ 00040000
/* AUTHOR: DIPL.ING. WERNER HOFFMANN */ 00041000
/* PUBLICATIONS: SC33-0009 PL/I LANGUAGE REFERENCE MANUAL */ 00050000
/* SC33-0006 PL/I PROGRAMMER'S GUIDE */ 00060000
/* DATE WRITTEN: 1972/03/05 */ 00070000
/* DATE CHANGED: 2009/08/28 */ 00080000
/* */ 00090000
/* DEFINITION: -THE PROCEDURE EPRINT WRITES A PRINT LINE DEFINED */ 00100000
/* IN THE PCB (PRINT CONTROL BLOCK) TO THE DEFINED */ 00110000
/* PRINT DATA SET. */ 00120000
/* -IF NECESSARY HEADER LINES ARE PRINTED BEFORE THE */ 00130000
/* PRINT LINE IS WRITTEN. */ 00140000
/* -FOLLOWING ASA CONTROL CHARACTER ARE ACCEPTED: */ 00150000
/* '1' - NEW PAGE */ 00160000
/* ' ' - (BLANK) NEW LINE */ 00170000
/* '0' - ONE SPACE LINE */ 00180000
/* '-' - TWO SPACE LINES */ 00190000
/* -METHOD USED: RECORD I/O, MOVE MODUS */ 00200000
/* */ 00210000
/* PROCEDURE CALL: */ 00220000
/* CALL EPRINT(DDFILE,PPCB); */ 00230000
/* | +--- POINTER TO PRINT CB */ 00240000
/* +---------- FILE NAME */ 00241000
/* */ 00243000
/* DEFINITION IN CALLING PROCEDURE: */ 00250000
/* DCL EPRINT ENTRY(FILE,POINTER); */ 00260000
/* DCL DDFILE FILE RECORD OUTPUT ENV(CONSECUTIVE RECSIZE(133)); */ 00261019
/* PRINT CONTROL BLOCK, EXAMPLE SEE V3DPCM00 */ 00261219
/* CODING IN CALLING PROCEDURE: */ 00261319
/* INITIAL ROUTINE: */ 00261419
/* OPEN FILE(DDFILE) OUTPUT; */ 00261519
/* TERMINATION ROUTINE: */ 00261619
/* CLOSE FILE(DDFILE); */ 00261719
/* */ 00261819
/* CALLING ROUTINES/FUNCTIONS: */ 00261920
/* EDATE */ 00262020
/* */ 00262120
/* NOTES: - AFTER PRINTING OF THE LINE: */ 00262220
/* - THE LINE WILL BE INITIALIZED BY ' ' (BLANK) */ 00262320
/* CHARACTERS. */ 00263000
/* */ 00264000
/********************************************************************/ 00270000
EPRINT: 00280000
PROC(DDFILE,PPCB); /* */ 00290000
DCL PPCB POINTER; /* POINTS TO PCB */ 00300008
DCL NHNO BIN FIXED(15) STATIC;/* NUMBER HEADER LINES */ 00301007
DCL 1 SPCBA BASED(PPCB), /*DSECT PCB */ 00310008
2 QSN POINTER, /*ADDRESS OF PAGE NUMBER */ 00320000
2 QDT POINTER, /*ADDRESS EDIT.DATE */ 00330000
2 QPL POINTER, /*ADDRESS PRINT LINE */ 00340011
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 8
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 9
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
File: V3PEMSG.txt
*PROCESS OPTIONS INSOURCE SOURCE NEST MACRO STORAGE; 00001000
*PROCESS AGGREGATE, OFFSET, CMPAT(V1); 00002000
*PROCESS OPT(2) TEST(ALL,SYM) ATTRIBUTES(FULL) XREF(SHORT); 00003000
/*PPL-TITLE: Message Print Routine */ 00010008
/********************************************************************/ 00020000
/* */ 00030000
/* ENTRY POINT: EMSG */ 00040001
/* AUTHOR: DIPL.ING. WERNER HOFFMANN */ 00041000
/* PUBLICATIONS: SC33-0009 PL/I LANGUAGE REFERENCE MANUAL */ 00050000
/* SC33-0006 PL/I PROGRAMMER'S GUIDE */ 00060000
/* DATE WRITTEN: 1972/03/05 */ 00070000
/* DATE CHANGED: 2009/08/28 */ 00080000
/* */ 00090000
/* DEFINITION: -THE PROCEDURE EMSG WRITES A PRINT LINE DEFINED */ 00100001
/* IN THE PCB (PRINT CONTROL BLOCK) TO THE DEFINED */ 00110000
/* PRINT DATA SET. */ 00120000
/* -IF NECESSARY HEADER LINES ARE PRINTED BEFORE THE */ 00130000
/* PRINT LINE IS WRITTEN. */ 00140000
/* -FOLLOWING ASA CONTROL CHARACTER ARE ACCEPTED: */ 00150000
/* '1' - NEW PAGE */ 00160000
/* ' ' - (BLANK) NEW LINE */ 00170000
/* '0' - ONE SPACE LINE */ 00180000
/* '-' - TWO SPACE LINES */ 00190000
/* -METHOD USED: RECORD I/O, MOVE MODUS */ 00200000
/* */ 00210000
/* PROCEDURE CALL: */ 00220000
/* CALL EMSG(DDFILE,PMCB); */ 00230005
/* | +---- POINTER TO PRINT CB */ 00240000
/* +----------- FILE NAME */ 00241000
/* */ 00243000
/* DEFINITION IN CALLING PROCEDURE: */ 00250000
/* DCL EMSG ENTRY(FILE,POINTER); */ 00260001
/* PRINT FILE: */ 00261001
/* DCL DDFILE FILE RECORD OUTPUT ENV(CONSECUTIVE RECSIZE(121)); */ 00261307
/* MESSAGE CONTROL BLOCK, EXAMPLE SEE V3DMCB00 */ 00261407
/* CODING IN CALLING PROCEDURE: */ 00261507
/* INITIAL ROUTINE: */ 00261607
/* OPEN FILE(DDFILE) OUTPUT; */ 00261707
/* TERMINATION ROUTINE: */ 00261807
/* CLOSE FILE(DDFILE); */ 00261907
/* */ 00262407
/* CALLING ROUTINES/FUNCTIONS: */ 00262508
/* EDATE */ 00262608
/* */ 00262708
/* NOTES: - AFTER PRINTING OF THE LINE: */ 00262808
/* - THE LINE WILL BE INITIALIZED BY ' ' (BLANK) */ 00262908
/* CHARACTERS. */ 00263000
/* - THE HIGHEST REURN CODE IS SAVED INTO FIELD */ 00263101
/* NRETC. */ 00263201
/* MSG-TYPE/RETURNCODE: */ 00263301
/* W => 4, F => 8, E => 12, T => 16 */ 00263401
/* I -> Informational message */ 00264011
/* W -> Warning message */ 00264111
/* F -> Failure message */ 00264211
/* E -> Emergency message */ 00264311
/* T -> Terminational message */ 00264411
/* */ 00265011
/********************************************************************/ 00270000
EMSG: 00280001
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
10
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
PROC(DDFILE,PMCB); /* */ 00290005
DCL PMCB POINTER; /* POINTS TO MCB */ 00300005
DCL NHNO BIN FIXED(15) STATIC;/* NUMBER HEADER LINES */ 00301000
DCL 1 SMCBA BASED(PMCB), /*DSECT MCB */ 00310005
2 QSN POINTER, /*ADDRESS OF PAGE NUMBER */ 00320000
2 QDT POINTER, /*ADDRESS EDIT.DATE */ 00330000
2 QPL POINTER, /*ADDRESS PRINT LINE */ 00340000
2 MLCNT BIN FIXED(15), /*MAX. NUMBER LINES/PAGE */ 00350000
2 MLNO BIN FIXED(15), /*NUMBER OF REMAINING PRINTABLE L. */ 00351000
2 MPNO BIN FIXED(15), /*PAGE NUMBER */ 00352000
2 MHNO BIN FIXED(15), /*NUMBER HEADER LINES */ 00353000
2 NRETC BIN FIXED(31), /*HIGHEST RETURN CODE */ 00354001
2 YPZ CHAR(121), /*PRINT LINE */ 00360001
2 YHL(1:NHNO REFER(SMCBA.MHNO)) CHAR(121); /*HEADER LINES */ 00370005
DCL DSNR PIC'ZZZZ9' BASED(SMCBA.QSN);/*PAGE NUMBER */ 00380005
DCL PL POINTER STATIC;/*POINTER TO BASED LINE */ 00390000
DCL 1 SL BASED(PL), /*DSECT MESSAGE LINE */ 00400011
2 XASA CHAR(1), /*ASA CONTROL CHARACTERR */ 00410010
2 XMSGTYPE CHAR(1), /*MESSAGE TYPE */ 00420010
2 XENO CHAR(5), /*ERROR NUMBER */ 00421010
2 XSPACE CHAR(1), /* */ 00422010
2 XMSGTXT CHAR(113); /*MESSAGE TEXT */ 00423010
DCL JHDR BIN FIXED(15) STATIC;/*CURRENT HEADER LINE */ 00430000
DCL XCASA CHAR(3) STATIC INIT(' 0-');/*ACCEPTED ASA C.CHAR. */ 00440000
DCL XCASASL CHAR(2) DEF(XCASA) POS(2); /*ASA C.CHR.WITH SKIPL.*/ 00441010
DCL DDFILE FILE; /* RECORD I/O DEFINITION */ 00450000
DCL (ADDR,INDEX,MAX) BUILTIN;/* */ 00460004
DCL EDATE ENTRY(POINTER);/*EDIT DATE ROUTINE */ 00461000
DCL PDDMY POINTER STATIC;/*POINTER TO DATE FIELD */ 00462000
DCL YDATE CHAR(8) BASED(PDDMY);/*DATE,FORMAT TT.MM.YY */ 00463000
00470000
/*H1 -CHECK FOR EARLY PAGE CHANGE --------------------------------*/ 00482000
PL = ADDR(SMCBA.YPZ); 00483005
IF SL.XASA = '1' 00490011
THEN 00500000
DO; 00510000
SMCBA.MLNO = 0; /*PREPARE FOR NEW PAGE */ 00520005
SL.XASA = ' '; /*CHANGE ASA C.CHAR. TO DEFAULT */ 00530011
END; 00540000
00541000
/*H2 -CHECK FOR PRINTING HEADER LINES ----------------------------*/ 00542000
IF SMCBA.MLNO-INDEX(XCASASL,SL.XASA)<=0 /*NEED FOR NEW PAGE?*/ 00550005
THEN 00560000
DO; 00570000
/*H2.1 -CHECK FOR SETTING DATE INTO HEADER LINE --------------------*/ 00571000
PDDMY = SMCBA.QDT; /*POINT TO DATE FIELD */ 00572005
IF YDATE = 'DD.MM.YY' /*NOT ESTABLISHED? */ 00573000
THEN 00574000
DO; 00575000
CALL EDATE(PDDMY); /*GET AND EDIT DATE */ 00576000
END; 00577000
/*H2.2 -PRINT HEADER LINES -----------------------------------------*/ 00579100
SMCBA.MLNO=SMCBA.MLCNT;/*INIT LINE COUNTER */ 00580005
SMCBA.MPNO=SMCBA.MPNO + 1; /*COUNT PAGE NUMBER */ 00590005
DSNR = SMCBA.MPNO; /*EDIT PAGE NUMBER */ 00600005
DO JHDR = 1 TO SMCBA.MHNO;/*STEP THROUGH HEADER AREA */ 00610005
PL = ADDR(SMCBA.YHL(JHDR));/*POINT TO HEADER LINE */ 00620005
WRITE FILE(DDFILE) FROM(SL);/*WRITE HEADER LINE */ 00630011
IF SL.XASA = '1' /* NEW PAGE , COUNT 1ST LINE AS 1 */ 00631011
THEN SMCBA.MLNO = SMCBA.MLNO - 1; 00632011
ELSE SMCBA.MLNO = SMCBA.MLNO - 00633011
INDEX(XCASA,SL.XASA);/*CALC.REMAINING LINES*/ 00650000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
11
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
END; 00660000
END; 00670000
00671000
/*H3 -WRITE PRINT LINE -------------------------------------------*/ 00672000
WRITE FILE(DDFILE) FROM(SMCBA.YPZ);/*WRITE PRINT LINE */ 00680005
PL = SMCBA.QPL; /*POINT TO PRINT LINE */ 00690005
SMCBA.MLNO = SMCBA.MLNO - 00700005
INDEX(XCASA,SL.XASA);/*CALC.REMAINING LINES */ 00701011
/*SAVE HIGEST RETURN CODE */ 00701101
SMCBA.NRETC = MAX(SMCBA.NRETC,INDEX(' W F E T', 00702005
SL.XMSGTYPE)); 00703011
SMCBA.YPZ = (121)' '; /*INITIATE PRINT LINE */ 00710005
00720000
END EMSG; 00730001
File: V3PSERDA.TXT
*PROCESS OPTIONS SOURCE NEST MACRO STORAGE; 00001003
*PROCESS AGGREGATE, OFFSET; 00002002
*PROCESS OPT(2) ATTRIBUTES(FULL) XREF(SHORT); 00003003
/*PPL-TITLE: GET AND EDIT SYSTEM DATE */ 00010001
/********************************************************************/ 00020000
/* FUNCTION TO GET ACTUAL SYSTEM DATE */ 00030000
/* PUBLICATIONS: */ 00031000
/* - C28-8201-2 */ 00032000
/* */ 00033000
/* AUTHOR: DIPL.ING. WERNER HOFFMANN */ 00033101
/* DATE WRITTEN: 1972/03/05 */ 00034001
/* DATE CHANGED: 2009/08/28 */ 00035001
/* */ 00036001
/* PROCEDURE CALL: CALL EDATE (PPOS); */ 00040000
/* +---- ADDRESS OF DATE FIELD */ 00050000
/* DECLARATION: */ 00070000
/* DCL EDATE ENTRY(POINTER); */ 00080000
/* */ 00090000
/* NOTES: - THE RESULTING FORMAT WILL BE: */ 00091000
/* DD.MM.YY */ 00092000
/* | | + YEAR */ 00093000
/* | +--- MONTH */ 00094000
/* +------ DAY */ 00095000
/********************************************************************/ 00100000
EDATE: 00110000
PROC(PPOS) REORDER; 00120000
DCL XDATE CHAR(6) STATIC;/*SYSTEM DATE */ 00130000
DCL 1 S1DATE DEF XDATE, /* DATE */ 00140000
2 XYY CHAR(2), /* YEAR */ 00141000
2 XMM CHAR(2), /* MONTH */ 00142000
2 XDD CHAR(2); /* DAY */ 00143000
DCL PE POINTER STATIC;/*POINTER TO ADDRESS OF DATE */ 00144000
DCL PPOS POINTER; /* ADDRESS OF PRINTED DATE */ 00150000
DCL XPRDATE CHAR(8) BASED(PE);/*PRINTED DATE */ 00151001
DCL DATE BUILTIN; /* */ 00160000
00161000
/*H1 GET SYSTEM DATE AND REFORMAT DATE, */ 00161103
/* RETURN REFORMATED DATE TO THE CALLING ROUTINE */ 00161203
PE=PPOS; /*POINT TO PRINT AREA */ 00162000
XDATE = DATE; /*PICK UP SYSTEM DATE & EDIT DATE */ 00163000
XPRDATE=S1DATE.XDD||'.'||S1DATE.XMM||'.'||S1DATE.XYY; 00163100
00164000
END EDATE; 00165000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
12
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
File: V3PSERA1.TXT
*PROCESS OPTIONS SOURCE NEST MACRO STORAGE; 00001003
*PROCESS AGGREGATE, OFFSET; 00002001
*PROCESS OPT(2) ATTRIBUTES(FULL) XREF(SHORT); 00003003
/*PPL-TITLE: CALCULATE NEW ADDRESS BY ADDING A GIVEN DISPLACEMENT */ 00010003
/********************************************************************/ 00020000
/* FUNCTION TO GET A NEW ADDRESS BY ADDING A GIVEN DISPLACEMENT */ 00030003
/* FUNCTION-CALL: P=EADDR1(PCHAR,NPOS); */ 00040000
/* | +--- DISPLACEMENT +0...max. F(31) */ 00050000
/* | MAX.VALUE: 32767 */ 00051003
/* +--------- POINTER */ 00060000
/* DECLARATION: */ 00070000
/* DCL EADDR1 ENTRY(POINTER,BIN FIXED(31)) RETURNS(POINTER); */ 00080000
/* */ 00090000
/********************************************************************/ 00100000
EADDR1: 00110000
PROC(PCHAR,NPOS) RETURNS(POINTER); 00120000
DCL PE POINTER STATIC;/*POINTER TO ADDRESS AREA */ 00130000
DCL PCHAR POINTER; /*STARTING ADDRESS */ 00140000
DCL NPOS BIN FIXED(31); /*DISPLACEMENT */ 00141002
DCL XC(32767) CHAR(1) BASED(PE);/* BYTE AREA */ 00150000
DCL ADDR BUILTIN; /* ADDRESS BUILTIN FUNCTION */ 00160000
00161000
/*H1 CALCULATE NEW ADDRESS BY USING THE GIVEN DISPLACEMENT, */ 00161103
/* RETURN NEW ADDRESS TO THE CALLING ROUTINE */ 00161203
PE=PCHAR; /*INITIATE BYTE AREA ADDRESS */ 00162000
RETURN(ADDR(XC(NPOS))); /*GET NEW ADDRESS & RETURN POINTER */ 00163003
00164000
END EADDR1; 00165000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
13
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
JCL:
File: TASK02.txt
File: TASK02M.TXT
File: TASK02G.TXT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
14
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Test Data:
File: SMT201.txt
Report Output:
File: TASK0242.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
08.55.07 JOB01712 ---- TUESDAY, 06 OCT 2009 ----
08.55.07 JOB01712 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
08.55.07 JOB01712 ICH70001I P390A LAST ACCESS AT 08:54:48 ON TUESDAY, OCTOBER 6, 2009
08.55.07 JOB01712 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
08.55.07 JOB01712 IEF403I P390AC - STARTED - TIME=08.55.07
08.55.09 JOB01712 IEF404I P390AC - ENDED - TIME=08.55.09
08.55.09 JOB01712 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 06 OCT 2009 JOB EXECUTION DATE
- 7 CARDS READ
- 226 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 13 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01712
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPSMSV4
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
17
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
18
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
19
Software Engineering - Task 2: Stores Movement Summary - Maintenance Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page:
20
Software Engineering - Task 3: Merge 2 Data Sets V01 Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 3
Software Engineering - Task 3: Merge 2 Data Sets V01 Date: 10/25/2009
JCL:
File: TASK03M.TXT
File: TASK03G.TXT
Test Data:
Test 1:
0000000004File IA
0000000005File IA
0000000006File IA
0000000007File IA
0000000009File IA
0000000001File IB
0000000002File IB
0000000003File IB
0000000004File IB
0000000007File IB
0000000008File IB
Test 2:
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4
Software Engineering - Task 3: Merge 2 Data Sets V01 Date: 10/25/2009
0000000001File IA
0000000002File IA
0000000003File IA
0000000004File IA
0000000007File IA
0000000008File IA
0000000004File IB
0000000005File IB
0000000006File IB
0000000007File IB
0000000009File IB
Report Output:
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
09.34.09 JOB01934 ---- TUESDAY, 13 OCT 2009 ----
09.34.09 JOB01934 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
09.34.10 JOB01934 ICH70001I P390A LAST ACCESS AT 09:33:47 ON TUESDAY, OCTOBER 13, 2009
09.34.10 JOB01934 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
09.34.10 JOB01934 IEF403I P390AC - STARTED - TIME=09.34.10
09.34.13 JOB01934 IEF404I P390AC - ENDED - TIME=09.34.13
09.34.14 JOB01934 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 13 OCT 2009 JOB EXECUTION DATE
- 15 CARDS READ
- 145 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 7 SYSOUT SPOOL KBYTES
- 0.06 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01934
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPMERG1
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPMERG1,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 //GO.SYSPRINT DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2660)
X/SYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
//* VERSION V01
11 //GO.FIA DD DSN=P390A.RUN.DATA(T03IA),DISP=SHR
12 //GO.FIB DD DSN=P390A.RUN.DATA(T03IB),DISP=SHR
13 //GO.FOUT DD DSN=P390A.RUN.DATA(T03OUT11),DISP=SHR
14 //PLICOMP EXEC PLIZG,MBR=EPMERG1
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 3: Merge 2 Data Sets V01 Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 3: Merge 2 Data Sets V01 Date: 10/25/2009
Output Data:
Test 1 V01:
0000000001File IB
0000000002File IB
0000000003File IB
0000000004File IA
0000000004File IB
0000000005File IA
0000000006File IA
0000000007File IA
0000000007File IB
0000000008File IB
0000000009File IA
Test 2 V01:
0000000001File IA
0000000002File IA
0000000003File IA
0000000004File IA
0000000004File IB
0000000005File IB
0000000006File IB
0000000007File IA
0000000007File IB
0000000008File IA
0000000009File IB
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 7
Software Engineering - Task 3: Merge 2 Data Sets V02 Date: 10/25/2009
IF SCB.XKEYIA<=SCB.XKEYIB 00148000
THEN 00149000
DO; 00149100
/*H4.1.1 Process record IA -----------------------------------------*/ 00150000
WRITE FILE(FOUT) FROM(SIA); 00160000
CALL EGETIA; 00161000
END; 00161100
/*H4.2 Process one Group IB ----------------------------------------*/ 00161200
ELSE 00161300
DO; 00161400
/*H4.2.1 Process IB record -----------------------------------------*/ 00161500
WRITE FILE(FOUT) FROM(SIB); 00161600
CALL EGETIB; 00161700
END; 00161800
END; 00161900
/*H1.2 Termination Routine ----------------------------------------*/ 00162000
CLOSE FILE(*); /*Close all Open Files */ 00164000
00165000
EGETIA: PROC REORDER; 00166000
/********************************************************************/ 00167000
/* FIA Record Processing */ 00167100
/* Task:-Get and return one IA record. */ 00167200
/********************************************************************/ 00167300
DCL HIGH BUILTIN; /* */ 00167400
00167500
/*HG1.0 Initiation routine -----------------------------------------*/ 00167600
ON ENDFILE(FIA) /*Set EOF Condition */ 00167700
BEGIN; 00167800
SCB.XKEYIA = HIGH(10); /*signal EOF Condition */ 00167900
GOTO LRETURN; /*nothing to do anymore */ 00169000
END; 00169100
00169200
/*HG2 Read and prepare record for processing. */ 00169205
READ FILE(FIA) SET(PIA); /*GET NEXT FIA RECORD */ 00169300
SCB.XKEYIA = SIA.XKEY; /*SAve key into SCB */ 00169400
LRETURN: 00169600
RETURN; 00169700
END EGETIA; 00169800
00169900
EGETIB: PROC REORDER; 00170000
/********************************************************************/ 00171000
/* FIB Record Processing */ 00172000
/* Task:-Get and return one IB record. */ 00173000
/********************************************************************/ 00174000
DCL HIGH BUILTIN; /* */ 00175000
00176000
/*HG1.0 Initiation routine -----------------------------------------*/ 00177000
ON ENDFILE(FIB) /*Set EOF Condition */ 00178000
BEGIN; 00179000
SCB.XKEYIB = HIGH(10); /*signal EOF Condition */ 00180000
GOTO LRETURN; /*nothing to do anymore */ 00190100
END; 00190200
00190300
/*HG2 Read and prepare record for processing. */ 00169200
READ FILE(FIB) SET(PIB); /*GET NEXT FIB RECORD */ 00190400
SCB.XKEYIB = SIB.XKEY; /*Save key into SCB */ 00190500
LRETURN: 00190700
RETURN; 00190800
END EGETIB; 00190900
00191000
END EPMERG2; 00192000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 2
Software Engineering - Task 3: Merge 2 Data Sets V02 Date: 10/25/2009
JCL:
File: TASK03M.TXT
File: TASK03G.TXT
Test Data:
Test 1:
0000000004File IA
0000000005File IA
0000000006File IA
0000000007File IA
0000000009File IA
0000000001File IB
0000000002File IB
0000000003File IB
0000000004File IB
0000000007File IB
0000000008File IB
Test 2:
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 3
Software Engineering - Task 3: Merge 2 Data Sets V02 Date: 10/25/2009
0000000001File IA
0000000002File IA
0000000003File IA
0000000004File IA
0000000007File IA
0000000008File IA
0000000004File IB
0000000005File IB
0000000006File IB
0000000007File IB
0000000009File IB
Report Output:
File: TASK03G2.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
09.36.20 JOB01935 ---- TUESDAY, 13 OCT 2009 ----
09.36.20 JOB01935 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
09.36.20 JOB01935 ICH70001I P390A LAST ACCESS AT 09:34:10 ON TUESDAY, OCTOBER 13, 2009
09.36.20 JOB01935 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
09.36.20 JOB01935 IEF403I P390AC - STARTED - TIME=09.36.20
09.36.25 JOB01935 IEF404I P390AC - ENDED - TIME=09.36.25
09.36.25 JOB01935 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 13 OCT 2009 JOB EXECUTION DATE
- 15 CARDS READ
- 145 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 7 SYSOUT SPOOL KBYTES
- 0.09 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01935
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPMERG2
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPMERG2,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 //GO.SYSPRINT DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2660)
X/SYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
//* VERSION V02
11 //GO.FIA DD DSN=P390A.RUN.DATA(T03IA),DISP=SHR
12 //GO.FIB DD DSN=P390A.RUN.DATA(T03IB),DISP=SHR
13 //GO.FOUT DD DSN=P390A.RUN.DATA(T03OUT21),DISP=SHR
14 //PLICOMP EXEC PLIZG,MBR=EPMERG2
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4
Software Engineering - Task 3: Merge 2 Data Sets V02 Date: 10/25/2009
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 3: Merge 2 Data Sets V02 Date: 10/25/2009
Output Data:
Test 1 V02:
0000000001File IB
0000000002File IB
0000000003File IB
0000000004File IA
0000000004File IB
0000000005File IA
0000000006File IA
0000000007File IA
0000000007File IB
0000000008File IB
0000000009File IA
Test 2 V02:
0000000001File IA
0000000002File IA
0000000003File IA
0000000004File IA
0000000004File IB
0000000005File IB
0000000006File IB
0000000007File IA
0000000007File IB
0000000008File IA
0000000009File IB
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 4: Inventory Update Date: 10/25/2009
00187700
/*HG1 Initiation routine -----------------------------------------*/ 00187800
ON ENDFILE(FSM) /*EOF Condition */ 00187900
BEGIN; 00188000
SCB.XPARTNOSM = HIGH(10); /*Set EOF Condition */ 00188102
GOTO LRETURN; /*nothing to do anymore */ 00188300
END; 00188400
/*HG2 Read and prepare next SM record for processing ---------------*/ 00188500
READ FILE(FSM) SET(PSM); /*GET NEXT FSM RECORD */ 00188600
SCB.XPARTNOSM = SSM.XPARTNO; /*Save PartNumber */ 00188702
STAT.NFSM = STAT.NFSM + 1; /*count FSM record */ 00188813
LRETURN: 00189000
RETURN; 00189100
END EGETSM; 00189200
00189300
END EPINVV1; 00190000
File: V3DMSG04.TXT
/*PPL-TITLE: Print Control Block V04 */ 00010001
/********************************************************************/ 00020000
/* Print Control Block PGM V3PSMSV4 */ 00030001
/********************************************************************/ 00040000
DCL PPCB1 POINTER INIT(ADDR(SPCB1));/*Pointer to PCB */ 00050000
DCL 1 SPCB1 UNALIGNED, /* Print Control Block */ 00060000
2 QSN POINTER /* Address of Page Number */ 00070000
INIT(EADDR1(ADDR(SPCB1.YHL(1)),52)), 00080000
2 QDT POINTER /* Address Edit-Date */ 00081000
INIT(EADDR1(ADDR(SPCB1.YHL(2)),49)), 00082000
2 QPL POINTER /* Address of Print Area */ 00090000
INIT(ADDR(SPCB1.YPL)), 00091000
2 MLCNT BIN FIXED(15) /* Number of max. Lines per Page */ 00100000
INIT(60), 00110000
2 MLNO BIN FIXED(15) /* Residuary printable No. of Lines*/ 00120000
INIT(0), 00130000
2 MPNO BIN FIXED(15) /* Current Page Number */ 00140000
INIT(0), 00150000
2 MHNO BIN FIXED(15) /* Number of Header Lines */ 00160000
INIT(4), 00170000
2 YPL CHAR(133) /* PrintLine -Communication Area---*/ 00180000
INIT((133)' '), 00190000
2 YHL(4) CHAR(133) INIT /* Header Lines */ 00200000
('1--- Stores Movement Summary Page: NNNNN 00210000
', 00220000
' Report: SMS XYZ FACTORY Date: DD.MM.YY 00221000
', 00222000
' Part_Number Receipts Issues Net_Summary 00222100
', 00222200
' _______________________________________________________ 00223000
'); 00224000
00230000
JCL:
File: TASK04M.TXT
// NOTIFY=P390A
//PLICOMP EXEC PLIZCL,MBR=V3PINVV1
//LKED.SYSIN DD *
INCLUDE OBJMOD(V3PSERA1)
INCLUDE OBJMOD(V3PSERDA)
INCLUDE OBJMOD(V3PEMSG)
NAME EPINVV1(R)
/*
File: TASK04G.TXT
Test Data:
Test 1:
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 6
Software Engineering - Task 4: Inventory Update Date: 10/25/2009
Report Output:
File: TASK04R.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
13.31.19 JOB01994 ---- THURSDAY, 15 OCT 2009 ----
13.31.19 JOB01994 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
13.31.19 JOB01994 ICH70001I P390A LAST ACCESS AT 13:27:49 ON THURSDAY, OCTOBER 15, 2009
13.31.19 JOB01994 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
13.31.19 JOB01994 IEF403I P390AC - STARTED - TIME=13.31.19
13.31.21 JOB01994 IEF404I P390AC - ENDED - TIME=13.31.21
13.31.21 JOB01994 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 15 OCT 2009 JOB EXECUTION DATE
- 9 CARDS READ
- 102 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 5 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB01994
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPINVV1
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPINVV1,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 //GO.SYSPRINT DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=2330)
X/SYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
11 //GO.FIV DD DSN=P390A.RUN.DATA(TIVV01),DISP=SHR
12 //GO.FSM DD DSN=P390A.RUN.DATA(TSMV01),DISP=SHR
13 //GO.FOIV DD DSN=P390A.RUN.DATA(TOIV01),DISP=SHR
14 //GO.FMSG DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=121,BLKSIZE=2420)
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PLIZG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 13:27:49 ON THURSDAY, OCTOBER 15, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A81 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO PRINT
IEF237I JES2 ALLOCATED TO CEEDUMP
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF237I 0A90 ALLOCATED TO FIV
IEF237I 0A90 ALLOCATED TO FSM
IEF237I 0A90 ALLOCATED TO FOIV
IEF237I JES2 ALLOCATED TO FMSG
IEF142I P390AC GO PLICOMP - STEP WAS EXECUTED - COND CODE 0008
IEF285I P390A.PGM.LOAD KEPT
IEF285I VOL SER NOS= USR001.
IEF285I CEE.SCEERUN KEPT
IEF285I VOL SER NOS= Z5RES2.
IEF285I P390A.P390AC.JOB01994.D0000101.? SYSOUT
IEF285I P390A.P390AC.JOB01994.D0000102.? SYSOUT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 7
Software Engineering - Task 4: Inventory Update Date: 10/25/2009
Output Data:
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 8
Software Engineering - Task 5: Telegram Analysis V01 Date: 10/25/2009
JCL:
File: TASK05M.TXT
File: TASK05G.TXT
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 3
Software Engineering - Task 5: Telegram Analysis V01 Date: 10/25/2009
Test Data:
Test 1:
Report Output:
File: TASK05R.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
15.59.13 JOB02322 ---- MONDAY, 19 OCT 2009 ----
15.59.13 JOB02322 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
15.59.13 JOB02322 ICH70001I P390A LAST ACCESS AT 15:56:45 ON MONDAY, OCTOBER 19, 2009
15.59.13 JOB02322 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
15.59.13 JOB02322 IEF403I P390AC - STARTED - TIME=15.59.13
15.59.15 JOB02322 IEF404I P390AC - ENDED - TIME=15.59.15
15.59.15 JOB02322 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 19 OCT 2009 JOB EXECUTION DATE
- 7 CARDS READ
- 67 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 3 SYSOUT SPOOL KBYTES
- 0.02 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB02322
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=P390A
2 //PLICOMP EXEC PL1LFG,MBR=EPTELE
3 XXPL1LFG PROC USER=P390A,MBR=DUMMY 00037040
4 XXGO EXEC PGM=&MBR 00037150
IEFC653I SUBSTITUTION JCL - PGM=EPTELE
5 XXSTEPLIB DD DSN=&USER..PGM.LOAD,DISP=SHR 00037160
IEFC653I SUBSTITUTION JCL - DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=SYS1.SIBMTASK,DISP=SHR 00037160
7 XX DD DSN=SYS1.PL1LIB,DISP=SHR 00037160
8 //GO.SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133
X/SYSPRINT DD SYSOUT=* 00037170
9 //GO.FTELE DD DSN=P390A.RUN.DATA(T05001),DISP=SHR
10 //GO.FREPORT DD SYSOUT=*,DCB=BLKSIZE=121
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PL1LFG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 15:56:45 ON MONDAY, OCTOBER 19, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A80 ALLOCATED TO
IEF237I 0A92 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I 0A90 ALLOCATED TO FTELE
IEF237I JES2 ALLOCATED TO FREPORT
IEF142I P390AC GO PLICOMP - STEP WAS EXECUTED - COND CODE 0000
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4
Software Engineering - Task 5: Telegram Analysis V01 Date: 10/25/2009
1
TELEGRAM ANALYSIS
TELEGRAM 1
32 WORDS OF WHICH 5 OVERSIZE
TELEGRAM 2
33 WORDS OF WHICH 6 OVERSIZE
TELEGRAM 3
46 WORDS OF WHICH 4 OVERSIZE
END TELEGRAM ANALYSIS
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 5
Software Engineering - Task 5: Telegram Analysis V02 Date: 10/25/2009
JCL:
File: TASK05M2.TXT
// NOTIFY=P390A
//PLICOMP EXEC PLIZCL,MBR=V3PTELE2
//LKED.SYSIN DD *
NAME EPTELE2(R)
/*
File: TASK05G2.TXT
Test Data:
Test 1:
Report Output:
File: TASK05R2.TXT
1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
0
15.06.49 JOB02397 ---- WEDNESDAY, 21 OCT 2009 ----
15.06.49 JOB02397 IRR010I USERID P390A IS ASSIGNED TO THIS JOB.
15.06.49 JOB02397 ICH70001I P390A LAST ACCESS AT 15:06:22 ON WEDNESDAY, OCTOBER 21, 2009
15.06.49 JOB02397 $HASP373 P390AC STARTED - INIT 1 - CLASS A - SYS SYS1
15.06.49 JOB02397 IEF403I P390AC - STARTED - TIME=15.06.49
15.06.51 JOB02397 IEF404I P390AC - ENDED - TIME=15.06.51
15.06.51 JOB02397 $HASP395 P390AC ENDED
0------ JES2 JOB STATISTICS ------
- 21 OCT 2009 JOB EXECUTION DATE
- 7 CARDS READ
- 86 SYSOUT PRINT RECORDS
- 0 SYSOUT PUNCH RECORDS
- 4 SYSOUT SPOOL KBYTES
- 0.03 MINUTES EXECUTION TIME
1 //P390AC JOB (),'HOFFMANN', JOB02397
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 3
Software Engineering - Task 5: Telegram Analysis V02 Date: 10/25/2009
// NOTIFY=P390A
2 //PLICOMP EXEC PLIZG,MBR=EPTELE2
3 XXIBMZG PROC LIBPRFX='CEE',MBR=TEST
XX*
XX********************************************************************
XX*
XX* IBM ENTERPRISE PL/I FOR Z/OS AND OS/390
XX* VERSION 3 RELEASE 3 MODIFICATION 0
XX*
XX* RUN A PL/I PROGRAM
XX*
XX* PARAMETER DEFAULT VALUE USAGE
XX* LNGPRFX IBMZ.V3R3M0 PREFIX FOR LANGUAGE DATA SET NAMES
XX* LIBPRFX CEE PREFIX FOR LIBRARY DATA SET NAMES
XX* MBR MEMBER NAME FOR PROGRAM LOAD MODULE
XX*
XX*********************************************************************
XX* RUN STEP
XX*********************************************************************
4 XXGO EXEC PGM=&MBR,
XX REGION=2048K
IEFC653I SUBSTITUTION JCL - PGM=EPTELE2,REGION=2048K
5 XXSTEPLIB DD DSN=P390A.PGM.LOAD,DISP=SHR
6 XX DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=CEE.SCEERUN,DISP=SHR
7 //GO.SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=1330
X/SYSPRINT DD SYSOUT=*
8 XXPRINT DD SYSOUT=*
9 XXCEEDUMP DD SYSOUT=*
10 XXSYSUDUMP DD SYSOUT=*
11 //GO.FTELE DD DSN=P390A.RUN.DATA(T05002),DISP=SHR
12 //GO.FREPORT DD SYSOUT=*,DCB=BLKSIZE=1210
STMT NO. MESSAGE
2 IEFC001I PROCEDURE PLIZG WAS EXPANDED USING SYSTEM LIBRARY USER.PROCLIB
ICH70001I P390A LAST ACCESS AT 15:06:22 ON WEDNESDAY, OCTOBER 21, 2009
IEF236I ALLOC. FOR P390AC GO PLICOMP
IEF237I 0A90 ALLOCATED TO STEPLIB
IEF237I 0A81 ALLOCATED TO
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO PRINT
IEF237I JES2 ALLOCATED TO CEEDUMP
IEF237I JES2 ALLOCATED TO SYSUDUMP
IEF237I 0A90 ALLOCATED TO FTELE
IEF237I JES2 ALLOCATED TO FREPORT
IEF142I P390AC GO PLICOMP - STEP WAS EXECUTED - COND CODE 0000
IEF285I P390A.PGM.LOAD KEPT
IEF285I VOL SER NOS= USR001.
IEF285I CEE.SCEERUN KEPT
IEF285I VOL SER NOS= Z5RES2.
IEF285I P390A.P390AC.JOB02397.D0000101.? SYSOUT
IEF285I P390A.P390AC.JOB02397.D0000102.? SYSOUT
IEF285I P390A.P390AC.JOB02397.D0000103.? SYSOUT
IEF285I P390A.P390AC.JOB02397.D0000104.? SYSOUT
IEF285I P390A.RUN.DATA KEPT
IEF285I VOL SER NOS= USR001.
IEF285I P390A.P390AC.JOB02397.D0000105.? SYSOUT
IEF373I STEP/GO /START 2009294.1506
IEF374I STEP/GO /STOP 2009294.1506 CPU 0MIN 00.32SEC SRB 0MIN 00.78SEC VIRT 108K SYS 252K
EXT 7032K SYS 9216K
IEF375I JOB/P390AC /START 2009294.1506
IEF376I JOB/P390AC /STOP 2009294.1506 CPU 0MIN 00.32SEC SRB 0MIN 00.78SEC
1TELEGRAM ANALYSIS
TELEGRAM 1
32 WORDS OF WHICH 5 OVERSIZE
TELEGRAM 2
33 WORDS OF WHICH 6 OVERSIZE
TELEGRAM 3
46 WORDS OF WHICH 4 OVERSIZE
END TELEGRAM ANALYSIS
Altstädter Straße 12 b 87527 Sonthofen Telefon: (08321) 65438 e-Mail: pwhoffmann@aol.com Page: 4