Você está na página 1de 59

CA-GENER/OL Basics

CA-Gener/OL: Way to Go

Why GENER/OL

CA Gener/OL is a powerful and flexible 4-GL development tool for CICS that helps decrease the growing application backlog by simplifying a number of labour-intensive tasks and facilitating quick response times. CA Gener/OL addresses the challenge to flexibly create and update online reports without complex programming languages. It offers interactive screen development, incremental compilation builds and access to a number of database management systems. CA Gener/OL supports z/OS and z/VSE

Table Of Content
1. 2. 3. 4. 5.

Library Structures Basics Commands Programming Concept Reserved Words Debugging Facility

Library Structure
SGTLIB1 Dev Region
MOTOR HOUSE

SGTLIB2

SGTLIB8 Intermediate

SGTLIB9

REPRO

SGTLIB1 Production

SGTLIB2

Library Structure

Library Structure

Library Structure

LOCATION OF SYSTEMS, GENER/OL OWNERS & PROGRAMS

SYSTEM

GENER/OL OWNER

REGION SGTLIB 2 2 1 1

PROGRAM NAMES ATA AU ASL AD HQ HU MQ CS MQ MU

SYSTEM

ACCOUNTS CHASING

ACCOUNT HOUSE MOTOR

A H M M

MOTOR TELESALES MOTOR CLAIMS

MOTOR

MOTOR

KC KU MSL KR KG MCA RC

Basic Commands & Conventions


Command line

COPY MOVE RENAME DELETE A -> automatic editing Related to maps B -> Browse C -> Copy D -> Delete E -> edit G -> GO ( This for debugging the member) M ->Move N -> Rename O -> Map modelling P -> print R -> Run Z -> Clear

Line Commands

Programming Concept

FILE Records Working Storage MAPS

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

Matches CICS FCT entries Done by the System Administrator

FILE
Naming convention: Maximum 8 character filename in the format:XAAAAAAA X- Major system & AAAAAAA = a unique filename e.g. MCLIENT

FILE

FILE

FILE

Records

Naming convention: XARECN MQREC1 or XAARECN VCBREC1 M-Motor, Q-Quotes X- Major system, A or AA-minor system, RECN- Record layout no

Records

Records

Records
Record Displays the member name assigned to the record layout Prefix Displays 2 char code placed before each field name. Format is alpha/alphanumeric. RW is the reserved word. Residency- Y or N ?? TSQ are automatically written for Resident areas and when the control comes back from the operator the resident w/s will be restored from TSQs while the non res w/s data will be lost.

Records

Name- Specifies the field name Starts- Specifies the Start position Length- Specifies the field length Type Specifies the data type (C or A- Alphanumeric, N-Numeric, P-Packed, B-Binary)

Records
Data Char Hexadecimal Numeric Packed Binary Floating Point Max Length 32766 32766 15 8 7 4 Type of Data C or A H N P B F 9 9 Decimals

Working Storage

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

Working Storage

Indexes

can be used in a loop for fast access

MAPS

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

MAPS

MAPS

MAPS

MAPS

MAPS

MAPS

MAPS

MAPS

MAPS

MAPS
PF Key PF1 PF2 Function Continues to the next map item Adds a blank line after the line where the cursor is positioned

PF3 PF4 PF5 PF6

Inserts a Blank line where the cursor is positioned Adds a identical line Displays the help screen Deletes the line

MAPS

MAPS

MAPS

MAPS

MAPS

Programming concept

Program Code Branching Expressions File Access Data manupulation Structured Mapping Linkage Existing Utilities

Programming Concept
Programming

Program name and description HANDLE command - CLEAR,ASRA Record name , filename , prefix Work name , prefix , share Logic

BRANCHING.

GOTO

LABEL

GOSUB / RETURN FOR .. break .. NEXT ENDJOB IS ON YES/NO GOTO LABEL

Programming Concept
MAPPING.

MAP MAPNAME,NOSEND,NOWAIT

for setting attributes

.MAPATTR fname,occ,ATTR=BRT,CURSOR RWMSG will contain the error message when .MAPATTR has failed and can be hprinted GETMAP MAPNAME MAP MAPNAME receives map sends map

LINKAGE.

