Top Banner
CA-GENER/OL Basics CA-GENER/OL Basics CA-Gener/OL: Way to Go
59
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Gener-ol

CA-GENER/OL BasicsCA-GENER/OL Basics

CA-Gener/OL: Way to Go

Page 2: Gener-ol

Why GENER/OLWhy GENER/OL

► CA Gener/OL is a powerful and flexible 4-GL development tool for CICS CA Gener/OL is a powerful and flexible 4-GL development tool for CICS that helps decrease the growing application backlog by simplifying a that helps decrease the growing application backlog by simplifying a number of labour-intensive tasks and facilitating quick response times. number of labour-intensive tasks and facilitating quick response times.

► CA Gener/OL addresses the challenge to flexibly create and update CA Gener/OL addresses the challenge to flexibly create and update online reports without complex programming languages.online reports without complex programming languages.

► It offers interactive screen development, incremental compilation builds It offers interactive screen development, incremental compilation builds and access to a number of database management systems.and access to a number of database management systems.

► CA Gener/OL supports z/OS and z/VSE CA Gener/OL supports z/OS and z/VSE

Page 3: Gener-ol

Table Of Content1. Library Structures

2. Basics Commands

3. Programming Concept

4. Reserved Words

5. Debugging Facility

Page 4: Gener-ol

Library Structure

MOTOR HOUSE

SGTLIB1

SGTLIB2Dev Region

SGTLIB8 SGTLIB9Intermediate

REPRO

SGTLIB2 SGTLIB1

Production

Page 5: Gener-ol

Library Structure

Page 6: Gener-ol

Library Structure

Page 7: Gener-ol

Library Structure

Page 8: Gener-ol

LOCATION OF SYSTEMS, GENER/OL OWNERS & PROGRAMSLOCATION OF SYSTEMS, GENER/OL OWNERS & PROGRAMS

SYSTEM GENER/OL REGION PROGRAM SYSTEM

OWNER SGTLIB NAMES

ACCOUNTS ACCOUNTACCOUNTS ACCOUNT 2 2 ATA AU ATA AU A A

ASL ADASL AD

CHASINGCHASING HOUSE HOUSE 2 2 HQ HU HQ HU H H

MOTORMOTOR 1 1 MQ CS MQ CS M M

MOTOR MOTORMOTOR MOTOR 1 1 MQ MU MQ MU M M

TELESALESTELESALES

MOTOR CLAIMS MOTORMOTOR CLAIMS MOTOR 1 1 KC KU MSL KC KU MSL K K

KR KG MCA RCKR KG MCA RC

Page 9: Gener-ol

Basic Commands & Conventions

Command lineCommand line► COPY COPY ► MOVE MOVE ► RENAME RENAME ► DELETEDELETE

Line CommandsLine Commands► A -> automatic editing Related to mapsA -> automatic editing Related to maps► B -> BrowseB -> Browse► C -> Copy C -> Copy ► D -> DeleteD -> Delete► E -> edit E -> edit ► G -> GO ( This for debugging the member)G -> GO ( This for debugging the member) M ->MoveM ->Move N -> RenameN -> Rename► O -> Map modelling O -> Map modelling ► P -> print P -> print ► R -> Run R -> Run ► Z -> ClearZ -> Clear

Page 10: Gener-ol

Programming Concept

► FILE FILE

► RecordsRecords

► Working StorageWorking Storage

► MAPSMAPS

Page 11: Gener-ol

FILE

► File Definition Process makes CA-Gener/OL aware of File Definition Process makes CA-Gener/OL aware of the FCT entries that CICS uses to access and process the FCT entries that CICS uses to access and process files. This step establish a link between CA-Gener/OL files. This step establish a link between CA-Gener/OL and CICS.and CICS.

► Matches CICS FCT entriesMatches CICS FCT entries

► Done by the System AdministratorDone by the System Administrator

Page 12: Gener-ol

FILE

Naming convention:Naming convention:Maximum 8 character filename in the format:- Maximum 8 character filename in the format:- XAAAAAAAXAAAAAAA X- Major system X- Major system & AAAAAAA = a unique filename& AAAAAAA = a unique filename

e.g. MCLIENT

Page 13: Gener-ol

