pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
◦ Special subsystems
◦ Special routines that support data communication activities
• Transaction-oriented applications
Server processes used with HP data management software◦
◦ Conversion routines that allow data transfer between HP software and other applications
◦ Procedures that are callable from programs written in other languages
◦ Applications that require optimal performance
You cannot embed SQL/MP or SQL/MX statements in pTAL source code.
pTAL Features
• Procedures (page 32)
• Subprocedures (page 32)
• Private Data Area (page 32)
• Recursion (page 33)
• Parameters (page 33)
• Data Types (page 33)
• Data Grouping (page 33)
• Pointers (page 34)
• Data Operations (page 34)
• Bit Operations (page 34)
• Built-in Routines (page 34)
• Compiler Directives (page 34)
• Modular Programming (page 34)
Procedures
Each pTAL program contains one or more procedures. A procedure is a discrete sequence of
declarations and statements that performs a specific task. A procedure is callable from anywhere
in the program.
Each procedure executes in its own environment and can contain local variables that are not
affected by the actions of other procedures. When a procedure calls another procedure, the
operating system saves the caller’s environment and restores that environment when the called
procedure returns control to the caller.
Subprocedures
A procedure can contain subprocedures, callable only from within the same procedure. A
subprocedure can have sublocal variables that are not affected by the actions of other
subprocedures. When a subprocedure calls another subprocedure, the caller’s environment remains
in place. The operating system saves the location in the caller to which control is to return when
the called subprocedure terminates.
Private Data Area
Each activation of a procedure or subprocedure has its own data area. Upon termination, each
activation relinquishes its private data area, thereby minimizing the amount of memory that the
program uses.
32 Introduction to pTAL