38
VisualAge Pacbase 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: [email protected] Versión ampliada 1.0 por Juan A. Rodríguez Parra, Gijón, Septiembre-2010

Guía de Pacbase - Juan Rodríguez Parra

Embed Size (px)

DESCRIPTION

Guía rápida del entorno de programación para host en lenguaje Pacbase, ampliada con comentarios personales.

Citation preview

VisualAge Pacbase 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: [email protected]

Versión ampliada 1.0 por Juan A. Rodríguez Parra, Gijón, Septiembre-2010

- 3 -

This Pocket guide describes the command language used to access the different VisualAge Pacbase screens. 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. Copyright © 1999 by IBM. All rights reserved.

- 4 -

TABLE OF CONTENTS

1. THE FUNCTION KEYS ............................................................................................................................. 6

2. THE CHOICE FIELD ................................................................................................................................. 6

2.1. PRESENTATION ..................................................................................................................................... 6 2.1.1. Access an Entity .......................................................................................................................... 6 2.1.2. Lists of entities ............................................................................................................................. 7 2.1.3. Special choices ............................................................................................................................ 7

2.2. LIBRARY ............................................................................................................................................... 7 2.3. KEYWORD............................................................................................................................................. 7 2.4. ELEMENT .............................................................................................................................................. 8 2.5. TEXT .................................................................................................................................................... 8 2.6. VOLUME ............................................................................................................................................... 9 2.7. USER MANUAL ...................................................................................................................................... 9 2.8. (PARAMETERIZED) INPUT AID (P.I.A.)..................................................................................................... 9 2.9. DATA STRUCTURE ...............................................................................................................................10 2.10. SEGMENT .........................................................................................................................................10 2.11. REPORT ...........................................................................................................................................11 2.12. PROGRAM.........................................................................................................................................11 2.13. ON-LINE SCREEN ..............................................................................................................................11 2.14. DATABASE BLOCK .............................................................................................................................12 2.15. MODEL ENTITY (PACMODEL) ..........................................................................................................13 2.16. USER ENTITY (EXTENSIBILITY) ...........................................................................................................13 2.17. USE-DEFINED RELATIONSHIP (EXTENSIBILITY) ...................................................................................13 2.18. USER ENTITY OCCURRENCE (EXTENSIBILITY) .....................................................................................13 2.19. SPECIAL CHOICES .............................................................................................................................14 2.20. SPECIAL TEXT EDITING......................................................................................................................14

3. OPERATION FIELD ................................................................................................................................15

4. ACTION CODE FIELD ............................................................................................................................15

5. GENERATION AND PRINT COMMANDS .............................................................................................16

THESAURUS ..........................................................................................................................................16 DATA ELEMENTS AND PROPERTIES ..................................................................................................16 TEXTS .....................................................................................................................................................16 VOLUMES ...............................................................................................................................................16 USER MANUALS ....................................................................................................................................16 INPUT AIDS (P.I.A.'S)..............................................................................................................................16 DATA STRUCTURES ..............................................................................................................................16 SEGMENTS ............................................................................................................................................16 REPORTS ...............................................................................................................................................16 PROGRAMS ............................................................................................................................................17 ON-LINE SCREENS ................................................................................................................................17 SPECIAL COMMAND ..............................................................................................................................17 CLIENT/SERVER ENTITY ......................................................................................................................17 ERROR MESSAGES ...............................................................................................................................17 DATABASE BLOCKS ..............................................................................................................................17 MODEL ENTITIES ...................................................................................................................................18 USER ENTITY .........................................................................................................................................18 USER RELATIONSHIP ...........................................................................................................................18 USER ENTITY OCCURRENCE ..............................................................................................................18 JOB CARDS AND END-OF JOB DELIMITER ...........................................................................................18

6. STRUCTURED CODE ............................................................................................................................19

6.1. GENERAL OPERATORS ........................................................................................................................19 6.1.1. Date Formats .............................................................................................................................20 6.1.2. Los Comentarios en Pacbase ...................................................................................................20

6.2. COBOL II OPERATORS .......................................................................................................................20 6.3. SQL OPERATORS ...............................................................................................................................20

- 5 -

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 (WORK 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

- 6 -

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:

Number Standard significance

PF1 Recall screen memorized in M1 (equivalent to operation code R1) PF2 Recall screen memorized in M2 (equivalent to operation code R2) PF3 Recall screen memorized in M3 (equivalent to operation code R3) PF4 Call screen-related HELP (equivalent to action code "?") PF5 Return to main menu (equivalent to choice "H") PF6 Return to initial sign-on screen (equivalent to operation code "FT") PF7 Inhibits implicit action codes. (Ej.: poner varias líneas „C‟ y pulsar F7 en

vez de Intro para copiar solamente dichas líneas). PF8 CICS: "-TC" screen display starting from cursor position PF9 Call of "-TC" screen from "-PG" and vice-versa or Zoom on key

description from screen B......DR PF10 Branch to Entity Definition screen PF11 Branch to Entity or Description Line General Documentation ("G") PF12 End of session with conversation saved (CICS only)

2. THE CHOICE FIELD

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

Depending on the entity, different description screens can be accessed:

The description of an entity is generally accessed by the 1-character code D: Element Description EeeeeeeD

- 7 -

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

General Documentation is accessed by entering G: Input Aid General Documentation, IiiiiiiG Remark: Once an entity has been selected, the combination "entity type/entity code" can be replaced with a "-".

2.1.2. Lists of entities

An entity list is obtained by entering an "L" The second character specifies the type of list:

List by code LC List by type LT List by name LN List of undefined entities in dictionary LF List by code for update LU List by external name LE

The third character specifies the entity type: LCT List by Code Text

Remark: Special list commands are described with each entity.

2.1.3. Special choices

Special requests are entered with an explicit one to four character code: Journal File Display of transactions JO Activity Calculation on Segment S .... ACT

Menus are accessed by entering H with or without the entity type code specified: Elements menu HE Special choices menu HSC Menu for Program screens HP

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.

- 8 -

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)

- 9 -

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}

2.7. User Manual

Definition (U) U .. General Documentation (U) U .. G ... Cross-Reference to User Relation U .. XQ ...... Description (U) U .. D .. – List of User Manuals by Code LCU .. NB: For a detailed description of Volume entity, see the Personalized Documentation Manager Reference Manual. For the User Manual entity, see the Specifications Dictionary Reference Manual.

2.8. (Parameterized) Input Aid (P.I.A.)

(Son fichas que se utilizan en la –G de un programa a modo de formularios en los que añadir información. Ej.: 100 I

TECMOD, y al pulsar Intro aparece la ficha)