GXCTL

program, COMMAREA=fname

GLINK program ,COMMAREA=fname, SHARE=(WORK1,REC1,etc) RETRIEVE fn NEWPROG . RWMSG XCTL LINK (program),fn (program),fn

File Handler and internal Commands

Programming Concept
FILE ACCESS.

READ,WRITE,CHANGE,DELETE,READHOLD,RELEASE READ RECNAME,KEY=W1KEY ON NOT GOTO LABEL SKIP=fn , FIRST , FWD , BWD , LAST , NODATA, AGAIN NEWFILE RECNAME,FILE=FILENAME

DATA MANIPULATION.

COMP FLDA = FLDB + 2 DEC INC RWI1 RWI1

MOVE FLDA TO FLDB FLDC FLDD etc

Programming Concept
File Handler

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

Programming Concept
Existing Functions
The first 3 bytes of the output field should be checked for NOT (not found).

.GDAYADD DATE1

GDAYPASS (15C field redefined as below) DAYS No. of days to be added 6N 3N DATE2 (YYMMDD) returned date 6N

(YYMMDD)

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

.GREGADD

DATE1 (DDMMCCYY) 8N

, MONTHS , No. of months to be added 4N

, DATE2 , (DDMMCCYY) , returned date ,8N

Programming Concept
. GREGCHR 8N .Gregchr will return the full date description e.g. 21121989, 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 the second byte).

DATE (DDMMCCYY) ,

,DESCRIPTION ,returned desc. 29C

.GREGJUL

DATE (DDMMCCYY) 8N

, JULDATE , (CCYYDDD) 7N , RC ,0 , 1N

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

.GREGVAL

DATE (DDMMCCYY) 8N

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

N.B.

All other date handling commands assume that a valid date is being passed.

Programming Concept

.GENLOOK

INGEN,OUTGEN,LOOKNUM,FLAGS 55C , 60C , 4B , 7C

(The FLAGS field is optional depending on the application and contains user-set indicators). 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 required. 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. (A utility program MU020 on MOTOR will show the letter codes currently in use with their descriptions). A B C D E F G H I J K L Post Codes Motor convictions Occupation Codes Class of car use Type of cover Infirmities Scheme identifiers Cause codes Car age Period codes Benefit codes Accident values M N O Q R S T U V X Y Driver cover Voluntary excess Operator classes Age Demerit codes Policy endorsements No claims bonus Negligence codes Car values Messages International letter code

Programming Concept
.INTLOOK INTIN,INTOUT 13c (INTIN redefined:(INTALPHA (INTLCODE (INTDATE 1C 6C 6C , 45C

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. (KC030R2/MU110R1)

Programming Concept
STRUCTURED

IF ELSE ENDIF

DO WHILE . ENDDO REPEAT UNTIL VARYING .. ENDVARY CASE VALUE OTHERWISE ENDCASE

Utilities & Reserved Words


Log

on Through TSOLU option

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 work areas expanded to ISPF TTLU.BDBC.JCL(GOLP ) change the job card and Pgm name.

Function Keys
RWAID

PF1

F1

PF13

C1

PF2 PF3 PF4 PF5 PF6 PF7 PF8 PF9 PF10 PF11 PF12

F2 F3 F4 F5 F6 F7 F8 F9 7A 7B 7C

PF14 PF15 PF16 PF17 PF18 PF19 PF20 PF21 PF22 PF23 PF24

C2 C3 C4 C5 C6 C7 C8 C9 4A 4B 4C

CLEAR PA1 PA2 ENTER PA3

6D 6C 6E 7D 6B

Reserved Words
RWABEND
Contains the Abend Code Spaces 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.

RWALPHA To test whether a field is made up of Alphanumeric Characters of Blank RWBLANK To test whether a field for blanks or Move all blanks to a field RWCLEAR To test a field for all binary zeros or move binary zeros RWDATE Has the date in MM/DD/YY format

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.

Debugging Facility
Type DE or Debug to debug a program. Quite similar to the Xpeditor.

Debugging Facility

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


Enter Id and password Log on to MPLEX with F12 option and type this.. PRD1 SXH6 RBSG Dev1

Questions ??

Thanks!

Você também pode gostar