FILE

Page 14: Gener-ol

FILE

Page 15: Gener-ol

FILE

Page 16: Gener-ol

Records

Naming convention:Naming convention:XARECN – MQREC1 or XAARECN – VCBREC1XARECN – MQREC1 or XAARECN – VCBREC1M-Motor, Q-QuotesM-Motor, Q-QuotesX- Major system, A or AA-minor system, X- Major system, A or AA-minor system, RECN- Record layout noRECN- Record layout no

Page 17: Gener-ol

Records

Page 18: Gener-ol

Records

Page 19: Gener-ol

Records

Record – Record – Displays the member name assigned to the Displays the member name assigned to the record layoutrecord layoutPrefix – Prefix – Displays 2 char code placed before each field Displays 2 char code placed before each field name. Format is alpha/alphanumeric. RW is the reserved name. Format is alpha/alphanumeric. RW is the reserved word.word.

Residency-Residency- Y or N ?? Y or N ??TSQ are automatically written for Resident areas and TSQ are automatically written for Resident areas and when the control comes back from the operator the when the control comes back from the operator the resident w/s will be restored from TSQs while the non resident w/s will be restored from TSQs while the non

res w/s data will be lostres w/s data will be lost..

Page 20: Gener-ol

Records

Name- Specifies the field nameName- Specifies the field nameStarts- Specifies the Start positionStarts- Specifies the Start positionLength- Specifies the field lengthLength- Specifies the field lengthType – Specifies the data type (C or A- Alphanumeric, N-Numeric, P-Packed, Type – Specifies the data type (C or A- Alphanumeric, N-Numeric, P-Packed, B-Binary) B-Binary)

Page 21: Gener-ol

Records

Data Max Length Type of Data Decimals

Char 32766 C or A

Hexadecimal 32766 H

Numeric 15 N 9

Packed 8 P 9

Binary 7 B

Floating Point 4 F

Page 22: Gener-ol

Working Storage

Same as we define the layout this time select the Same as we define the layout this time select the work option.work option.Naming convention:Naming convention:XANNNZN – MQ110R1 M-Motor, Q-QuotesXANNNZN – MQ110R1 M-Motor, Q-QuotesX- Major system, A-minor system, NNN-pgm X- Major system, A-minor system, NNN-pgm number, Z= R or N, N- w/s no within the pgmnumber, Z= R or N, N- w/s no within the pgm

Page 23: Gener-ol

Working Storage

►Indexes can be used in a loop for fast accessIndexes can be used in a loop for fast access

Page 24: Gener-ol

MAPS

Same as we define the layout this time select the MAP Same as we define the layout this time select the MAP option.option.Naming convention:Naming convention:XANNNMNN – MQ110M03 M-Motor, Q-QuotesXANNNMNN – MQ110M03 M-Motor, Q-QuotesX- Major system, A-minor system, NNN-pgm number, X- Major system, A-minor system, NNN-pgm number, MNN=Map no within the pgmMNN=Map no within the pgm

Page 25: Gener-ol

MAPS

Page 26: Gener-ol

MAPS

Page 27: Gener-ol

MAPS

Page 28: Gener-ol

MAPS

Page 29: Gener-ol

MAPS

Page 30: Gener-ol

MAPS

Page 31: Gener-ol

MAPS

Page 32: Gener-ol

MAPS

Page 33: Gener-ol

MAPS

Page 34: Gener-ol

MAPS

PF Key Function

PF1 Continues to the next map item

PF2 Adds a blank line after the line where the cursor is positioned

PF3 Inserts a Blank line where the cursor is positioned

PF4 Adds a identical line

PF5 Displays the help screen

PF6 Deletes the line

Page 35: Gener-ol

MAPS

Page 36: Gener-ol

MAPS

Page 37: Gener-ol

MAPS

Page 38: Gener-ol

MAPS

Page 39: Gener-ol

MAPS

Page 40: Gener-ol

Programming concept► Program Code

► Branching

► Expressions

► File Access

► Data manupulation

► Structured

► Mapping

► Linkage

► Existing Utilities

Page 41: Gener-ol

Programming ConceptProgrammingProgramming

► Program name and descriptionProgram name and description