Definition (U) I iiiiii General Documentation (U) I iiiiii G {lll} Assigned Text I iiiiii AT {tttttt} Cross-References I iiiiii X

to Libraries I iiiiii X* {lib} to Data Structures I iiiiii XD {dd} to Reports I iiiiii XR {ddr}. to On-Line Screens I iiiiii XO {daoooo} to Model Entities I iiiiii XM {mmmmmm} to Database Blocks I iiiiii XB {bbbbbb} to Text I iiiiii XT {tttttt} to Data Elements I iiiiii XE {eeeeee} to Volumes I iiiiii XV {vvvvvv} to (Parameterized) Input Aids I iiiiii XI {iiiiii} to Programs I iiiiii XP {pppppp} to Segments I iiiiii XS {ddss} to User Entities I iiiiii XF {ffffff} to User Entity Occurrences I iiiiii X$ {ty $$$$$$} (ty=user entity type code) to User-Defined Relationships I iiiiii XQ {qqqqqq} to User Manual I iiiiii XU ..

- 10 -

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.9. Data Structure

Definition (U) D dd General Documentation (U) D dd G {lll} Assigned Text D dd AT {tttttt} Cross-References D dd X

to User-Defined Relationships D dd XQ {qqqqqq} to Volumes D dd XV {vvvvvv} to Programs D dd XP {pppppp}

D dd XP {pppppp W pl lll} to Screens D dd XO {daoooo}

D dd XO {daoooo W pl lll} Data Structure List

of segments D dd LS {ss} (ss=segment code) of reports D dd LR {r} (r=report code)

List of Data Structures by code LCD {dd} by type LTD {t} (t=D.S. type, Ej.: LTD J para ver relación con reports) LTD {t D dd} by external name LPD {extern} (6 char D.S. external name on –CD of program)

NB: For a detailed description of Data Structure and Segment entities, 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}

- 11 -

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.

2.13. On-Line Screen

Definition (U) O daoooo General Documentation (U) O daoooo G {lll} Assigned Text O daoooo AT {tttttt}

- 12 -

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.

2.14. Database Block

Definition (U) B bbbbbb General Documentation (U) B bbbbbb G {lll} Assigned Text B bbbbbb AT {tttttt} Cross-References B bbbbbb X

to Volumes B bbbbbb XV {vvvvvv} to User Relationship B bbbbbb XQ {qqqqqq} to Blocks in PSB'S B bbbbbb XB {bbbbbb} to Screens B bbbbbb XO {daoooo} B bbbbbb XO {daoooo CS ....} B bbbbbb XO {daoooo W ..} to Programs B bbbbbb XP {pppppp} B bbbbbb XP {pppppp W ..}

Description (Hierarchical) (U) B bbbbbb DH {lll} Documentation (U) B bbbbbb DH lll G {lll}

Description (Codasyl/DB2) (U) B bbbbbb DC {lll} Documentation (U) B bbbbbb DC lll G {lll} (Ej.: BHEDP70DC100G)

Description (Relational/SQL) (U) B bbbbbb DR {lll} Documentation (U) B bbbbbb DR lll G {lll} Building of Relational/SQL Key (U) B bbbbbb DR lll K Nota: esta última forma permite ver las claves de la B.D., aunque es equivalente y más rápido pulsar F9

sobre una línea de tipo „I‟ (index) en la vista –DR lll („U‟=clave única, „A‟=ascendente, etc.).

Description (Turbo.Image)(U) B bbbbbb DT ... Documentation (U) B bbbbbb DT ... G ...

Generation of SQL commands B bbbbbb GEN Interactive SQL B bbbbbb SQL List of Blocks

by code LCB {bbbbbb} by type LTB {ty bbbbbb} (ty=2 char block type code) by external name LEB {ty blkextrn} (blkextrn=8 char block external name)

- 13 -

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)

2.15. Model Entity (PACMODEL)

Definition (U) M mmmmmm General Documentation (U) M mmmmmm G {lll} Assigned Text M mmmmmm AT {tttttt} Cross-References M mmmmmm X

to Model Entities M mmmmmm XM {mmmmmm} to User Relationships M mmmmmm XQ {qqqqqq} to Segments M mmmmmm XS {ddss} to Volumes M mmmmmm XV {vvvvvv} to DB Blocks M mmmmmm XB {bbbbbb}

Relationship Call of Objects (U) M mmmmmm CM {lll} Documentation (U) M mmmmmm CM lll G {lll}

Call of Elements/Attribute (U) M mmmmmm CE {lll} Documentation (U) M mmmmmm CE lll G {lll}

List of Model Attributes by code LMP {propty} (propty=6 char Property Code) List of Model F.I.C.'s by code LMC {ficfic} (ficfic=6 char Functional Integrity Code) List of Model Objects by code LMO {object} (object=6 char Object Code) List of Model Relationships by code LMR {relatn} (relatn=6 char Relationship Code) NB: For a detailed description of Database Block entity, see the Database Description Reference Manual of the database concerned. For Model entity, see the Specifications Dictionary Reference Manual.

2.16. User Entity (Extensibility)

Definition (U) F ffffff General Documentation (U) F ffffff G {lll} Assigned Text F ffffff AT {tttttt} Cross-references F ffffff X

to Volumes F ffffff XV {vvvvvv} to User Relationships F ffffff XQ {qqqqqq}

Call of Elements (U) F ffffff CE {n lll} (n=1-9 char Type of Description Line)

List of User Entities by code LCF {ffffff} List of Occurrences for User Entity F ffffff L$ {ty $$$$$$} (ty=User Entity Type Code)

2.17. Use-Defined Relationship (Extensibility)

Definition (U) Q qqqqqq General Documentation (U) Q qqqqqq G {lll} Assigned Text Q qqqqqq AT {tttttt} Cross-References Q qqqqqq X

to Volumes Q qqqqqq XV {vvvvvv} to User Relationships Q qqqqqq XQ {qqqqqq} to Entities Q qqqqqq X* ... to User Entities Q qqqqqq XF {ffffff}

List of User Relationships by code LCQ {qqqqqq}

2.18. User Entity Occurrence (Extensibility)

Definition (U) $ ty $$$$$$ (ty=User Entity Type Code) General Documentation (U) $ ty $$$$$$ G {lll} Assigned Text $ ty $$$$$$ AT {tttttt} Cross-References $ ty $$$$$$ X

to Volumes $ ty $$$$$$ XV {vvvvvv} to User-Defined Relationships $ ty $$$$$$ XQ {qqqqqq}

Description (U) $ ty $$$$$$ D {n lll} (n=1-9 c. Number of Description Screen) List of User Entity Occurrences by code LC$ {ty $$$$$$}

