Академический Документы
Профессиональный Документы
Культура Документы
Pocket Guide
DBPOC000251A
IBM Software
30, rue du Château-des-Rentiers 75640 Paris Cedex 13 – France
Internet: http://www.software.ibm.com/ad/vapacbase
e-mail: vapacsup@fr.ibm.com
All VisualAge Pacbase screens can be accessed via input in the OPERATION CODE and CHOICE fields
(O: CH:), located at the bottom of the screens.
The OPERATION CODE field is made up of 2 characters. The first character indicates the desired sub-
network and the second indicates the requested screen presentation option.
The CHOICE field is used to select a screen.
A set of hierarchical "MENUS" guide the user in accessing the various screens of the System.
The General Menu can be accessed by entering "H" in the CHOICE field, or by pressing PF5, or, on the
sign-on screen, by pressing ENTER with no input in the CHOICE field.
An Entity sub-menu may be accessed by positioning the cursor on the desired sub-menu line and
pressing ENTER. If the cursor position is not supported by the hardware in use, enter a slash "/" in the
input field of the corresponding line and pressing ENTER.
Conventions
In the entities choices descriptions, (M) means Update allowed.
General Legend
lib Library Entity Code
key_ _ _ _ _ _ word Keyword Entity Code (13 characters)
tttttt Text Entity Code
vvvvvv Volume Entity Code
uu User Manual Entity Code
eeeeee Data Element Entity Code
dd Data Structure Entity Code
ddss Segment Entity Code
iiiiii P.I.A. (Parameterized Input Aid) Entity Code
bbbbbb Database Block Entity Code
daoooo On-Line Screen Entity Code
oooo Last 4 positions of On-Line Entity Code
ddr Report Entity Code
pppppp Program Entity Code
mmmmmm Model Entity Code (PACMODEL)
ffffff User Entity Code (Extensibility)
qqqqqq User-Defined Relationship (Extensibility)
$$$$$$ User Entity Occurrence Code (Extensibility)
ll or lll Line Number
ff Function Code
sf Sub-Function Code
pl Work Area Code for Placement
{} Optional Entry. You may key in all or any sub-part of an optional command, starting always
with hi-order. DO NOT KEY THE BRACKETS WHEN ENTERING THE CHOICE.
ssss Pacbase session number
ididid Pacbase User Id (1-8 char.)
t Entity Type.
ty User Occurrence Type.
so Generation and Print sequence order.
com Generation and Print Command.
Please let us know if you find any errors or omissions to that we can improve this manual.
The software contained therein, as well as all explanatory, instructional, and technical materials related to
the IBM Paris Laboratory constitute trade secrets of IBM, and may not be disclosed publicly, or otherwise
be used or disclosed, except as expressly permitted in writing by IBM.
-3-
TABLE OF CONTENTS
-4-
6.4. OPERATORS FOR BATCH ONLY ............................................................................................................20
6.4.1. Browse de un Fichero VSAM ....................................................................................................21
6.5. OPERATORS FOR ON-LINE ONLY .........................................................................................................21
6.5.1. Fin de Bucle de Repetitiva con GDI y GDB...............................................................................22
6.5.2. Bifurcación Inmediata y Diferida ................................................................................................22
6.6. OPERATORS FOR BUSINESS COMPONENT ONLY ...................................................................................22
6.7. STRUCTURED CODE CONDITION TYPES .................................................................................................22
6.7.1. Condiciones con ―If‖, ―Case of‖ y ―Evaluate‖ .............................................................................23
6.8. TABLE INDEXES...................................................................................................................................24
6.8.1. Definición y Utilización de Tablas de Búsqueda .......................................................................24
6.9. RELATIVE POSITIONING (ON-LINE ONLY) ...............................................................................................25
6.10. SPECIFIC BUSINESS COMPONENT ......................................................................................................25
7. ON-LINE GENERATION .........................................................................................................................26
7.1. SCREEN AND SEGMENT I/O AREAS ......................................................................................................26
7.1.1. Screen .......................................................................................................................................26
7.1.2. Segment ....................................................................................................................................26
7.2. VARIABLES AND CONSTANTS ...............................................................................................................26
7.3. VARIABLES DE FECHA Y HORA .............................................................................................................27
7.3.1. Variables Principales .................................................................................................................27
7.3.2. Variables Secundarias...............................................................................................................27
7.4. PROGRAM CONTROL VARIABLES...........................................................................................................28
7.5. ERROR VARIABLES ..............................................................................................................................28
7.6. PHYSICAL ACCESS TO SEGMENTS........................................................................................................29
7.6.1. Reemplazar los Accesos Estándar ...........................................................................................29
7.7. CLAVES DE ACCESO (K-) .....................................................................................................................29
7.7.1. Claves de Acceso en Repetitiva ................................................................................................29
7.8. CONTROL MANUAL DE MENSAJES DE FIN DE LISTA ...............................................................................31
7.9. ON-LINE C/S SCREEN PROGRAM STANDARD STRUCTURE ....................................................................31
7.10. BUSINESS COMPONENT STRUCTURE .................................................................................................33
8. BATCH PROGRAM GENERATION .......................................................................................................35
8.1. CONDITIONAL VARIABLES ....................................................................................................................35
8.2. VALIDATION PROCESSING (W ORK AREAS AND VARIABLES) ....................................................................35
8.3. RECORD COUNTERS ...........................................................................................................................36
8.4. TABLES USED FOR REPORTS ...............................................................................................................36
8.5. PRINT VARIABLES AND COUNTERS .......................................................................................................36
8.6. AUTOMATED TOTALING FIELDS ............................................................................................................36
8.7. PRINTING INDEX ..................................................................................................................................36
8.8. VALIDATION INDEX ..............................................................................................................................36
8.9. BATCH PROGRAM STANDARD STRUCTURE ...........................................................................................37
8.9.1. Forma de la Función F22 ..........................................................................................................38
9. VISUALAGE PACBASE ENVIRONMENT .............................................................................................39
9.1. GENERAL CHOICES .............................................................................................................................39
9.2. FUNCTION KEYS..................................................................................................................................39
9.3. MANAGEMENT OF USER'S PARAMETERS...............................................................................................39
9.4. PRODUCTION ENVIRONMENT INTERFACE ..............................................................................................39
-5-
1. THE FUNCTION KEYS
The access to the various screens, in VisualAge Pacbase database, is facilitated by the cursor position or
the Use of PFkeys.
The use of these functions depends on the hardware and operating system in use at the site. If the
hardware does not support the standard use of function keys, you can use ".nn" Choice to simulate
"PFnn" function key use (for example, PF7 —> CH: .7).
In any case, the use of the standard command language is always valid.
The standard assignment of Function Keys is resumed as follows:
2.1. Presentation
2.1.1. Access an Entity
Each entity is identified by a 1-character entity type code:
* LIBRARY
K KEYWORD (Thesaurus)
T TEXT
V VOLUME (PDM) (Manual Personalizado)
U USER MANUAL
E ELEMENT (or Data Element)
D DATA STRUCTURE
S SEGMENT
I INPUT AID (Parameterized Input Aid, o Formato Guía, en Arcelor TECMOD, TECOPA, etc.)
B BLOCK DATABASE (or Database Block)
O ON-LINE SCREEN (or On-Line Dialogue or Screen)
R REPORT
P PROGRAM
M MODEL ENTITY (PACMODEL)
F USER ENTITY (Extensibility)
Q USER RELATIONSHIP (or User-Defined Relationship, Extensibility)
$ USER ENTITY ITEM (or User Entity Occurrence, Extensibility)
Definition screen for an entity is accessed by entering the appropriate 1-character entity type code:
Program Definition Ppppppp
On-Line Screen Definition Odaoooo
-6-
Call screens are used to call an entity within another. Use C for call followed by the entity type
code:
Program Call of Program PppppppCP
On-Line Screen Call of Segments OdaooooCS
Segment Call of Elements SddssCE
Specific screens used to further describe an entity are accessed through a 1-character code:
Program Work Areas PppppppW{pl lll}
Program Procedural Code PppppppP{ff sf lll}
NB: Available function keys and "choice", "operation", "action code" fields are detailed in the User
Interface Guide.
Cross-References of an entity are accessed by entering X, optionally followed by the key of the first
line to be displayed:
Element X-Reference to Program pppppp, starting with Procedural Code ff sf lll:
EeeeeeeXP{ppppppP ff sf lll}
Assigned Text is accessed by entering AT: On-Line Screen Assigned Text, OdaooooAT
Remark: Once an entity has been selected, the combination "entity type/entity code" can be replaced with
a "-".
2.2. Library
Definition (U) *lib
General Documentation (U) *lib G {lll}
Cross-References to User Relationship *lib XQ {qqqqqq}
List of Libraries by code LC* {lib}
2.3. Keyword
Enrichment of the Thesaurus (U) K key...... word
Word Search WS
List of Keywords by code LCK {key......word}
NB: For a detailed description of Library and Keyword entities, see the Specifications Dictionary
Reference Manual.
-7-
2.4. Element
Definition (U) E eeeeee
General Documentation (U) E eeeeee G {lll}
Assigned Text E eeeeee AT {tttttt}
Cross-References E eeeeee X
to Text E eeeeee XT {tttttt}
to Model Entity E eeeeee XM {mmmmmm}
to User Relationships E eeeeee XQ {qqqqqq}
to Volume E eeeeee XV {vvvvvv}
to Segments E eeeeee XS {ddss}
to Reports E eeeeee XR {ddr}
E eeeeee XR {ddr} CE
to User Entity E eeeeee XF {ffffff}
to Relational/SQL Key E eeeeee XK {ddss}
to Database Block E eeeeee XB {bbbbbb}
E eeeeee XB bbbbbb DH ...
E eeeeee XB bbbbbb DC ...
E eeeeee XB bbbbbb DR ...
to On-Line Screens E eeeeee XO {daoooo}
E eeeeee XO daoooo CP ......
E eeeeee XO {daoooo W pl lll}
E eeeeee XO daoooo B ..--...
E eeeeee XO {daoooo P ff sf lll}
to Programs E eeeeee XP {pppppp}
E eeeeee XP pppppp CP ......
E eeeeee XP {pppppp W pl lll}
E eeeeee XP pppppp B ..--...
E eeeeee XP {pppppp P ff sf lll}
E eeeeee XP pppppp 8 ......
E eeeeee XP {pppppp 9 llllll}
E eeeeee XP pppppp FC -- ...
Description (U) E eeeeee D {lll}
List of Undefined Elements in Dictionary
by code LFE {eeeeee}
List of Elements
by code LCE {eeeeee}
by name LNE {......................}
for update (U) LUE {eeeeee}
(C2: 3 formats indicated)
by Label LALE .............
by COBOL name LACE {.......................}
by Relational name LARE ..................
NB: For a detailed description of Element entity, see the Specifications Dictionary Reference Manual.
Nota: Aunque no exista un dato en Pacbase, se pueden buscar referencias a un nombre de variable (o mejor dicho, a
variables cuyo nombre acabe en lo que se busca). Ej. E FECHA1 XO, busca referencias a variables tales como W00-
FECHA1 o W-FECHA1 o W-WW00-SUMAFECHA1.
2.5. Text
Definition (U) T tttttt
General Documentation (U) T tttttt G {lll}
Assigned Text T tttttt AT {tttttt}
Cross-References T tttttt X
to User Manual T tttttt XU {uu}
to Volume T tttttt XV {vvvvvv}
to Documentation T tttttt XG ...
to Text T tttttt XT {tttttt}
to User Relationships T tttttt XQ {qqqqqq}
List of Section Titles T tttttt LT {ss} (índice, con F10 se va a una sección)
Description of Section (U) T tttttt D {ss lll} (ss=Text Section Code)
-8-
Simulation of Section Description T tttttt SIM ddr D ss (ss=Text Section Code)
List of Texts
by type LTT {ty} (ty=Text Type Code)
LTT {ty T tttttt}
by code LCT tttttt
NB: For a detailed description of Text entity, see the Specifications Dictionary Reference Manual.
Nota: Para incluir un texto en la –G de un programa, hay que incluir una línea de tipo „I‟ en el texto, y en el
programa indicado aparecerá el texto desde dicha línea en adelante:
LIN T TEXT
--- - ---------------------------
010 I PPYTA74
2.6. Volume
Definition (U) V vvvvvv
General Documentation (U) V vvvvvv G {lll}
Assigned Text V vvvvvv AT {tttttt}
Cross-References V vvvvvv X
to Volume V vvvvvv XV {vvvvvv}
to User-Defined Relationships V vvvvvv XQ {qqqqqq}
Description of Contents (U) V vvvvvv D {ch sc lll} (ch/sc=Chapter/subchapter code)
List of Volumes
by Type LTV .
LTV .V vvvvvv
by Code LCV {vvvvvv}
-9-
Description (U) I iiiiii D {lll}
List of input Aids by code LCI {iiiiii}
List of input Aid by External Ref's LXI {extref} (extref=external reference code)
X-Refs of Input Aid External Ref's XI extref
XI extref {I iiiiii}
NB: For a detailed description of Input Aid entity, see the Specifications Dictionary Reference Manual.
2.10. Segment
Definition (U) S ddss
General Documentation (U) S ddss G {lll}
Assigned Text S ddss AT {tttttt}
List within Segments
of Parent Segments S ddss LSP {ddss}
of Child Segments S ddss LSC {ddss}
Cross-References S ddss X
to Segments S ddss XS {ddss}
to User-Defined Relationships S ddss XQ {qqqqqq}
to Volumes S ddss XV {vvvvvv}
to Database Blocks S ddss XB {bbbbbb}
to Programs S ddss XP {pppppp}
S ddss XP {pppppp W pl lll}
to Screens S ddss XO {daoooo}
S ddss XO {daoooo W pl lll}
Sub-schemas and Sub-systems (U) S ddss SS {sn} (s=subschema, n=number of subschema)
S ddss SS {yn} (y=subsystem, n=number of subsystem)
Integrity Constraints on Segment S ddss CN ......
Call of Elements (U)
(C2: internal format)
(C3: output format) S ddss CE {lll}
Documentation (U) S ddss CE lll G {lll}
View of statistical information
Level, Address and Length S ddss LAL (útil para ver pos inicio y longitud de campos para
utilizar en los JCL)
Data Element Details S ddss DED (descripción y otra información de los campos)
Statistics S ddss STA (longitud de segmentos, etc.)
Activity S ddss ACT
DB2 View Description (U) S ddss DBE {lll}
Socrate Description (U) S .... SE ...
List of Segments by code LCS {ddss}
- 10 -
2.11. Report
Definition (U) R ddr
General Documentation (U) R ddr G {lll}
Assigned Text R ddr AT {tttttt}
Cross-References R ddr X
to Volumes R ddr XV {vvvvvv}
to Programs R ddr XP {pppppp}
to User Relationships R ddr XQ {qqqqqq}
Layout (U) R ddr L {ll}
R ddr L {ll C col} (col= -L screen column)
Nota: en la –L se puede utilizar por ejemplo –>40 para desplazar la vista 40 columnas a la derecha, y –<40 para
desplazar la vista 40 columnas a la izquierda.
Description (U) R ddr D {ca lll} (ca= -D screen category)
Call of Elements (U) (C2: output format) R ddr CE {st sta} (st/sta= -CE screen structure/start print pos)
List of Reports
by code LCR ddr
by type LTR {t} (t=report type)
LTR {t R ddr}
NB: For a detailed description of Report entity, see the Batch Systems Development Reference Manual.
2.12. Program
Definition (U) P pppppp
General Documentation (U) P pppppp G {lll}
Assigned Text P pppppp AT {tttttt}
Cross-References P pppppp X
to Volumes P pppppp XV {vvvvvv}
to User-Defined Relationships P pppppp XQ {qqqqqq}
to Programs (U) P pppppp XP {pppppp}
to Screens (U) P pppppp XO {daoooo}
Call of Data Structures (U) P pppppp CD {dd}
zoom on a –CD Entry P pppppp HCD {dd}
of P. M. S. (U) P pppppp CP {pppppp}
Beginning Insertions (U) (C2: with source) P pppppp B {se pa lll} (-B section/paragraph)
Work Areas (U) (C2: with source) P pppppp W {pl ll}
Procedural Code (U) (C2 : with source) P pppppp P {ff sf ll}
Generated Procedural Code (U) P pppppp PG {ff sf ll}
Specific Treatments (U) (C2: with source) P pppppp 8 ......
Pure COBOL Source Code (U) (C2: with source) P pppppp 9 {llllll} (insertar COBOL a mano)
COBOL Generator (Reverse Eng.)
Source Code (U) P pppppp SC {ff sf ll} (ver niveles con condiciones)
List of Titles of Functions (prog. struct.) P pppppp STR {ff sf}
List of Programs
by code LCP {pppppp}
by external name LEP {extrnpgm} (8 char program external name))
by type LTP {t} (t=1 char program type)
LTP {t P pppppp}
List of Procedure Titles and Conditions (Views)
view without condition P pppppp TO ff sf < lv (lv=level number)
view with condition (U) P pppppp TC ff sf < lv (desde la entidad: -TC {ff sf {< lv}})
view with condition (U) P pppppp < lv
P pppppp < lv TO {ff sf} (muestra los niveles indentados)
P pppppp < lv TC {ff sf}
(C2: with source for -TC and -<)
NB: For a detailed description of Program entity, see the Structured Code Reference Manual.
- 11 -
Cross-References O daoooo X
to Screens O daoooo XO {daoooo}
to User-Defined Relationships O daoooo XQ {qqqqqq}
to Volumes O daoooo XV {vvvvvv}
to Segments O daoooo XS {ddss}
Call of Elements (U)(C2)(C3) O daoooo CE {lll}
Call of Segments (U) O daoooo CS {c ddss} (c= -CS screen category code)
Call of P.M.S. (U) O daoooo CP {pppppp}
Beginning Insertions (U) (C2: with source) O daoooo B {se pa lll} (se/pa= -B screen section/paragraph)
Work Areas (U) (C2: with source) O daoooo W {pl lll}
Procedural Code (U) (C2: with source) O daoooo P {ff sf lll}
Generated procedural Code(U) O daoooo PG {ff sf lll}
Layout (U) O daoooo L {ll C col} (col= -L, -M screen column)
Mapping (U) O daoooo M {ll C col}
Dialogue Complement (U) O daoooo O (zona común del diálogo)
Dialogue Simulation (C1, C3, C4 or C5) O daoooo SIM {pf} (pf=function key to exit simulation)
Address of Elements O daoooo ADR {ll C col} (lista campos pantalla con su pos)
List of Screens
by code LCO {daoooo}
by external program name LPO {extrnpgm} (8 char external program name)
by external map name LSO {extrnmap} (8 char external map name)
by transaction name LTO {tran} (4 char transaction code)
by type LNO .. O {daoooo}
List of Procedure Titles and Conditions (Views)
view without condition O daoooo TO ff sf < lv (lv=level number)
view with condition (U) O daoooo TC ff sf < lv (desde la entidad: -TC {ff sf {< lv}})
view with condition (U) O daoooo < lv
O daoooo < lv TO {ff sf} (muestra los niveles indentados)
O daoooo < lv TC {ff sf}
(C2: with source for -TC and -<)
NB: For a detailed description of O entity, see the Online Systems Development Reference Manual.
- 12 -
List of Areas by code LCA {arced} (areacd=area code)
List of Codasyl Sets by code LCC {setcde} (setcde=set code)
Codasyl Activity on a Set C setcde ACT
List of Objects in Relational/SQL Blocks
by type/code LTS {t ddss} (t=1 char SQL object type)
by type/external name LES {t x…x} (x…x=18 char SQL object external name)
- 13 -
2.19. Special Choices
General Menu H
Sub-Menu for the x entity Hx
Generation and print requests (U) GP{so {com}}
List of Locked Entities (U) LL{idididLt{......}}
LL{idididL$ty{$$$$$$}}
LL ...... E .........
List of historical (frozen) sessions LH{ssss}
List of journalized transactions JO (últimas transacciones: altas, bajas, modificaciones)
Previous screen (Jump Previous) JP (sólo la anterior)
Next screen (Jump Forward) JF (igual que Intro)
Same screen (Jump in Place) JI (para refrescar los datos de pantalla)
New Context:
New Library N*lib (N**** para consultar toda la red de bibliotecas)
New session NHssss{T} (cambia a una sesión historizada)
Return to Current Session NH9999
New Change NCmmmnnn (cambia el número de modificación o nivel de
permiso de acceso que se teclea en la pantalla de entrada a
Pacbase)
(Nota: En Arcelor la transacción CICS DDMF arranca una utilidad para gestionar los números de modificaciones,
sesiones, etc.)
Update mode:
No update (inhibits the implicit action codes) .NU
Update (sets the implicit action codes) .U
Inhibit all update (implicit & explicit) .NT
Input mode:
Insert mode .NY (insertar líneas)
Return to standard overlay mode .NN
Display the differences between sessions:
without update .Dssss{T}
modify .Mssss{T}
– Desde la sesión actual, con .D se comprueban diferencias con la historizada ssss, indicando qué líneas
hay que crear (C), anular (A) o modificar (M) para que la actual quede igual que la historizada. O bien
al revés, desde la historizada tecleando .D9999.
– Desde la sesión actual, con .Mssss se actualiza la actual, pudiendo borrar los códigos de acción C/A/M
si no queremos modificar determinadas líneas. Desde una historizada, con .M9999 se podría
modificar dicha historizada „T‟ si tenemos permiso.
Within the Help function:
Return to beginning of documentation - (o a la “Definition screen” desde una entidad)
Return to PACBASE screen END or JP
IMS Job Review:
List of jobs LJOB
Review of Job «nnpp» JOB nnpp
.S/string1/{Bkey Ekey} Search for string 1 (Begin y End, por defecto todo)
.S/testword/ Basic Search (también sirve “.S testword” sin barras)
.S/testword/Bd01 Ed05 Search in Text Paragraph -D
.S/testword/Bp05 Ep40cc Search Procedural code -P
.S/testword/Bwbb010 Ewbb040 Search Work Area -W
.C1/old_string/new_string/{Bkey Ekey} Step-by-Step Replacement
.C2/old_string/new_string/{Bkey Ekey} Replacement (por defecto pantalla actual)
.C3/old string/new string/ Global Replacement (todo el programa , -W y -P)
.R{Bkey Ekey}nn Lines renumbering with "nn" interval (default=20).
.R Bp60bb100 Ep60bb400 10 Por defecto renumera toda la “sección” actual.
NOTE: For Segment and On-Line Screen Call of Elements (-CE), key=line number.
- 14 -
3. OPERATION FIELD
Operation field code (O:):
Mn Stores or memorizes the screen upon which the request is executed (n=1-9)
Rn Recalls the screen that was stored by the Mn operation (n=1 -9)
FT Final Transaction (salir de Pacbase)
- 15 -
5. GENERATION AND PRINT COMMANDS
THESAURUS
DCK Description of Thesaurus' Keywords with synonyms
LCK List of Keywords defined in the Thesaurus: Explicit, Implicit, or both. SEL:__
DATA ELEMENTS AND PROPERTIES
DCE Data Elements/Properties description
DFE Undefined Data Elements description
LCE List of Data Elements/Properties by Code
LKE List of Data Element/Properties by Keywords. SEL:__
LNE List of Data Elements/Properties by Name
LXE List of unused Data Elements
LACE List by COBOL name (Rev. Eng.)
TEXTS
DCT Description for Texts by Code
DTT Description for Texts by Type. TYPE:__
LCT List of Texts by Code
LKT List of Texts by Keywords. SEL:__
LTT List of Texts by Type. TYPE:__
L*T List of Paragraph Titles of Text
VOLUMES
DCV Description for Volumes by Code
LCV List of Volumes by Code
PCV Print Volumes by Code. CODE:__
LKV List of Volumes by Keywords
USER MANUALS
DCU Description of User Manuals by Code
LCU List User Manuals by Code
LKU List User Manuals by Keyword. SEL:__
PCU Print all/selected User Manuals
INPUT AIDS (P.I.A.'S)
DCI P.I.A. description
LCI List of P.I.A. by Code
LKI List of P.I.A. by Keywords
LXI List of P.I.A. by X-reference
DATA STRUCTURES
DCD Description of Data Structures
GCD Generation of Selected Data Structures with COBOL level numbers
GED Generation of error messages for this Data structure/Segment
LED List of all error messages for this D.S./Seg.
LCD List of Data Structures by Code
LKD List of Data Structures related by Keywords. SEL:__
LPD List of Data Structures by External Name
LTDt List of Data Structures by Type ‗t‘
SEGMENTS
DCS Description of Segments in FORMAT:__
LCS List of Segments by Code
LKS List of Segments by Keywords
REPORTS
DCR Reports description
LCR List of Reports by Code
- 16 -
LKR List of Reports related by Keywords
LTRt List of Reports by Type ‗t‘
PROGRAMS
DCP Program description
DSP Description of Programs (Rev. Eng.)
GCP Source code for selected Program
GSP Source code for selected Program (Rev. Eng.)
LCP List of Programs by Code
LEP List of Programs by External Name
LKP List of Programs related by Keywords
LTPt List of Programs by Type ‗t‘
ON-LINE SCREENS
DCO Description of Selected On-line Screens
DSO On-line Screen description (Rev. Eng.)
GCO Program and Map source code
GSO Program and Map source code (Rev. Eng)
GEO Generation of error messages for this screen
LCO List of On-line Screens by Code
LEO List of error messages for this screen
LKO List of On-line Screens by Keywords
LPO List by External program name
LSO List of On-line Screens by Map name
LTO List of On-line Screens by Transaction code
LNO List of On-line Screens by Type
SPECIAL COMMAND
UPC Shift to upper case for printers that do not support lower case. MANUAL:__ DOC:__ ERROR
MESS:__
CLIENT/SERVER ENTITY
DGC Description of a C/S Screen.
DGS Description of a Business Component
GGC Generate a C/S Screen
GGS Generate a Business Component
GVC Generate a Proxy Logical View (from Server Component)
ERROR MESSAGES
LEC List of error messages for a Client Component/Screen
LED List of error messages for a Data Structure/Segment
LEO List of all error messages for an On-line Dialogue/Screen
GE6 Generation of error messages for a (R6) file
GED Generation of error messages for a Data Structure/Segment
GEO Generation of error messages for a Dialog/Screen
GIP Generation for the VisualAge Pacbase-GIP Interface
GEC Generation of error messages for a C/S Dialogue/Component
C1 Error messages for the Dialog and for each Screen
C2 C1 plus documentary help messages
C3 Error messages for the Dialog only
C4 PAW revamping (GEO)
DATABASE BLOCKS
DTB Database Blocks description by Type
GCB Generation of source: Database Blocks
GSQ Generation of DDL for Relational/SQL block
LCB List of Database Blocks by Code
LEB List of Database Blocks by External name
LKB List of Database Blocks related by Keywords
LTB List of Database Blocks by Type
LES List of SQL objects by External name
LTS List of SQL objects by Code
- 17 -
MODEL ENTITIES
DCM Description of the Model Entity
DCMC Functional Integrity Constraints Description
DCMO Model Objects description
DCMR Model Relationships description
LCMC List of Model F.I.C. by Code
LCMO List of Model Objects by Code
LCMP List of Model Properties by Code
LCMR List of Model Relationships with F.I.C.'s.
LKM List of Model entities related by Keywords
USER ENTITY
DCF User Entities description
LCF List of User Entities by Code
LKF List of User Entities related by Keywords
USER RELATIONSHIP
DCQ Description of User relationships
LCQ List of User-Defined relationships by Code
LKQ List of U.E. Relationships by Keywords
USER ENTITY OCCURRENCE
DC$ Description of User Entity items
LC$ List of User Entity items by Code
LK$ List of User Entity items related by keywords
JOB CARDS and END-OF JOB DELIMITER
FLB Flow control of the Block
FLS Flow control for Relational/SQL blocks
FLD Flow control of Data Structures
FLO Flow control for Screens
FLP Flow control for Programs
FSP Flow control for Rev. Eng. Programs
FSO Screen job card / end delim (Rev. Eng.)
FGC Flow control for Client Component
FGS Flow control for Server Component
FLE Flow control for Error messages
FLV Flow control for Volumes
NB: All the Generation and Print Commands are grouped in the Bath Procedures Manual - User's Guide.
They are detailed, for each entity, in the Reference Manual of the concerned Module.
- 18 -
6. STRUCTURED CODE
- 19 -
TIM {dest} TIME HHMMSS format. (Se guarda en TIMCO X(8) o bien en la variable que se indique. En
Batch se traduce en ACCEPT TIMCO FROM TIME, mientras que en On-Line se traduce en una
llamada ASKTIME de CICS).
TIF {orig {dest}} HHMMSS to HH:MM:SS. (Por defecto utiliza TIMDAY).
- 20 -
RW ddss File rewrite
RN dd File read next (VSAM)
STA dd File start read (VSAM)
DEL Record delete (VSAM)
SRT Sort
E Error message
ADM Insertion of slashes in a date with century
ADS Date inversion with century (Pasa de formato CCAAMMDD a DDMMCCAA)
La definición del fichero VSAM en la –CD del programa se realiza de la siguiente forma:
A DP CO : DL EXTERN OARFU BLOCK T B M U RE SE L UNIT C SELECTION F E R L PL
YF : YF LMPR VDFID 0 R C *0001 I 1 1
: STAT.FLD: YF00STATUS ACC. KEY: KYG
Aquí KYG es la clave del fichero, mientras que STATUS FIELD genera una variable 1-YF00-STATUS PIC XX
que vale ZERO („00‟) si no hubo error, „97‟ si el OPEN se realizó correctamente, etc.
Por otra parte, la instrucción STA tendría la siguiente forma: STA YF NOT< YF00-KYG, y se traduciría en el
siguiente código en Cobol:
MOVE 0 TO IK
START YF-FILE KEY NOT < YF00-KYG
INVALID KEY MOVE 1 TO IK.
Mientras que la instrucción RN tendría la siguiente forma: RN YF, y se traduciría en el siguiente código en Cobol:
MOVE 0 TO IK
READ YF-FILE NEXT AT END MOVE 1 TO IK.
- 21 -
6.5.1. Fin de Bucle de Repetitiva con GDI y GDB
En On-Line el operador GDI en display realiza un salto al inicio del bucle de repetitiva actual, pero aumentando el
ICATR, es decir, la línea de repetitiva actual quedará en blanco. Por eso lo normal es utilizar el operador GDB
cuando no queremos mostrar registros que no cumplan determinadas condiciones. En este caso el ICATR no se
incrementa y se pasa a leer y validar el siguiente registro del fichero sin dejar ninguna fila en blanco en pantalla.
En el caso de la bifurcación diferida con OSD, o bien en automático en la –CE, se generaría el siguiente código:
IF I-daoo-CFUNP = ‘F’
MOVE ‘LMRCPI0’ TO 5-daoo-PROGE
MOVE ‘O’ TO OPER OPERD (o bien „E‟ de End si se sale del programa)
GO TO F0520-900.
Es decir, el programa continúa su ejecución y sólo bifurca al llegar a F40 y comprobar el valor de OPERD.
BL Block
IT If then
- 22 -
DW Do while
DU Do until
Haciéndolo así se recorren y evalúan todas las condiciones, además de que no sería fácil añadir un caso “else”
cuando no se cumpliera ninguna de las condiciones. Es más eficiente utilizar varios “If” anidados, aunque el código
sea más engorroso de escribir al tener que utilizar varios subniveles:
BB N ... 10IT condición1
BB ...
BD N ... 10EL
BF N ... 15IT condición2
BF ...
BI N ... 15EL
BK N ... 20IT condición3
BK ...
BM N ... 20EL
BM ...
Otra alternativa es la instrucción “Case of” de Pacbase, que tendría la siguiente forma:
BB N ... 10CO var
BB ...
BD N ... 15IT valor1
BD ...
BF N ... 15IT valor2
BF ...
BK N ... 15IT valor3
BK ...
BM N ... 15EL
BM ...
La desventaja es que los “If” que se generan no son anidados, además de que sólo admite uno o varios valores en los
“IT” (ej.: 15IT „A‟ OR „B‟ OR „C‟) y la comparación siempre se realiza por igual, pero no admite ningún otro tipo
de condiciones.
- 23 -
BB ... 99WH valor2
BB ...
BB ... 99WH valor3
BB ...
BB ... 99WH OTHER (cláusula WHEN OTHER)
BB ...
BB EEV (cláusula END-EVALUATE)
Finalmente también existe una forma más compleja con la cláusula ALSO que permite evaluar más de una variable
a la vez:
EVALUATE TRUE ALSO Position
WHEN W-TECLA = ‘IZDA’ ALSO 2 THRU 80 SUBTRACT 1 FROM Position
WHEN W-TECLA = ‘IZDA’ ALSO 1 MOVE 10 TO Position
WHEN W-TECLA = ‘DCHA’ ALSO 1 THRU 79 ADD 1 TO Position
WHEN W-TECLA = ‘DCHA’ ALSO 80 MOVE 1 TO Position
WHEN OTHER PERFORM CharProcessing
END-EVALUATE
Este ejemplo es algo así como una rutina simplificada de gestión del teclado en un editor de texto: se evalúa
simultáneamente la tecla de flecha izquierda/derecha pulsada y la posición actual del cursor. En el EVALUATE hay
2 elementos separados por ALSO, uno de tipo lógico y una variable numérica, por lo que en cada cláusula WHEN
también debe haber 2 elementos que han de casar en tipo con aquéllos para comprobar su validez.
En Cobol la sentencia “Evaluate” es claramente la mejor forma de codificar varias condiciones. Sin embargo en
Pacbase tiene la desventaja de que toda ella ha de ir en una misma subfunción, por lo que no se pueden utilizar otras
condiciones o estructuras dentro de cada uno de los casos del “Evaluate”.
Los índices se generan con los 4 caracteres que se escriban en el “Occurs” entre las columnas 20 a 23 del
campo LEVEL OR SECTION (columna 28 de pantalla), es decir, las columnas 3 a 6 a partir de WORK
AREA DESCRIPTION, es decir, justo debajo de la „R‟ de WORK. En este caso sería TDNI (aun cuando el
nombre podría ser más largo, por ejemplo, W-TDNISNOMBRES), y se generan las variables de índice
ITDNIL, ITDNIR e ITDNIM.
- 24 -
Para que se generen las variables de índice también es necesario indicar el número de elementos en la
columna OCCURS.
Los campos de la tabla deben tener como prefijo dichos caracteres para poder utilizar posteriormente la
instrucción de búsqueda SCH de Pacbase (si no se va a utilizar dicha instrucción da igual el prefijo o
nombre que tengan).
Las variables de índice se generan con formato S9(4) COMP. Inicialmente las dos primeras tiene en
Working VALUE 0, mientras que la tercera tiene el valor máximo de elementos de la tabla, es decir, en
este caso 50, lo que permite utilizarla para comprobar desbordamientos al recorrer la tabla.
ITDNIL debe ser actualizada por el usuario con el número de elementos reales que se guardan en la tabla.
ITDNIR se utiliza como índice de búsqueda y/o recorrido de la tabla. También la utiliza la instrucción SCH
de Pacbase para realizar las búsquedas en la tabla.
*A To insert the sub-function before the automatic sub-function (F20, F25, F35 and F65)
*P To insert the sub-function after the automatic sub-function (F20, F25, F30, F35, F60 and F65)
*R To replace an automatic sub-function (F20, F25, F35, F60 and F80)
With Relative Positioning, the SUB-FUNCTION CODE does not have any influence on the placement of
the sub-function in the generated program. It is used only to make it unique in the libraries.
- 25 -
7. ON-LINE GENERATION
7.1.2. Segment
Names:
ddss-eeeeee Segment Field
Format:
All Data Elements Internal Format
- 26 -
DATCTY Field for loading the century
DATSEP Contains the separator used for dates
DAT-CTYD Field which allows to determine the current day century
DAT-CTYT Field which allows to add the century to a date
TIMCO Field for loading the time (formato PIC X(8) HHMMSSCC)
TIMDAY Field for loading the formatted time (HH:MM:SS) (formato PIC X(8))
5-xxnn-PROGE Field containing the name of the program to branch to
5-daoo-VTRAN Transacción actual.
K-Sdaoo-PROGR Programa Pacbase del que se viene
EIBTRNID Transacción de la que se viene (variable de CICS).
EIBTRMID Identificador del terminal (variable de CICS).
5-ddss-DDNAME Nombre externo fichero CICS.
01 TIMCO.
02 TIMCOG. (esta variable sólo se genera en on-line)
10 TIMCOH PIC XX.
10 TIMCOM PIC XX.
10 TIMCOS PIC XX.
02 TIMCOC PIC XX.
La variable TIMCO se alimenta con la instrucción TIM en el formato HHMMSSCC.
01 TIMDAY.
05 TIMHOU PIC XX.
05 TIMS1 PIC X VALUE ‘:’.
05 TIMMIN PIC XX.
05 TIMS2 PIC X VALUE ‘:’.
05 TIMSEC PIC XX.
La variable TIMDAY se alimenta con la instrucción TIF en el formato HH:MM:SS.
- 27 -
7.4. Program control variables
ICF Input configuration. Is there an Input Configuration? (Should RECEPTION be performed?). SET:
F0110, USED: F05
'1' YES, Screen in input '0' NO, No screen in input
OCF Output configuration. Is there an Output Configuration? (Should DISPLAY PREP. be
performed?). SET: F0110, USED: F50
'1' YES, Screen in output '0' NO, No screen in output
OPER Internal Operation code. (código de operación de pantalla). SET: F0520, USED: F15 & F40.
'A' Display or inquiry (default) (consulta o visualización)
'M' Update (default if CATM contains valid value)
'S' Screen continuation (Scroll)
'E' End (final de conversación)
'P' Same Screen (Previous display). (misma pantalla, por ejemplo si hay que actualizar y
refrescar datos de display)
'O' Call of another Screen (Transfer to another screen)
OPERD Operation code for deferred branching, transferred to OPER in the F40 function. (Initialized in
F0520). (es decir, es una salvaguarda del OPER hasta que se realiza el salto diferido en F40).
'' No deferred call of another Screen
'O' Deferred call of another Screen
CATM Internal (Trans)Action code. (código de acción de línea). SET: F15 (si OPER=‟M‟), USED: F20,
F25, F30, F35. CAT applies to a screen CATegory, M only used when OPER=‘M‘.
'' No update (default)
'C' Creation (explícita)
'M' Modification (explícita)
'A' Deletion (anular)
'X' Implicit update (create or modify)
CATMA Saving of the transaction code of the screen-top category
CATX Code of the category being executed. RECEP. SET: F1010, USED: F20, D25, F30, F35; DISP.
SET: F5510, USED: F60 & F65. CAT applies to screen CATegory, X to being eXecuted.
'0' Beginning of Reception or Display
'' Screen-top (cabecera)
'R' Repetitive
'Z' Screen-bottom (pie)
ICATR Current ‗R‘ category group repetition being processed (Repetitive category only). (valores de 1 a
IRR). SET: F1010, F5510, USED: F1010, F5510.
IRR Number of repetitions in the repetitive category. (valor constante definido según la -CE). USED:
F1010, F5510.
ddss-CF Segment configuration indicator. (segmento que participa en el tratamiento en curso, mantiene su valor
hasta que se haga otro acceso a dicho fichero, mientras que el valor de IK es único y se fija tras cada
acceso a cualquier fichero). SET: F25, F60, USED: F25, F60.
'0' Segment I/O area does not contain a record. (es decir, no se ha leído nada)
'1' Segment I/O area contains a record. (es decir, se ha leído un registro)
- 28 -
ER-daoo-eeeeee Data Element error indicator. (PR-oo-eeeeee en francés). Memorization of DEL-ER for this
data element. SET: F20, USED: F20, F70.
'0' Absent Data Element (campo opcional vacío CAT-ER=‟ „)
'1' Present Data Element (campo con valor válido CAT-ER=‟ „)
'2' Invalid absence of Data Element (campo obligatorio vacío CAT-ER=‟E‟)
'3' Invalid presence of Data Element (presencia no válida CAT-ER=‟E‟)
'4' Erroneous class (tipo de dato erróneo CAT-ER=‟E‟)
'5' Invalid content (valor no permitido CAT-ER=‟E‟)
DEL-ER Memorization of the Data Element Presence or Status at a given time. Has an error
been detected while editing the current data element? SET: F20, F8118, user-written
edits; USED: F20. Values are same as ER-oooo-eeeeee.
- 29 -
Normalmente el último registro a visualizar (es decir, que se lee del fichero) se indica con „C‟ en la –CS en los
campos que marcan el final cuando difieren de la clave inicial (columna „B‟ de Break). Sin embargo, por
ejemplo un fichero temporal no tiene la clave formateada, por lo que habrá que detectar a mano el último
registro y mover a mano el valor de K-RZW15-KTEM15(2). En realidad ya se habrá leído el primer registro no
válido, por lo que habrá que ir guardando en variables auxiliares de working la clave del último registro válido,
y éste será el valor que moveremos a K-RZW15-KTEM15(2).
Cuando un registro del fichero ya leído no cumple alguna condición y no queremos que salga en repetitiva, se
hace un GDB, que salta al principio de la siguiente iteración de repetitiva, pero sin incrementar ICATR (en otro
caso aparecería en repetitiva una línea en blanco). Pero el problema del GDB es que no actualiza correctamente
K-RZW15-KTEM15(2), ya que al hacer el GDB no se pasa por donde se actualiza dicha variable, y habrá que
hacerlo a mano cuando se termine la repetitiva.
Si se desea volver a visualizar la repetitiva desde el primer registro (opción „I‟ en Arcelor), se mueve el valor de
la clave de inicio a K-RZW15-KTEM15(1) en F40.
Cuando en la última repetitiva se pulsa Intro y no hay más registros a visualizar, en estándar aparece una
repetitiva vacía (en realidad esto sólo ocurre cuando se descartan registros con GDB). En Arcelor hacen que
siempre se visualice el último registro de la repetitiva anterior. Para ello, al final de la lectura de registros se
mueve la clave del último registro visualizado (no del último registro leído) a la K-RZW15-KTEM15(2) en
F60. (ver ejemplo en MSMAC5).
*NEW DISPLAY
F4010. IF OPER NOT= ‘A’ AND NOT= ‘M’ GO TO F4010-FN.
F40R.
M SPACES TO ZW15-KTEM15 (estas 2 líneas generadas a partir de la –CS)
M AUX-CLAVE TO ZW15-KTEM15
M ZW15-KTEM15 TO K-RZW15-KTEM15(1).
F40R-FN. EXIT.
F4010-FN. EXIT.
*SCREEN PAGING
F4020. IF OPER NOT= ‘S’ GO TO F4020-FN.
M K-RZW15-KTEM15(2) TO K-RZW15-KTEM15(1). (alimentar clave continuación de lista)
F4020-FN. EXIT.
...
F5010.
M R-Rdaoo-REPE(1) TO R-Rdaoo-REPE(2) (guardar claves)
M ‘1’ TO ZW15-CF.
M ZW15-KTEM15 TO K-RZW15-KTEM15(2). (guardar clave de inicio para siguiente scroll)
(código Pacbase generado con 15*P ZW15 R)
F60nn-FN.
(código Pacbase generado con 10*P ZW15 R. OJO, como se puede ver, los 15*P sólo se ejecutan si la lectura
fue correcta, mientras que los 10*P se ejecutan siempre)
- 30 -
7.8. Control Manual de Mensajes de Fin de Lista
Cuando el fichero principal de la repetitiva accede a otro para obtener datos, si no los encuentra este segundo fichero
dará un mensaje de error Gnn9 de „FIN DE LISTA‟. Para evitarlo se puede poner en blanco este mensaje para dicho
fichero en la –G de la siguiente forma:
100 S ZW15
110 U G 9 (dejar texto mensaje en blanco o poner uno personalizado)
Otra forma de no mostrar el mensaje de Fin de Lista es alimentando la variable K50L en la F60 después de acceder
al fichero:
Por otra parte, si sólo se desea mostrar en la repetitiva los valores de una clave (es decir, existen más registros en el
fichero y por tanto no se generará el mensaje automático de fin de Lista), habrá que indicarle a Pacbase que deje de
listar cuando la clave leída no sea la que deseamos. Al hacer GFT se va a F6999-ITER-FT, con lo que el mensaje
„FIN DE LISTA‟ habrá que alimentarlo a mano en la variable „O-‟ correspondiente antes del GFT, así como
cualquier otro dato „O-‟ del pie que se quiera mostrar (por ejemplo, en F71, ya que F70 está ocupada con el
procesamiento de errores).
En este mismo caso otra idea sería hacer GDB en vez de GFT y dejarlo seguir leyendo hasta el final del fichero para
que diera el mensaje de Fin de Lista en automático, pero no tiene sentido si tenemos en cuenta que el fichero puede
tener miles o millones de registros. Pero una idea sería alimentar la clave con HIGH-VALUES y hacer GDB (habría
que ver qué es lo más adecuado en cada caso).
- 31 -
Nota: En F26 se pueden meter por ejemplo accesos manuales condicionados a CAT-ER=SPACE y CATX=‟x‟,
siendo „x‟ la categoría que se desee.
F30. DATA ELEMENT TRANSFER (-CE) 05IT CAT-ER = ' '
(transferir datos de pantalla “I-” a campos fichero para actualización)
F30A. Screen-top Category 07IT CATX = ‗ ‗
F30R. Repetitive Category 07IT CATX = ‗R‘
F30Z. Screen-bottom Category 07IT CATX = ‗Z‘
Nota: En F31 se pueden meter por ejemplo alimentaciones manuales condicionadas a CAR-ER=SPACE y
CATX=‟x‟, siendo „x‟ la categoría que se desee.
F35. SEGMENT UPDATE (-CS) 05IT CAT-ER = ' '
(columna „R‟ de la –CS)
F35A. Screen-top Category 07IT CATX = ' '
F35nn. Update Segment nn… 10BL
F35R. Repetitive Category 07IT CATX = ‗R‘
F35nn. Update Segment nn… 10BL
(Nota: F35R-C5. MOVE SPACE TO O-daoo-CACCI, es decir, si se da un error después de la F35, hay
que restaurar O-daoo-CACCI, ya que en otro caso aparecerá en blanco)
F35Z. Screen-bottom Category 07IT CATX = ‗Z‘
F35nn Update Segment nn… 10BL
Nota: En F36 se pueden meter por ejemplo actualizaciones manuales condicionadas a CAR-ER=SPACE y
CATX=‟x‟, siendo „x‟ la categoría que se desee.
BOTTOM OF RECEPTION LOOP 04BL
F3999-ITER-FI. GO TO F10. (fin del bucle do-while)
F3999-ITER-FT. EXIT.
END OF RECEPTION PROCESSING 04BL
F40. DECISION (Transaction management) 05IT SCR-ER = '1' (si no error)
F4010. Set-up keys for new display (-CS) (misma pantalla) 10IT OPER = 'A' or 'M'
F4020. Set-up keys for screen paging (-CS) (scroll) 10IT OPER = 'S'
F4030. End of transaction 10IT OPER = 'E'
F4040. Transfer to another C/S Screen 10IT OPER = 'O'
END-OF-RECEPTION. (F45-FN.)
- 32 -
DISPLAY ROUTINE 03BL
F8Z. DISPLAY (Display and end of Program) 05 BL
F8Z05. Send HELP Documentation (Help sub-function) 10IT SCR-ER = '1'
F8Z10. Send Map (Display) 10BL
F8Z20. Return Control (End of Program) 10BL
NB: For a detailed description of Generated On-Line Program, see the OLSD Reference Manual for the
concerned On-line monitor.
- 33 -
10 FDDSS-ENDV. End of DDSS logical view processing
05 FSERVER-END. End of server processing
10 FDDSS- TRDT. Transfer of the logical view data to the Segment data in physical access
15 FDDSS-TRDT-CATX. X Category processing (X = 'A', 'R' or 'Z')
10 FDDSS-CHKD. Logiciel view data control
10 FDDSS-CHKD-CATX. X Category processing (X = 'A', 'R' or 'Z')
10 FDDSS-TRVW. Transfer of Segment data to the logical view data
15 FDDSS-TRVW-CATX. X Category processing (X = 'A', 'R' or 'Z')
10 FSSNN-CHCK. Logical check access processing of SSNN Segment
15 FSSNN-CHCK-CATX. X Category processing (X = 'A', 'R' or 'Z')
20 FSSNN-CHCK-CATX-ALIM. Key loading
20 FSSNN-CHCK-CATX-CALL. Physical access call
20 FSSNN-CHCK-CATX-ERRS. Error processing on physical access
10 FSSNN-UPDT. Processing of the logical update access on SSNN Segment
15 FSSNN-UPDT-CATX. X Category processing (X = 'A', 'R' or 'Z')
20 FSSNN-UPDT-CATX-ALIM. Key loading
20 FSSNN-UPDT-CATX-CALL. Physical access call
20 FSSNN-UPDT-CATX-ERRS. Error processing on physical access
10 FSSNN-SLCT. Processing of the logical selection access on SSNN Segment
15 FSSNN-SLCT-CATX. X Category processing (X = "A", "R", "Z" or "T")
20 FSSNN-SLCT-CATX-ALIM. Key loading
20 FSSNN-SLCT-CATX-CALL. Physical access call
20 FSSNN-SLCT-CATX-ERRS. Error processing on physical access
F80 Physical access
F81 Complementary processing (end of Program, error management...)
- 34 -
8. BATCH PROGRAM GENERATION
- 35 -
‗7‘ duplicate record
‗8‘ invalid creation (master record already exists)
‗9‘ invalid modification or deletion (master record not found)
TR-ER The last field in the table SE-ERR is named TR-ER and is used for storing errors detected at
the transaction level:
‗1‘ no error detected
>‗1‘ an error is detected (specific error on a transaction record)
SE-ERE Stores the presence status of the record being processed.
GR-ER Stores information concerning errors detected on a group of transactions which update a
record, of at least one principal data structure.
UT-ERUT Stores the user's errors. Contain the status of each user validation in a one-byte field.
‗0‘ no error
‗1‘ error detected
Trst-eeeeee(n) Intermediate total accumulator at level n (J05, J06, J07), for data element eeeeee of
structure st in report r.
Grst-eeeeee Grand total accumulator, for data element eeeeee of structure st in report r.
- 36 -
8.9. Batch Program Standard Structure
(This structure will vary, depending on the environment. Based on the specifications entered, all or none
of these functions may be generated.)
DATA DIVISION
Program Constants
Database I/O Areas
File I/O Areas
PROCEDURE DIVISION
F01. INITIALIZATIONS 05BL
F01dd. Open Files or Initialize Table (Data Structure dd) 10BL
(for each d.s. to open)
F05. READ SEQUENTIAL FILES WITH NO CONTROL BREAKS 05BL
F05dd. Read dd-file 10IT dd-FT = ‗0‘
(for each appropriate d.s.)
Note: With ORGANIZATION ‗D‘, ‗L‘ or ‗W‘ contains PERFORM
F95dd (use macro or Procedural Code)
F10. READ SEQUENTIAL FILES WITH CONTROL BREAKS 05BL
F10dd. Read dd-file 10BL
(for each appropriate d.s.)
F20. END OF RUN 05IT FT = ALL '1'
F20dd. Close dd-file 10BL
(for each d.s. to close)
F2099. Stop Run 10BL
F22. CALCULATE FILE CONTROL BREAKS 05BL
F22dd. Calculate control break on dd-file 10BL
(for each appropriate d.s.)
F24. FILE MATCHING LOGIC 05BL
F24dd. File Matching for dd-file 10BL
(for each d.s. with control break >= file matching)
F24nn. Set the Occurrence Flag (dd-OCn) for each ctrl break level. 10IT FTBn = ‗1‘
If FTBn=‘1‘ for the lowest level, move the old Master record to the
update area (2-dd00)
F26. TOTAL CONTROL BREAK LOGIC 05BL
F30. CALCULATE VALIDATION VARIABLES 05IT dd-CFn = ‗1‘
(where n is lowest match level)
F33. IDENTIFICATION VALIDATION 05IT dd-CFn = ‗1‘
F33AA. Record Type Validation 10BL
F33BB. Transaction Code Validation 10IT ID-ER = '0'
F36. DUPLICATE RECORD VALIDATION 05IT dd-CFn = ‗1‘
F39. PRESENCE OF DATA ELEMENTS 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
F3900. Record dd00 10BL
F39nn. Record ddnn 10IT 1-dd00-rectyp='x'
(for each record type)
F42. RECORD STRUCTURE VALIDATION 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
F4210. Common Part 10BL
F4220. Specific parts 10BL
F45. DATA ELEMENT CONTENTS VALIDATION 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
F4500. Record dd00 10BL
F45nn. Record ddnn 10IT 1- dd00-rectyp='x'
(for each record type)
F51. RECORD PRESENCE VALIDATION 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
F5110. Record Presence Validation 10BL
F5120. Record Absence Validation 10IT dd-FBn = '1'
- 37 -
F70. EXISTENCE VALIDATION 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
AN dd-IBn = ‗1‘
F70dd. Existence validation on dd-file 10BL
(for each appropriate d.s.)
F73. UPDATE 05IT dd-CFn = ‗1‘
AN ID-ER = '0'
AN SE-ER(I01) = '1'
F7301. Update segment 10 by trans. 10 10IT 1-dd00-rectyp='x'
F7302. Update segment 20 by trans. 20 10IT 1-dd00-rectyp='y'
F76. STORE ERRORS & BACKOUT 05IT dd-CFn = ‗1‘
F76dd. Backout for dd-file 10IT FTBn = '1'
(for each appropriate d.s.) AN GR-ER = '1'
F8r. REPORT LOGIC FOR REPORT R 05IT condition on-D(top)
by report structures
F8rzz. Loads Constant Part 10BL
F8r00. Loads Variable Part 10BL
F8r99. Physical Write 10BL
F90. WRITE FILES 05BL
F90dd. Write dd-file 10BL
(for each output file) (or 10IT dd-OCn = ‗1‘
AN FTBn = ‗1‘
for updated master files)
F9099-ITER-FN. GO TO F05 05BL
F95. Lecturas DB2 definidas por el usuario. 05BL
NB: For a detailed description of Generated Batch Program, see the Batch Systems Development
Reference Manual.
- 38 -
9. VISUALAGE PACBASE ENVIRONMENT
NB: the Management of user's parameters is described in the User Interface Guide; the Production
Environment Interface is detailed in the Production Environment Manager reference Manual.
- 39 -