► HANDLE command - CLEAR,ASRAHANDLE command - CLEAR,ASRA

► Record name , filename , prefixRecord name , filename , prefix

► Work name , prefix , shareWork name , prefix , share

► LogicLogic

BRANCHING.BRANCHING.

► GOTO LABEL GOTO LABEL

► GOSUB / RETURNGOSUB / RETURN

► FOR ….. break ….. NEXTFOR ….. break ….. NEXT

► ENDJOBENDJOB

► IS IS ……… ON YES/NO GOTO LABEL……… ON YES/NO GOTO LABEL

Page 42: Gener-ol

Programming ConceptMAPPING. MAPPING. ► MAP MAPNAME,NOSEND,NOWAIT for setting attributesMAP MAPNAME,NOSEND,NOWAIT for setting attributes► .MAPATTR ‘fname’,occ,ATTR=BRT,CURSOR.MAPATTR ‘fname’,occ,ATTR=BRT,CURSOR► RWMSG will contain the error message when .MAPATTR has failed RWMSG will contain the error message when .MAPATTR has failed

and can be hprintedand can be hprinted► GETMAP MAPNAME receives mapGETMAP MAPNAME receives map► MAP MAPNAME sends mapMAP MAPNAME sends map

LINKAGE. LINKAGE. ► GXCTLGXCTL ‘program’, COMMAREA=fname ‘program’, COMMAREA=fname► GLINK ‘program’ ,COMMAREA=fname, SHARE=(WORK1,REC1,etc)GLINK ‘program’ ,COMMAREA=fname, SHARE=(WORK1,REC1,etc)► RETRIEVE fnRETRIEVE fn► NEWPROG …. RWMSGNEWPROG …. RWMSG► XCTL (program),fnXCTL (program),fn► LINKLINK (program),fn(program),fn► File Handler and internal CommandsFile Handler and internal Commands

Page 43: Gener-ol

Programming ConceptFILE ACCESS.FILE ACCESS.► READ,WRITE,CHANGE,DELETE,READHOLD,RELEASEREAD,WRITE,CHANGE,DELETE,READHOLD,RELEASE► READ RECNAME,KEY=W1KEY ON NOT GOTO LABEL READ RECNAME,KEY=W1KEY ON NOT GOTO LABEL ► SKIP=fn , FIRST , FWD , BWD , LAST , NODATA, AGAIN SKIP=fn , FIRST , FWD , BWD , LAST , NODATA, AGAIN ► NEWFILE RECNAME,FILE=FILENAMENEWFILE RECNAME,FILE=FILENAME

DATA MANIPULATION. DATA MANIPULATION. ► COMP FLDA = FLDB + 2COMP FLDA = FLDB + 2► DECDEC RWI1RWI1► INC INC RWI1RWI1► MOVE MOVE FLDA TO FLDB FLDC FLDD etcFLDA TO FLDB FLDC FLDD etc

Page 44: Gener-ol

Programming ConceptFile HandlerFile Handler

Different for different file (Associated with each file being read):Different for different file (Associated with each file being read):

Page 45: Gener-ol

Programming ConceptExisting FunctionsExisting Functions

The first 3 bytes of the output field should be checked for ‘NOT’ (not found).The first 3 bytes of the output field should be checked for ‘NOT’ (not found).

► .GDAYADD.GDAYADD GDAYPASSGDAYPASS (15C field redefined as below) (15C field redefined as below)

DATE1DATE1 DAYS DAYS DATE2DATE2

(YYMMDD)(YYMMDD) No. of days No. of days (YYMMDD) (YYMMDD)

to be addedto be added returned datereturned date

6N6N 3N3N 6N6N

.Gdayadd will add the number of days in field DAYS to DATE1, returning the computed date in DATE2..Gdayadd will add the number of days in field DAYS to DATE1, returning the computed date in DATE2.

► .GREGADD.GREGADD DATE1DATE1 , MONTHS, MONTHS , DATE2, DATE2

(DDMMCCYY)(DDMMCCYY) , No. of months, No. of months , (DDMMCCYY), (DDMMCCYY)

to be addedto be added , returned date, returned date

8N8N 4N 4N ,8N,8N

Page 46: Gener-ol

Programming Concept