- 14 -

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

2.20. Special Text Editing

Where allowed:

.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.

- 15 -

3. OPERATION FIELD

Operation field code (O:):

C1 Selected library and higher level libraries (default)

U1 Selected library only

Z1 Selected library and lower level libraries

I1 Selected library and lower and higher level libraries

>1 Higher level libraries

<1 Lower level libraries

A1 Identical to C1 with display of duplicates 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)

4. ACTION CODE FIELD

Blank lmplicit Update (create or modify) C Create (OJO, utilizar F7 para no copiar o modificar las que no tienen „C‟) M Modify D Delete B Block (multiple) deletion L End delimiter of multiple deletion E or - Inhibits implicit update on the line ? Help documentation S Split line of text where cursor is positioned T Line transfer (se indica en SF/LIN la subfunción/número de línea al que se transfiere) G Group line transfer L End delimiter of group line transfer I nnn Insert nnn lines here (nnn is entered in the LINE NUMBER field). R nnn Repeat nnn times, beginning with the line number where the R action code is entered (nnn is

entered in the next field). J nnn On any line other than an l, R or S line, gives the step "nnn" by which to increment line numbers

(optional, defaults to calculated line number). Ej.: insertar 10 líneas numeradas de 5 en 5:

A SF LIN

- -- ---

J 05

I 10

X Explicit update (creation/modification) The following action codes are displayed by Pacbase: > Inserted line * Line brought into a program via a macro (-P, -PG, -TC, -W) or a virtual line (-G, -D) · Line of code that Pacbase will automatically generate (-PG, -TC) or, if it appears on all lines on

a screen, it means that the entity is not in your library 1, 2, 3 Explicit update (creation/modification)

- 16 -

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

- 17 -

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

- 18 -

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.

- 19 -

6. STRUCTURED CODE

6.1. General Operators

N título Title, must be line 000 * texto Comment SUP Suprime (anula) el código desde la línea actual hasta el final de las subfunción. Si se pone en una

línea de título suprime toda la subfunción, y si se pone en un título a nivel 05, suprime toda la

función junto con todas sus subfunciones.

INI var1 var2… Initialize de Cobol. M orig dest Move MA orig dest Move all P etiq Perform C expr Compute (Ej.: C A = B + C, o bien, C A ROUNDED = B + C) A n1 n2 … Add (Ej.: A 10 B, o bien, A 10 CONTA RENTA GIVING TOTAL) S orig dest Subtract (Se traduce en SUBSTRACT orig FROM dest, es decir, dest=dest-orig): MP n1 n2 Multiply (Resultado en n2) DV n1 n2 Divide into (Resultado en n2, es decir, en Cobol es DIVIDE n1 INTO n2: n2=n2/n1. La forma

completa es DV n1 n2 GIVING n3 {REMAINDER n4}. La alternativa de Cobol es DIVIDE n1

BY n2 {GIVING n3 {REMAINDER n4}}). MES lit|var… Display message ACC Accept (Ej.: ACC DATOR FROM DATE, ACC WWBB-HORA FROM TIME).

Nota: DATE y TIME son variables del sistema que se utilizan en Batch, no en On-Line, donde la

fecha se obtiene con las instrucciones propias de Pacbase que se traducen en llamada CICS a

ASKTIME y FORMATTIME. Otra posibilidad para obtener o realizar operaciones con

fechas/horas en programas con DB2 es utilizar la instrucción EXQ SET var = CURRENT DATE,

CURRENT TIME, CURRENT TIMESTAMP, :W-FECHA1 - :W-FECHA2, etc.

STR String UNS Unstring CAL Call GT nn Go to end of current sub-function with level number nn GFT Go to end of iteration. On-line: end of category processing (F3999-ITER-FT en recepción y

F6999-ITER-FT en display); Batch: end of program (se convierte en MOVE ALL „1‟ TO FT y

GO TO F20). GDI Go to beginning of iteration. On-line: next occurrence of current category, or next

category; Batch: F05. GB nn Go to beginning of current loop with level number nn EXA Examine (Ej.: EXA var REPLACING LEADING „ „ BY „0‟) INS Inspect (Ej.: INS var REPLACING ALL SPACES BY ZEROES) COB COBOL B margin (Instrucción COBOL a mano en margen B: cols. 12 a 72) COA COBOL A margin (Etiquetas COBOL a mano en margen A: cols. 8 a 11. Las columnas 1-6 son

para los números de línea, y la 7 para el carácter indicador).

SUP Suppress SCH tabla dato Search (not COBOL search). (Búsqueda secuencial utilizando índices IddddR/IddddL) SCB tabla dato Search (on sorted table) ADT {dest} Call system date (6 characters). (Por defecto en DATOR en formato AAMMDD, o bien en la

variable X(6) que se indique. En Batch se traduce en ACCEPT DATOR FROM DATE, y si se

indica una variable, sigue un MOVE DATOR TO var). ADC {dest} System date with century (8 characters). (Análoga a ADT, pero por defecto en DATCE en

formato CCAAMMDD) AD fmt ori des Date format: Century positioned from CENTUR field. (Ej.: AD DC W-FECHA6 W-FECHA8,

copia W-FECHA6 en formato D en W-FECHA8 en formato C).

AD0 Date format: Century positioned from DAT-CTY AD1 Date format: Century set to "19" if year value in DAT-CTYT field. AD2 Date format: Century set to "20" if year value in DAT-CTYT field. ADI {orig dest} Date inversion (6 characters). (En la misma variable que se indique, o bien se puede indicar

origen y destino). ADE {dest} Date with slash (8 characters). (Por defecto guarda DD/MM/AA en DAT8, pero se puede

indicar una variable X(8) como destino. También alimenta DATCE en formato CCAAMMDD y

DAT6 en formato AAMMDD. Si se desea cambiar el separador de fecha, hay que darle un valor al

principio del programa, por ejemplo en F01: M „-‟ DATSEP DATSET).

- 20 -

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).

6.1.1. Date Formats

D Display MMDDYY or DDMMYY E Extended MM/DD/YY or DD/MM/YY I Internal YYMMDD C Display with centur MMDDCCYY or DDMMCCYY M Extended with centur MM/DD/CCYY or DD/MM/CCYY S Internal with centur CCYYMMDD

6.1.2. Los Comentarios en Pacbase

Un comentario en Pacbase elimina el punto final del párrafo anterior. Por ejemplo: M 1 A 99IT condición

M 2 B

* Comentario

M 3 C 99BL

Se convierte en:

IF condición

MOVE 1 TO A

MOVE 2 TO B

MOVE 3 TO C

