CA Generol

March 25, 2018 | Author: Apurva Kapoor | Category: Library (Computing), Data Type, Computer File, C (Programming Language), Computer Programming


Comments



Description

CA-GENER/OL BasicsPrepared By: Deepak Bajaj 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 ► Table Of Content 1. 2. 3. 4. 5. Library Structures Basics Commands Programming Concept Reserved Words Debugging Facility Library Structure MOTOR HOUSE SGTLIB1 SGTLIB2 Transaction DEV1 to logon to SGTLIB1 Transaction DEV2 to logon to SGTLIB2 SGTLIB7 & SGTLIB8 are Production Libraries . Library Structure . Library Structure . Library Structure . Basic Commands & Conventions command line ► ► ► ► COPY MOVE RENAME DELETE A -> autmatic editing Related to maps B -> Browse C -> Copy D -> Delete Line Commands ► ► ► ► ► ► ► ► ► ► ► ► ► E -> edit G -> GO ( This for debugging the memeber) I -> Inventory( takes lot of time for big pgms) M ->Move N -> Rename O -> Map modelling P -> print R -> Run Z -> Clear . Programming Concept ► FILE Storage ►Records/Segment ►Working ► 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 CAGener/OL and CICS. ► ►Matches ►Done CICS FCT entries by the System Administrator . FILE ► . FILE ► . FILE . Q-Quotes X.Major system. A-minor system. N-=w/s no RECN.Record layout no .Records/Segment Naming convention: XARECN – MQREC1 M-Motor. Records/Segment . Records/Segment . Residency. RW is the reserved word.Records/Segment Record – Displays the member name assigned to the record layout Prefix – Displays 2 char code placed before each field name.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. Format is alpha/alphanumeric. . Alphanumeric.Specifies the Start position Length.Records/Segment Name.Specifies the field length Type – Specifies the data type (C or A. N-Numeric.Specifies the field name Starts. P-Packed. B-Binary) Mask -?? . Records/Segment 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 . w/s no within the pgm . Naming convention: XANNNZN – MQ110R1 M-Motor.Working Storage Same as we define the layout this time select the work option. N. Q-Quotes X. Z= R or N. A-minor system.Major system. NNN-pgm number. 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, QQuotes X- Major system, A-minor system, NNN-pgm number, M=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 . break …. filename .ASRA.QIDERR Record name .CLEAR... prefix . NEXT ENDJOB IS ……… ON YES/NO GOTO LABEL . prefix Work name . share Logic =LAB/@ BRANCHING. ► ► ► ► ► GOTO LABEL GOSUB / RETURN FOR ….Programming Concept Programming ► ► ► ► ► Program name and description HANDLE command . COMMAREA=fname.fn File Handler and internal Commands .ATTR=BRT.CURSOR RWMSG will contain the error message when .REC1. COMMAREA=fname ‘program’ .MAPATTR has failed and can be hprinted GETMAP MAPNAME receives map ► LINKAGE. RWMSG XCTL LINK (program).etc) RETRIEVE fn NEWPROG ….Programming Concept MAPPING.NOSEND.SHARE=(WORK1.fn (program).MAPATTR ‘fname’.NOWAIT for setting attributes . ► ► ► MAP MAPNAME. ► ► ► ► ► ► ► GXCTL GLINK ‘program’.occ. CHANGE.Programming Concept FILE ACCESS. ► ► ► ► COMP FLDA = FLDB + 2 DEC INC RWI1 RWI1 MOVE FLDA TO FLDB FLDC FLDD etc .RELEASE READ RECNAME. BWD . ► ► ► ► READ.READHOLD. NODATA.KEY=W1KEY ON NOT GOTO LABEL SKIP=fn .FILE=FILENAME DATA MANIPULATION.DELETE. AGAIN NEWFILE RECNAME. FWD . FIRST . LAST .WRITE. NOWAIT for setting attributes .fn File Handler and internal Commands .MAPATTR ‘fname’.CURSOR RWMSG will contain the error message when .REC1. COMMAREA=fname ‘program’ .occ. RWMSG XCTL LINK (program).NOSEND. ► ► ► MAP MAPNAME.COMMAREA=fname. ► ► ► ► ► ► ► GXCTL GLINK ‘program’.SHARE=(WORK1.etc) RETRIEVE fn NEWPROG ….fn (program).ATTR=BRT.MAPATTR has failed and can be hprinted GETMAP MAPNAME receives map ► LINKAGE.Programming Concept MAPPING. Programming Concept File Handler Different for different file (Associated with each file being read): . ULU is a universal look up records and associated with different rating factors in control of Insurance Services.Programming Concept Accessing ULU records: Commands like .. Following is an example used in one of the program: Following are the imporatant parameters to read a ULU record INTALPHA.INTDATE must be given to access a ULU record .RINT...GENLOOK.INTLCODE.HINT. .MINT.INTLOOK are used to access the ULU records. of months to be added 4N . (DDMMCCYY) .Programming Concept Existing Commands The first 3 bytes of the output field should be checked for ‘NOT’ (not found). DATE2 .8N ► .Gdayadd will add the number of days in field DAYS to DATE1.GDAYADD DATE1 GDAYPASS (15C field redefined as below) DAYS No. returned date . MONTHS . ► . No.GREGADD DATE1 (DDMMCCYY) 8N . returning the computed date in DATE2. of days to be added 6N 3N DATE2 (YYMMDD) returned date 6N (YYMMDD) . . All others start in the second byte). Wednesday.Programming Concept . ► .DESCRIPTION . ► . RC . JULDATE .Gregchr will return the full date description e.g. (N.B. THURSDAY 21ST DECEMBER 1989. Thursday & Saturday are returned in the first byte of the DESCRIPTION field.0 . All other date handling commands assume that a valid date is being passed . (CCYYDDD) 7N . 1N .GREGJUL DATE (DDMMCCYY) 8N .returned desc. .GREGVAL DATE (DDMMCCYY) 8N . ► N. 29C . Tuesday.B. .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. 21121989. returns.Gregjul will return the Julian date for a valid Gregorian date.GREGCHR DATE (DDMMCCYY) 8N . . ENDDO REPEAT UNTIL …… VARYING ….Programming Concept STRUCTURED ► IF ……… ELSE ENDIF ► DO WHILE …. ► ► ENDVARY ► CASE …… VALUE OTHERWISE ENDCASE . Programming Concept EDITOR ► ► ► Ispf ‘like’ SYNTAX CHECKING SELF COMPILING . 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. Reserved Words RWAID ► PF1 PF2 PF3 PF4 PF5 PF6 PF7 - F1 F2 F3 F4 F5 F6 F7 PF13 PF14 PF15 PF16 PF17 PF18 PF19 - C1 C2 C3 C4 C5 C6 C7 ► ► ► ► ► ► ► ► ► ► ► PF8 PF9 PF10 PF11 PF12 - F8 F9 7A 7B 7C PF20 PF21 PF22 PF23 PF24 - C8 C9 4A 4B 4C CLEAR PA1 PA2 ENTER PA3 - 6D 6C 6E 7D 6B . or a NOT FOUND condition. such as EOF.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. 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 . Debugging Facility ► Keys ► Data Area . Debugging Facility . Debugging Facility . Debugging Facility Changing Default options: . Questions Please!!! Thanks! .  Should be divided into two programs. 2. 4.Assignment  Create a Screen having Following fields : 1. 3. Else ‘ Hi Name you are NN years old !!’ You next b’day will be on ‘ Day ‘ After NN months’ this time too AGE should be displayed and above message should also be displayed.Hidden  Take the input and Calculate his Age and Display the message ‘HI Name You are NN years OLD! Wish you a very Happy B’day’ If its his b’day today display the message this time AGE should be displayed and above message should also be displayed. Map should display in one program and Calculation of Age should be in Different program. NAME : SEX : DOB: AGE: . . Thanks! .
Copyright © 2024 DOKUMEN.SITE Inc.