..GREGCHRGREGCHR DATEDATE ,DESCRIPTION,DESCRIPTION(DDMMCCYY) ,returned desc.(DDMMCCYY) ,returned desc.

8N8N ,, 29C29C

.Gregchr will return the full date description.Gregchr will return the full date description

e.g.e.g. 21121989,21121989,

returns, THURSDAY 21ST DECEMBER 1989.returns, THURSDAY 21ST DECEMBER 1989.

(N.B. Tuesday, Wednesday, Thursday & Saturday are returned in the first byte of the DESCRIPTION field. All others start in (N.B. Tuesday, Wednesday, Thursday & Saturday are returned in the first byte of the DESCRIPTION field. All others start in the second byte). the second byte).

► .GREGJUL.GREGJUL DATEDATE , JULDATE, JULDATE

(DDMMCCYY)(DDMMCCYY) , (CCYYDDD), (CCYYDDD)

8N8N 7N 7N

.Gregjul will return the Julian date for a valid Gregorian date..Gregjul will return the Julian date for a valid Gregorian date.

► .GREGVAL.GREGVAL DATEDATE , RC, RC

(DDMMCCYY)(DDMMCCYY) , 0, 0

8N8N , 1N, 1N

.Gregval will validate a Gregorian date and should be passed the date 8 byte numeric and 0 in the Return code field..Gregval will validate a Gregorian date and should be passed the date 8 byte numeric and 0 in the Return code field.

The return code will contain 0 on a successful call.The return code will contain 0 on a successful call.

► N.B.N.B. All other date handling commands assume that a valid date is being passedAll other date handling commands assume that a valid date is being passed . .

Page 47: Gener-ol

Programming Concept► ..GENLOOKGENLOOK INGEN,OUTGEN,LOOKNUM,FLAGSINGEN,OUTGEN,LOOKNUM,FLAGS

55C , 60C , 4B55C , 60C , 4B , 7C , 7C

(The FLAGS field is optional depending on the application and contains user-set indicators).(The FLAGS field is optional depending on the application and contains user-set indicators).

The internal reference file holds commonly used descriptive data.The internal reference file holds commonly used descriptive data.

The first byte of the field INGEN should contain the alpha character of the description type required, the next 4 bytes the code of the description The first byte of the field INGEN should contain the alpha character of the description type required, the next 4 bytes the code of the description required.required.

The first 3 bytes of the field OUTGEN should be checked for the word ‘NOT’ (not found) on completion of the call.The first 3 bytes of the field OUTGEN should be checked for the word ‘NOT’ (not found) on completion of the call.

Following a successful call the description will be held in the last 50 bytes of the field OUTGEN.Following a successful call the description will be held in the last 50 bytes of the field OUTGEN.

(A utility program MU020 on MOTOR will show the letter codes currently in use with their descriptions).(A utility program MU020 on MOTOR will show the letter codes currently in use with their descriptions).

AA -- Post CodesPost Codes MM -- Driver coverDriver cover

BB -- Motor convictionsMotor convictions NN -- Voluntary excessVoluntary excess

CC -- Occupation CodesOccupation Codes OO -- Operator classesOperator classes

DD -- Class of car useClass of car use QQ -- AgeAge

EE -- Type of coverType of cover R R -- Demerit codesDemerit codes

FF -- InfirmitiesInfirmities SS -- Policy endorsementsPolicy endorsements

GG -- Scheme identifiersScheme identifiers TT -- No claims bonusNo claims bonus

HH -- Cause codesCause codes UU -- Negligence codesNegligence codes

II -- Car ageCar age VV -- Car valuesCar values

JJ -- Period codesPeriod codes XX -- MessagesMessages

KK -- Benefit codesBenefit codes Y Y -- International letter codeInternational letter code

LL -- Accident valuesAccident values

Page 48: Gener-ol

Programming Concept.INTLOOK.INTLOOK INTIN,INTOUTINTIN,INTOUT

13c13c , 45C, 45C