Es decir, el 99BL añade un punto al final del párrafo anterior, pero el comentario se lo quita, con lo que el tercer

“move” queda dentro del “if”. Lo correcto sería: M 1 A 99IT condición

M 2 B

* Comentario 99BL

M 3 C

Se convierte en:

IF condición

MOVE 1 TO A

MOVE 2 TO B.

MOVE 3 TO C

Recuerdo que en el caso de CajaMadrid (Las Rozas – Madrid) el propio traductor de Pacbase/Cobol se encargaba de

eliminar todos los comentarios del código de Pacbase antes de convertirlo a Cobol, con lo que no se producía este

problema.

6.2. COBOL II Operators

CON Continue (no operand) EVA Evaluate EVT Evaluate True EVF Evaluate False EEV END-Evaluate (no operand) EIF END-IF (no operand) EPE END-PERFORM (no operand) ESE END-SEARCH (no operand) INI INITIALIZE SEA SEARCH GOB GO BACK

6.3. SQL Operators

EXQ EXEC SQL... END-EXEC SCC CONNECT order (or its like) SDC DISCONNECT order (or its like) SCO COMMIT order. SRO ROLLBACK order. SWH WHENEVER order.

6.4. Operators for Batch Only

Nota: Hay que tener en cuenta que en un programa P-OnLine (es decir, una entidad P compilada como rutina On-

Line) los operadores generan exactamente las mismas instrucciones Cobol que si fueran realmente Batch.

OPE dd Open (genera OPEN INPUT dd-FILE) CLO dd Close R ddss File read W ddss File write

- 21 -

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)

6.4.1. Browse de un Fichero VSAM

Para recorrer un fichero VSAM en Batch se utilizan los operadores STA (Start) y RN (ReadNext). El primero

posiciona el puntero de lectura en el primer registro que se desea leer, y el segundo lee dicho fichero. A diferencia

de On-Line, el Start no realiza a la vez la lectura del primer registro.

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.

6.5. Operators for On-Line Only

AD6 ADT and ADI (on-line). Nota: En On-Line los operadores de fecha y hora se traducen en llamada CICS a ASKTIME y

FORMATTIME. Otra posibilidad para obtener o realizar operaciones con fechas/horas en programas con

DB2 es utilizar la instrucción EXQ SET var = CURRENT TIME, CURRENT TIME, CURRENT

TIMESTAMP, :W-FECHA1 - :W-FECHA2, etc.

AD8 ADE (on-line) GF Go to end of automatic sub-function. (Por ejemplo, dentro de una F2510*A para saltarse un acceso

bajo ciertas condiciones).

GFR Go to end-of-reception GFA Go to end-of-display GDB Branch to start of current loop OTP Immediate transfer to screen of external name OSC Screen transfer OSD Deterred screen transfer XR Read segment (Perform of paragraph F80-ddss-R) XP Read first occurrence of segment XRN Read next occurrence of segment XRU Read for update of segment XW Write segment XRW Rewrite segment XD Delete segment XUN Unlock segment (VSAM) Yaa Create paragraph labels (F80-ddss-aa) Xaa With Yaa, Perform of paragraph F80-ddss-aa ERU User error (specified at dialogue level). (en la –G del diálogo) ERR User field error. (en la –G de la pantalla)

EXC EXEC CICS

- 22 -

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.

6.5.2. Bifurcación Inmediata y Diferida

Normalmente se utiliza el operador OSC para realizar una bifurcación inmediata en un programa. El código en

Cobol que se obtiene es el mismo que se genera en automático al definir en la –CE la bifurcación en automático

sobre el operador de función (por ejemplo la variable CFUNP en Arcelor). Suponiendo un programa que vuelve a la

pantalla LMRCPI0 con operador CFUNP=‟F‟, en F0520 se genera la siguiente validación del OPER: IF I-daoo-CFUNP = ‘F’

MOVE ‘LMRCPI0’ TO 5-daoo-PROGE

MOVE ‘O’ TO OPER (o bien „E‟ de End si se sale del programa)

GO TO F40-A.

Es decir, salta a F40 (ya que F40-A está al principio de F40) y termina el programa saltando a otra 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.

6.6. Operators for Business Component Only

GFA End of selection processing (Branch to the Fvunn-SELC-FN label). GFR End of validation/update processing (Branch to the Fvunn-CHUP-FN label). GDB Return to the beginning of current iteration (Branch to the Fvunn-CHUP-CATR-SVRx-CHCK

label or Fvunn-SELC-CATR-SVRx-SELC label). GDI Go to the beginning of next iteration (Branch to the Fvunn-CHUP-CATR-SVRx-DONE label

or Fvunn-SELC-CATR-SVRx-DONE label). GFT Go to the end of iteration (Branch to the Fvunn-CHUP-CATR-FN label or Fvunn-SELC-

CATR-FN label). GF ENDV Go to end of logical view processing (Branch to the Fvunn-ENDV label). XT Allows you to call an elementary processing (transfers, processing on Segment, ...). ERL Logical error indicator on control/update access Error on Lock or Unlock query ordered by a

graphical client (MOVE "L" TO TECH-IERRU) NB: For a detailed description of Structures Types, Operator and of Specific operators lists (On-line monitors or Database), see the Structured Code Reference Manual.

6.7. Structured code condition types

BL Block

IT If then

EL Else (only after an IT)

CO Case of (followed by IT's)

- 23 -

DW Do while

DU Do until

DO Do (Generates Subscript: JffssR) (Ej.: F61BB 20DO NTOTAL 0 -1, equivale a un bucle “for”, por defecto el incremento es 1, y genera el

índice J61BBR para recorrer por ejemplo una tabla y acceder a sus elementos)

OR Or AN And

6.7.1. Condiciones con “If”, “Case of” y “Evaluate”

Si se necesita distinguir entre varias condiciones, se pueden utilizar varios “If” al mismo nivel, por ejemplo: BB ... 99IT condición1

BB ...

BB ... 99IT condición2

BB ...

BB ... 99IT condición3

BB ...

O bien en varias subfunciones si el código de cada

condición lo requiere o se gana en claridad: BB N ... 10IT condición1

BB ...

BE N ... 10IT condición2

BE ...

BG N ... 10IT condición3

BG ...

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.

La última alternativa es la instrucción “Evaluate” de Cobol, que tendría la siguiente forma: BB EVA var

BB ... 99WH valor1 (cláusula WHEN; admite rangos del tipo valor1 THRU valor2) BB ...

- 24 -

BB ... 99WH valor2

BB ...

BB ... 99WH valor3

BB ...

BB ... 99WH OTHER (cláusula WHEN OTHER) BB ...

BB EEV (cláusula END-EVALUATE)

Además también admite una forma EVALUATE TRUE para condiciones: BB EVT (equivale a EVA TRUE, es decir, EVALUATE TRUE en Cobol; también existe EVF o EVA FALSE) BB ... 99WH condición1

BB ...

BB ... 99WH condición2

BB ...

BB ... 99WH condición3

BB ...

BB ... 99WH OTHER

BB ...

BB EEV

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”.

6.8. Table Indexes

IddssM Maximum number of table entries, specified by the user, for a table defined by Data Structure dd, segment ss.

IddssL Number of entries actually loaded from segment ss in data structure dd. This number cannot exceed the maximum specified above.

IddssR Varying from 1 to IddssL, used for all look-ups on the table loaded from data structure dd, segment ss. Once the table is loaded, this index is initialized to zero if there is no overflow, or to the number of records read if an overflow has occurred.

6.8.1. Definición y Utilización de Tablas de Búsqueda

Para que las variables de índice de las tablas se generen correctamente, es imprescindible definir las tablas

correctamente en la correspondiente columna de Working. Por ejemplo: A LIN T LEVEL OR SECTION WORK AREA DESCRIPTION OCCURS

110 01 WWBB-TABLADNIS.

120 05 W-TDNI OCCURS 50. 50

130 10 TDNI-DNI PIC X(9).

130 10 TDNI-NOMBRE PIC X(30).

Es necesario tener en cuenta varias cosas:

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.

- 25 -

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.

La instrucción SCH se utiliza de la siguiente forma: SCH TDNI-DNI ‘10840721J’

* Si no encontrado 99IT ITDNIR > ITDNIL

...

Es decir, SCH realiza una búsqueda secuencial en la tabla, de forma que I…R apuntará a la posición de la tabla

donde se encontró el elemento buscado, y será mayor que I…L (en concreto valdrá I…L+1) si no encontró dicho

elemento en la tabla.

6.9. Relative positioning (On-line only)

(Se indica en el campo LVTY de la –P, detrás del número de nivel sin separación. Según cada caso, en el campo

CONDITION se suele indicar un campo de pantalla, un segmento, un segmento seguido de una operación, o bien

una categoría)

*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) Indicate the following in the CONDITION field, left justified:

For F20, the data element code; *A, *P, *R allowed.

For F25, F35 and F60, the segment code; *A, *P, *R allowed.

For F30 or F65, the screen category code (no quotes), top=A, repetitive=R, bottom=Z; only *P allowed.

For F80, the segment code to replace all of the generated physical accesses or segment code and access type to replace only the specified generated physical access; only *R allowed.

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.

6.10. Specific Business Component

*C Insert or replace code in the server or for a logical view. It must be defined on a level 05 *B To insert in the elementary processing called by PERFORM.

- 26 -

7. ON-LINE GENERATION

7.1. Screen and Segment I/O Areas

7.1.1. Screen

Names: I-daoo-eeeeee Input Field (en recepción para cada campo tecleable y aquellos de tipo F en la -CE)

Nota: en los campos numéricos se generan en Working en la forma: 05 E-daoo-eeeeee. (valor de pantalla)

10 I-daoo-eeeeee PIC 9(...). (valor numérico)

9-daoo-eeeeee PIC X(5), se utiliza en recepción para realizar las validaciones de campos numéricos.

O-daoo-eeeeee Output Field (en visualización para cada campo de pantalla). Nota: en los campos numéricos se generan en Working en la forma: 05 F-daoo-eeeeee. (valor de pantalla)

10 O-daoo-eeeeee PIC 9(...). (valor numérico)

X-daoo-eeeeee Atributos de posicionamiento del cursor en un campo en visualización.

Y-daoo-eeeeee Atributos de protección y visibilidad de cada campo en recepción/visualización.

Z-daoo-eeeeee Atributos de presentación (brillo, intensidad, etc.) en recepción/visualización.

A-daoo-eeeeee PIC X, tabla de atributos de campos en visualización.

I-PFKEY Number of PFKey Pressed; or EN (Enter) or 00 (clear) or A1 (PA1) or A2 (PA2) Format: Variable Internal Format (Extended) or Conversational Protected Output Format or Conversational

7.1.2. Segment

Names: ddss-eeeeee Segment Field Format: All Data Elements Internal Format

7.2. Variables and Constants

CURPOS Cursor position on the screen in ‗Reception‘, where CPOSL is the line number and CPOSC the column number.

CPOSN ‗Absolute‘ cursor position on the screen (the ―0‖ position corresponds to CPOSL=1 and CPOSC=1).

Nota: Ambas se alimentan automáticamente en F0510.

INA Number of Data Elements in the screen-top category INR INA + Number of Data Elements in the repetitive category INZ INR + Number of Data Elements in the screen-bottom category IRR Number of repetitions in the repetitive category INT Number of input fields in the Screen IER Number of error messages on the Screen SESSI Session number of the generated program LIBRA Code of the VisualAge Pacbase library DATGN Date of program generation DATGNC Program generation date with century TIMGN Time of program generation PROGR VisualAge Pacbase Program code (6 char) PROGE External name of the program (7 char) USERCO User code COBASE Database code PRDOC External name of the "Help screen" program DATCE Field in which the date of processing in century-year-month-day format can be stored.

It is composed of CENTUR and DATOR. (formato PIC X(8) CCYYMMDD) CENTUR Field in DATCE containing the current century which is placed in this field at program

generation. (formato PIC XX) DATOR Field in DATCE in which the date of processing under a year-month-day format can be

stored. (formato PIC X(6), a su vez se divide en DATOA, DATOM, DATOJ PIC XX)

- 27 -

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.

7.3. Variables de Fecha y Hora

7.3.1. Variables Principales

01 DATCE.

05 CENTUR PIC XX VALUE ‘19’. (Se actualiza en F01 en on-line o en batch con ADT) 05 DATOR.

10 DATOA PIC XX.

10 DATOM PIC XX.

10 DATOJ PIC XX.

La variable DATCE se alimenta con la instrucción ADT. En online se hace automáticamente un ADT en F0110 que

rellena el valor de DATCE con el formato CCAAMMDD. En batch es necesario incluir la instrucción ADT.

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.

7.3.2. Variables Secundarias

05 DAT-CTYD PIC XX VALUE ‘61’. (“ventana” que se utiliza para calcular la centuria) 01 DAT6.

10 DAT61 PIC XX.

10 DAT62 PIC XX.

10 DAT63 PIC XX.

01 DAT8.

10 DAT81 PIC XX.

10 DAT8S1 PIC X. (el separador se define en la variable DATSEP) 10 DAT82 PIC XX.