(INTIN redefined:-(INTIN redefined:-

(INTALPHA (INTALPHA 1 C1 C

(INTLCODE(INTLCODE 6 C6 C

(INTDATE(INTDATE 6 C6 C

Used to find rating parameters using the record-type letter, internal code and rating date YYMMDD.Used to find rating parameters using the record-type letter, internal code and rating date YYMMDD.

The first two bytes of the output should be checked for ‘NO’ - not found.The first two bytes of the output should be checked for ‘NO’ - not found.

(KC030R2/(KC030R2/MU110R1)MU110R1)

Page 49: Gener-ol

Programming ConceptSTRUCTUREDSTRUCTURED

► IF ………IF ………

ELSEELSE

ENDIFENDIF

► DO WHILE ….DO WHILE ….

ENDDOENDDO

► REPEATREPEAT

UNTIL ……UNTIL ……

► VARYING ….. VARYING …..

ENDVARYENDVARY

► CASE ……CASE ……

VALUE VALUE

OTHERWISEOTHERWISE

ENDCASEENDCASE

Page 50: Gener-ol

Utilities & Reserved Words

Log on Through £TSOLU option Log on Through £TSOLU option

Page 51: Gener-ol

UtilitiesSelect the option G or I for Generol utilities:Select the option G or I for Generol utilities:

Following Job can be used to transfer the Gener/Ol pgm with all the records and Following Job can be used to transfer the Gener/Ol pgm with all the records and work areas expanded to ISPFwork areas expanded to ISPF

TTLU.BDBC.JCL(TTLU.BDBC.JCL(GOLPGOLP) change the job card and Pgm name.) change the job card and Pgm name.

Page 52: Gener-ol

Function Keys

RWAIDRWAID

► PF1PF1 -- F1F1 PF13PF13 -- C1C1

► PF2PF2 -- F2F2 PF14PF14 -- C2C2

► PF3PF3 -- F3F3 PF15PF15 -- C3C3

► PF4PF4 -- F4F4 PF16PF16 -- C4C4

► PF5PF5 -- F5F5 PF17PF17 -- C5C5

► PF6PF6 -- F6F6 PF18PF18 -- C6C6

► PF7PF7 -- F7F7 PF19PF19 -- C7C7

► PF8PF8 -- F8F8 PF20PF20 -- C8C8

► PF9PF9 -- F9F9 PF21PF21 -- C9C9

► PF10PF10 -- 7A7A PF22PF22 -- 4A4A

► PF11PF11 -- 7B7B PF23PF23 -- 4B4B

► PF12PF12 -- 7C7C PF24PF24 -- 4C4CCLEARCLEAR -- 6D6DPA1PA1 -- 6C6CPA2PA2 -- 6E6EENTERENTER -- 7D7D PA3PA3 -- 6B6B

Page 53: Gener-ol

Reserved WordsRWABENDContains the Abend CodeSpaces should be moved into the reserved word RWABEND in the exit routines of all programs.A system message will be placed in RWABEND if any ‘errors’ are detected, such as EOF, or a NOT FOUND condition.

RWALPHATo test whether a field is made up of Alphanumeric Characters of Blank

RWBLANKTo test whether a field for blanks or Move all blanks to a field

RWCLEARTo test a field for all binary zeros or move binary zeros

RWDATE Has the date in MM/DD/YY format

Page 54: Gener-ol

Reserved Words

RWDAY

Contains Day of the week

RWDAYNUM

Contains the number denoting the day of the week( Sunday =0)

RWFALSE

To test whether a expression is false

RWFILE

Updates the file name when file access commands are used

RWMSG

length 40 can use used to pass the data b/w programs Using NEWPROG or GOXCTL data moved in this field will be available to next program and can be moved to working storage field.

Page 55: Gener-ol

Debugging Facility

► Type ‘DE’ or ‘Debug’ to debug a program.Type ‘DE’ or ‘Debug’ to debug a program.

► Quite similar to the Xpeditor.Quite similar to the Xpeditor.

Page 56: Gener-ol

Debugging Facility

Page 57: Gener-ol

How to view Gener/ol code in Mplex(System Testing

environment) ► Enter Id and passwordEnter Id and password

► Log on to MPLEX with F12 option and type this…..Log on to MPLEX with F12 option and type this…..

► PRD1 SXH6 RBSG Dev1PRD1 SXH6 RBSG Dev1

Page 58: Gener-ol

Questions ??

Page 59: Gener-ol

Thanks!