10 DAT8S2 PIC X.

10 DAT83 PIC XX.

Las variables DAT6 y DAT8 se alimentan con la instrucción ADE en formatos DDMMAA y DD/MM/AA

respectivamente. La instrucción AD8 realiza un ADT (alimenta DATCE) junto con un ADE (alimenta DAT6 y

DAT8). Si se desea cambiar el separador de fecha, hay que darle un valor al principio del programa, por ejemplo en

F01: M „-‟ DATSEP DATSET

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.

01 TIMCIC PIC 9(7). (hora en formato numérico) 01 TIMCI1 REDEFINES TIMCIC.

05 FILLER PIC X.

05 TIMCIG.

10 TIMCIH PIC XX.

10 TIMCIM PIC XX.

10 TIMCIS PIC XX.

- 28 -

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)

7.5. Error variables

IK Error indicator for Segment access (physical file access) or server call. (se actualiza tras

cada acceso de E/S)

'0' No error '1' Error (registro no encontrado)

FT End of repetitive category indicator '0' Lines to display '1' No more lines to display

CAT-ER Ongoing error indicator for current category. (CATG en francés. Sólo tiene sentido preguntar

por ella en recepción). Has an error been detected while processing the current category? SET: F15, F20, F25, F5510, F81UT; USED: F1010, F25, F30, F35.

' ' No error (no hay error en ningún campo de pantalla) 'E' Error (error en al menos un campo de pantalla)

SCR-ER Screen error indicator. (GR-EG en francés). Has an error been detected while processing

this screen? SET: F0110, F0520, F1010; USED: F40, F5010, F8Z10. '1' No error '4' Error (indica que al menos hay un error en la pantalla)

- 29 -

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.

7.6. Physical Access to Segments

The ‗Physical Access to segments‘ (F80) function is generated when there is at least one segment defined for the screen. These procedures depend on the access method to the segments in use. The coding for these access sub-functions is illustrated with the following sample segment code CD20:

F80-CD20-R Direct read (con XR CD20 se genera un Perform a dicha etiqueta) NOTA: se pueden generar etiquetas COBOL con la instrucción Y{ac}, siendo „ac‟ el tipo de acceso. Por

ejemplo, YR MA00 genera una etiqueta COBOL F80-MA00-R. En realidad se puede utilizar cualquier

identificador no estándar. Por ejemplo, YLL MA00 generaría la etiqueta F80-MA00-LL, o incluso YLL

LEERMA generaría F80-LEERMA-LL (y luego se llamaría con XLL LEERMA). Pero esto ya es salirse de

la nomenclatura estándar.

F80-CD20-RU Direct read with update (se llama con XRU CD20) F80-CD20-P Positioning on and retrieval of first record of a sequential read (DL/1 operator: ‗>=‘) (es

decir, StartBr+ReadNext; se llama con XP CD20. Variable Pacbase 5-nombreexterno que vale

„0‟ si todavía no se hizo StartBr, y „0‟ en caso contrario)

NOTA: el StartBrowse que se genera incluye un GTEQ. Por tanto el IK sólo valdrá „0‟ si se alcanzó fin de

fichero, o lo que es lo mismo, además de comprobar si IK = „1‟ se debe comprobar que por ejemplo se leyó

la clave que se buscaba.

F80-CD20-RN Sequential read (se llama con XRN CD20)

F80-CD20-W Write (se llama con XW CD20) F80-CD20-RW Rewrite (se llama con XRW CD20) F80-CD20-D Deletion (se llama con XD CD20) F80-CD20-UN Unlocking of record, depends on environment (se llama con XUN CD20)

7.6.1. Reemplazar los Accesos Estándar

Los accesos físicos de la función F80 se pueden reemplazar mediante el operador de nivel „*R‟. Suponiendo un

segmento llamado FA00, podemos sustituir por ejemplo los accesos estándar StartBr y ReadNext de la siguiente

forma: F80BB N Start Browse manual 10*R FA00 P

F80BB 100 YP FA00

F80BB 110 ... (instrucciones de usuario para realizar la operación)

F80BC N Read Next manual 15*R FA00 RN

F80BC 100 YRN FA00

F80BC 110 ... (instrucciones de usuario para realizar la operación)

7.7. Claves de Acceso (K-)

Pacbase memoriza cada una de las claves de acceso a los segmentos en visualización en las variables K-cddss-

campo, donde:

c Categoría en la que se realiza el acceso („A‟=cabecera, „R‟=repetitiva, „Z‟=pie).

ddss Segmento al que se accede.

campo Campo clave de acceso.

7.7.1. Claves de Acceso en Repetitiva

Supongamos un segmento ZW15 con clave KTEM15 y acceso en repetitiva. Las variables que se generan son:

K-RZW15-KTEM15(1) Clave del primer registro a visualizar en repetitiva.

K-RZW15-KTEM15(2) Clave del primer registro a visualizar en la siguiente repetitiva (es decir, al pulsar Intro

en la repetitiva actual).

- 30 -

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).

Estructura COBOL generada en estándar:

*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)

*SEGMENT ACCESS FOR DISPLAY

F60nn. (nn=01 para primer segmento de la –CS, 02 para el 2º, 03 para el 3º, etc.)

(código Pacbase generado con 10*A ZW15 R) M ‘0’ TO ZW15-CF.

IF ZW15-FST = ‘1’ (es decir, si es el 1er acceso) M K-RZW15-KTEM15(1) TO ZW15-KTEM15

P F80-ZW15-P THRU F80-FN (StartBr y primera lectura) M ZERO TO ZW15-FST

ELSE

P F80-ZW15-RN THRU F80-FN. (ReadNext) IF IK = ‘1’

M ‘Gnn9’ TO XERCD (Error automático de Fin de Lista, se puede modificar en la -G) M ‘1’ TO FT

P F81UT THRU F81UT-FN (Memorización de errores de usuario) GO TO F60nn-FN.

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)

- 31 -

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:

F60 BB N ... 10*P ZW15

F60 BB 100 M 0 K50L 99IT FT = ‘0’ OR CATX NOT= ‘R’

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).

7.9. On-Line C/S Screen Program Standard Structure

(This structure will vary, depending on the environment) INITIALIZATION ROUTINE 03BL F01. INITIALIZATION 05BL F0110. Initialize Variables (fecha, hora, ICF, etc.) 10BL RECEPTION ROUTINE 03IT ICF = '1' (entrar en recepción) RECEPTION PREPARATION 04BL F05. BEGIN RECEPTION 05BL F0510. Receive Message (Reception of the Screen) 10BL F0512. Set Up HELP Doc (O) (Documentation call processing) 10BL F0520. Set and Test OPER (-CE) (Validation of the oper code) 10BL RECEPTION PROCESSING LOOP BY CATEGORY 04DW CATX NOT= 'Z' F10. TOP OF RECEPTION LOOP 05BL F1010. Test and Set CATX (Category positioning) 10BL F15. CATM PROCESSING (-CE) (Validation of the trans. code) 05BL F20. DATA ELEMENT VALIDATION (-CE) 05BL

(Operadores *A, *P, *R para incluir código en los lugares adecuados)

F20A. Screen-top Category 07IT CATX = ' ' F20nn. Edit Element nn… 10BL F20R. Repetitive Category 07IT CATX = ‗R‘ F20nn. Edit Element nn… 10BL F20Z. Screen-bottom Category 07IT CATX = ‗Z‘ F20nn. Edit Element nn… 10BL F25. SEGMENT ACCESS FOR VALIDATION (-CS) 05IT CAT-ER = ' ' (si no error)

(Alimentar claves y leer ficheros con Read o Read+Update, realizar validaciones. Tanto en F25 como F30,

F35, F60 y F65 se utilizan los operadores *A, *P, *R para incluir código en los lugares adecuados)

F25A. Screen-top Category 07IT CATX = ' ' F25nn. Access Segment nn… 10BL F25R. Repetitive Category 07IT CATX = ‗R‘ F25nn. Access Segment nn… 10BL F25Z. Screen-bottom Category 07IT CATX = ‗Z‘ F25nn. Access Segment nn… 10BL

- 32 -

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.) DISPLAY PREPARATION ROUTINE 03IT OCF = '1' (entrar en display)

DISPLAY PREPARATION 04BL F50. BEGIN DISPLAY PREPARATION 05BL F5010. Initialize Display Variables 10BL DISPLAY PROCESSING LOOP BY CATEGORY 04DW CATX NOT= 'Z' F55. TOP OF DISPLAY PROCESSING LOOP 05BL F5510. Test and Set CATX (Category positioning) 10BL F60. SEGMENT ACCESS FOR DISPLAY (-CS) 05BL

(alimentar claves y leer ficheros)

F60A. Screen-top Category 07IT CATX = ' ' F60nn. Read Segment nn… 10BL F60R. Repetitive Category 07IT CATX = ‗R‘ F60nn. Read Segment nn… 10BL F60Z. Screen-bottom Category 07IT CATX = ‗Z‘ F60nn. Read Segment nn… 10BL F65. ELEMENT TRANSFER TO DISPLAY (-CE) 05BL

(alimentar las „O-‟ con los datos de la columna SOURCE de la –CE)

F65A. Screen-top Category 07IT CATX = ' ' F65R. Repetitive Category 07IT CATX = ‗R‘ F65Z. Screen-bottom Category 07IT CATX = ‗Z‘ BOTTOM OF DISPLAY PROCESSING LOOP 04BL F6999-ITER-FI. GO TO F55. (fin del bucle do-while) F6999-ITER-FT. EXIT. END OF DISPLAY PROCESSING 04BL F70. ERROR PROCESSING (Error management) 05BL F7010. Error messages processing 10BL F7015. Logical View error processing 10BL F7020. Positioning of attributes 10BL END-OF-DISPLAY. (F78-FN.)

- 33 -

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 PERFORMED (CALLED) FUNCTIONS 03BL F80. PHYSICAL ACCESS TO SEGMENTS (-CS) 05BL F80nn. Physical Access to Segment nn (see below) 10BL F8095. Write for Help Function 10BL F8098. Error Message File Access 10BL F81. CALLED PERFORMED VALIDATION FUNCTIONS 05BL

(Actual list varies by environment and dialogue options –see specific on-line environment reference manual for a complete list)

F81CS. Server call 10BL F81CV. Recovery of Client/Server communication area 10BL F81ER. Abnormal End Procedure 10BL F81TA. Client context save 10BL F81TR. Client context retrieval 10BL F81UT. Memorization of User's Errors 10BL F81UV. Database access error 10BL F8110. Numeric Validation 10BL F8115. Initialization of the Variable Fields 10BL F8120. Date Validation and Setting of Date 10BL F8130. Help Sub-Function 10BL

F8140. Posicionamiento cursor 10BL

F8155. Transformación fecha CICS 10BL

F8150. Documentation Help 10BL F8160. Help function return processing 10BL NB: For a detailed description of Generated On-Line Program, see the OLSD Reference Manual for the concerned On-line monitor.

7.10. Business Component Structure

05 FSERVER. Beginning of server processing 10 FSERVER-STRVIEW. Structure validation and length of the communication area buffers 05 FSQL. SQL declaration 10 FSQL-WHENEVER. Clause Whenever 10 FSQL-CURSR-SEET. Declare Cursor 05 FDDSS. Processing of the DDSS logical view 10 FDDSS-BEGV. Initialization of the logical view processing 10 FDDSS-CHUP. Check/update processing 15 FDDSS-CHUP-CATX. X Category processing (X = 'A': before repetitive, 'R': repetitive, 'Z': after

repetitive) 20 FDDSS-CHUP-CATX-SRVO. O Service processing (O = 'E', 'L', 'M', 'T' or 'X') 25 FDDSS-CHUP-CATX-SRVO-INIT. Initialization 25 FDDSS-CHUP-CATX-SRVO-CHCK. Logical check processing 25 FDDSS-CHUP-CATX-SRVO-TRAN. Loading before update 25 FDDSS-CHUP-CATX-SRVO-UPDT. Logical update processing 25 FDDSS-CHUP-CATX-SRVO-DONE. End of service processing 10 FDDSS-LOCK. Lock 10 FDDSS-UNLK. Unlock 10 FDDSS-SELC. Selection processing 15 FDDSS-SELC-CATX. X Category processing (X = 'A': before repetitive, 'R': repetitive, 'Z': after

repetitive) 20 FDDSS-SELC-CATX-SRVA. Selection service processing 25 FDDSS-SELC-CATX-SRVA-INIT. Initialization 25 FDDSS-SELC-CATX-SRVA-SELC. Logical selection processing 25 FDDSS-SELC-CATX-SRVA-TRAN. Loading after selection 25 FDDSS-SELC-CATX-SRVA-DONE. End of service processing 10 FDDSS-USER. User processing 10 FDDSS-ERRV. DDSS logical view error processing

- 34 -

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...)

- 35 -

8. BATCH PROGRAM GENERATION

8.1. Conditional Variables

FTBn Final total control break at level n. (RTDn en francés). Processing is ending on all data structures synchronized on input for all records having the same key at level n.

'1'- YES '0'- NO ITBn Initial total control break at level n. (RTPn en francés). Processing is starting on all data structures

synchronized on input for all records having the same key at level n. '1'- YES '0'- NO

dd-FBn Final control break on data structure dd at level n. (dd-DEn en francés). The last record, at level n, on data structure dd, is ready for processing. (se agrupan en la variable dd-FB)

'1'- YES '0'- NO dd-IBn Initial control break on data structure dd, level n. (dd-PEn en francés). The first record, at level n,

on data structure dd, is ready for processing. (se agrupan en la variable dd-IB) '1'- YES '0'- NO

dd-CFn File configuration at level n. (la variable dd-CF agrupa a todas las dd-CFn) '1' - File match: process in this iteration '0' - Bypass file in this iteration

dd-OCn Occurrence on Data Structure dd at level n. A record on Data Structure dd with usage "P" is being processed in this program cycle.

'1'- YES '0'- NO dd-FT Input data structure dd has detected end-of- file.

'1'- YES '0'- NO FT Group item containing all dd-FT‘s. End of program when all ‗1‘s. All data structures are at end-

of-file and the program should stop at F20. dd-FI Control break processing only.

'1' - File I/O area contains last record of file '0' - File I/O area does not contain last record of file

CATX The report category (if a report is to be printed) which is currently being processed.

8.2. Validation Processing (Work areas and variables)

DE-ERR Stores the presence status of each data element of the transaction being processed. Each elementary data element (eeeeee), other than FILLER, ENPR, GRPR, ERUT and their sub-elements, is provided with a status field within the table. This field is named ER-ss-eeeeee (ss = SEGMENT CODE). The values vary at different points in the processing cycle:

‗0‘ data element absent ‗1‘ data element present ‗2‘ invalid absence of data element ‗3‘ invalid presence of data element ‗4‘ erroneous class ‗5‘ invalid content

ID-ER The last field in the table DE-ERR is ID-ER and is used for storing the record identification status:

‗0‘ record type and action code are valid values (no error) ‗5‘ error detected on record type (record type error) ‗6‘ error detected on action code (transaction type error)

DEL-ER Stores the presence status of the data element being processed. Generated if the program contains a transaction file (to be validated or not).

ER-PRR Used only to carry out transfers between DE- ERR and a data structure (USAGE OF D.S. = M, N or E) with a reduced error array.

SE-ERR Stores the presence status of each transaction file record type. Generated if the program contains a transaction file (to be validated or not). Each record type is provided with a status field within this table. This field is named SE-ER(I01). The values vary at different points in the processing cycle:

‗0‘ record absent (valid record absence) ‗1‘ record present (valid record presence) ‗2‘ invalid absence of record (required record missing) ‗3‘ invalid presence of record (invalid record presence)

- 36 -

‗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

8.3. Record Counters

5-dd00-RECCNT Record counter for file dd. It is incremented after each read or write. (5-dd00-

CPTENR en francés. Tiene formato PIC S9(9) COMP-3 y sale bien en los displays)

8.4. Tables used for Reports

CAT-TAB Category table: stores all categories to be printed in this iteration. ST-TA Table storing the structure number, constant part number, and page/line skip for the

category to be printed. r-LAB Table containing constants for report r.

8.5. Print variables and Counters

ST-SLS Stores the structure number, constant part number, skip to be executed before writing a line and char. set. option (special printer).

CATX Stores the category of report being printed. 5-dd00-rPC Page counter for report r in data structure dd initially set to zero. (5-dd00-rCP en francés).

Automatically handled by VisualAge Pacbase. 5-dd00-rLC Line Counter. (5-dd00-rCL en francés). Initially set equal to the maximum number of lines

for report r to allow for a new heading situation. Automatically handled by VisualAge Pacbase.

5-dd00-rLCM Maximum number of lines per page for report r. (5-dd00-rCLM en francés).

5-dd00-rLC1 Line counter for Report r from Data Structure dd, incremented at each output line and indicating the line number of the last written line. (5-dd00-rCL1 en francés).

5-dd00-rTP Start of Page indicator for Report r from Data Structure dd. 5-dd00-rRC Counter for number of lines written for the report r. Incremented after writing. 5-cc-NL Nº de líneas de cabecera, detalle o pie, siendo „cc‟ la categoría de cabecera, detalle o pie.

8.6. Automated Totaling Fields

(based on control breaks and requested totaling) 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.

8.7. Printing Index

Jddrcc Index associated with repetitive category cc for Report r on Data Structure dd. Contains, at structure load time, the rank of the category cc being printed.

8.8. Validation Index

I01 Index that contains the rank of the record type being processed.

- 37 -

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'

- 38 -

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.

8.9.1. Forma de la Función F22

La función F22 que calcula las rupturas de control de los ficheros tiene la siguiente estructura:

F22. CALCULATE FILE CONTROL BREAKS 05BL

Mover ‘0’ a las rupturas finales dd-FBn

Si dd-FI = ‘1’ entonces

Mover 1 a FBL

GO TO YY

FinSi

Si campo1 <> 1-campo1 entonces

Mover 1 a FBL

GO TO YY-1

FinSi

Si campo2 <> 1-campo2 entonces

Mover 2 a FBL

GO TO YY-2

FinSi

...

...

...

YY.

YY-1.

Mover ‘1’ a dd-FB1 (obsérvese que si pasa por aquí también lo hace por los siguientes “moves”) YY-2.

Mover ‘1’ a dd-FB2

...

...

...

- 39 -

9. VISUALAGE PACBASE ENVIRONMENT

9.1. General Choices

Menus Management of user's parameters HP Production Environment Interface HE Back to general Menu H

SignOff FT

9.2. Function Keys

Number Significance

PF4 Help for the screen PF5 Back to general menu PF6 SignOff PF7 Implicit action code ignored PF8 Help for the element PF10 Entity called by cursor positioning PF12 Conversation exit

9.3. Management of User's Parameters

List of control cards LCPC.. List of user codes LCPU........ List of methods LCPM.. VisualAge Pacbase programs identification PD Optional control cards updating (U) PC.... Text types updating (U) PT. Standard error messages updating (U) PE. Update of user parameters (U) PU........ Access keys updating (U) PK Update of special characters PW. Update of method choices (U) PM..... VisualAge Pacbase associated DSMS database (U) PB....

9.4. Production Environment Interface

Generation environment (U) EE..... (library, env. entity type) Default environments (U) ED........ (session and library) Entities generated (U) EG............. (library, env. type, type and entity code) Production sessions (U) ES.... Entities in production/session LSEP........... (session, library, env. type, type and entity code) 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.