Upload
wilfrid-wesley-barton
View
226
Download
5
Tags:
Embed Size (px)
Citation preview
CICS-Dev 1
Intro to Program Development
Develop complete program specsDesign the programCreate required CICS table entriesCreate the BMS mapsetCode the programCompile and Test the programDocument the program
CICS-Dev 2
Program Specifications
Usually “Up to You!”Program overview (Narrative)Screen layout for each map (usually 1)COPY members needed (if any)Editing rules, Decision TablesFiles, DB/2 Tables read/updated
CICS-Dev 3
Program Design
Critical! Can save hours (days!)PSEUDO-CONVERSATIONAL (different!)Event Driven - Major FunctionsProcessing Summary Details processing for each response Structure Chart, or ‘Table’
CICS-Dev 4
Create CICS Table Entries
PCT = Program Control Table TRANS-ID assigned to Program
PPT = Processing Program Table (2) COBOL Program Mapset - Assembler Program
FCT = File Control Table FILE(s) used by Program
Usually done by Systems Programmer
CICS-Dev 5
Create the BMS Mapset
Defines the MAP(s) used by programMAP provides for screen formattingMAPSET is group of screens (1 or more)Normally only one MAP per MAPSETOnly three macro’s used to create MAPUsually a ‘Screen Generator’ is used
CICS-Dev 6
Code the Program
Uses standard COBOL code (almost!)Also uses CICS CommandsTo include a CICS Command: EXEC CICS
CICS Command (with PARAMETERS) END-EXEC
CICS-Dev 7
Compile Program
Special CICS Pre-compilerCICS command-level translator Converts CICS commands to COBOL Creates listing with possible errors Changes CICS lines to comments Compiled by standard COBOL
Compiler Another listing with possible errors
CICS-Dev 8
Test Program
Create test plan (Possible inputs)Sign on to CICS (CESN)Verify MAP is working (with CECI)Test all conditions of program (CEDF)NEWCOPY if changes made (CEMT)Sign off of CICS (CESF)
CICS-Dev 9
Document Program
Specifications and Listing (Sometimes!)Every shop has set of ‘Standards’Some shops require both: SYSTEM Documentation (for Maintenance) USER Guide (Instructions for use)
‘HELP’ screens sometimes used for userShould not be last step!
CICS-Dev 10
Creating a BMS MAPSET
3270 is FIELD oriented displayScreen divided into user defined fieldsEach field has CHARACTERISTICSDetermined by ATTRIBUTE BYTES(First character of each field!)Displayed as a space, but NOT available
CICS-Dev 11
Creating a BMS MAPSET
Field starts at position after attributeAttribute Byte determines the fields characteristicsBasic Attributes are: Protection – allows user to key data Intensity – normal or high Shift – numeric or alphanumeric
CICS-Dev 12
Protection Attribute
Protected – user can’t key data in fieldUnprotected – user allowed to key dataAuto-Skip – cursor skips to next field Used to mark end of data entry field Cursor automatically moves to next field
CICS-Dev 13
Intensity Attribute
Normal – shown normal intensityBright – shown in high intensityNo-display – not shown (background) Used for password entry Also used to ‘hide’ data on screen
CICS-Dev 14
Shift Attribute
Alphanumeric – allows most charactersNumeric – only numeric characters Not usually used – (CICS level error) Multiple periods can be entered –
error Use Alpha and test in program!
CICS-Dev 15
Attribute Byte Format
Bit Function Values
0-1 Depends on bits 2 - 7 See ATTR copylib2-3 Protection and Shift 00 – Unprot alpha
01 – Unprot numeric10 – Protected11 – Protected skip
4-5 Intensity 00 – Normal01 – Normal10 – Bright11 – No display
6 Reserved Must be 0 7 Modified Data Tag 0 – Field not modified
1 – Field was modified
0 1 2 3 54 6 7
CICS-Dev 16
Extended Attributes
Allow Extra Colors: Blue, Red, Pink, Green, Turquoise, Yellow and White
Highlighting Blinking, Reverse Video, Underlining
Validation Must fill, Must enter, Trigger
Symbols Up to six alternate character sets
CICS-Dev 17
More terminology
PHYSICAL MAP – load module Result of Assembly Contains table of screen locations of data Also contains attributes of each field
SYMBOLIC MAP – Copy library member Result of Assembly Usually used in COBOL program You can create your own – if careful!
CICS-Dev 18
Coding a BMS Mapset
Only need two Assembler commands PRINT NOGEN (Not for AS400) END
And three BMS MACRO Instructions DFHMSD – Map Set Definition DFHMDI – Map Definition DFHMDF – Field (Attribute byte)
Definition
CICS-Dev 19
PRINT NOGEN and END
PRINT NOGEN should be the first line Assembler will NOT print generated code If omitted, you get much longer listing!
END – must be the last line of MAPSET Informs Assembler – no more lines
CICS-Dev 20
DFHMSD Macro
VISnqq DFHMSD TYPE=&SYSPARM, XLANG=COBOL, XMODE= INOUT, XTERM=3270-2, XCTRL=FREEKB, XSTORAGE=AUTO, XDSATTS=(COLOR,HILIGHT), XMAPATTS=(COLOR,HIGHLIGHT), XTIOAPFX=YES
CICS-Dev 22
DFHMDF Macro
FLDNM DFHMDF POS=(line,col),X
LENGTH=nn, XATTRB=(unPROT), XCOLOR=BLUE, XINITIAL=‘init value’
CICS-Dev 23
ATTRB Parameter
BRT High intensity displayNORM Normal intensityDRK Not displayed (Hidden)PROT Protected – no data keyedUNPROT Data may be keyed inIC Initial cursor positionFSET MDT set ON for field
CICS-Dev 24
The Symbolic Map
Copy member created by AssemblyUse COPY statement in COBOLMaximum of 7 character field namesMAPGEN adds the 8th (last) characterFine for Assembler–Marginal in COBOLYou can code your own – if careful!
CICS-Dev 25
Symbolic Map Suffix List
I The INPUT data fieldO The OUTPUT data field (Same loc I)L Binary Halfword-S9(4) COMP Nbr chars data returned in input fieldF Char w/’80’ if field was clearedA Char w/attrb for output (Same loc F)C/H Used for Color and/or Highlighting
CICS-Dev 26
Pseudo-Conversational
An on-line program that actually ended while appearing to wait for a response.Single-user systems are ‘conversational’System waits for operator to enter dataSingle user system - nothing else to doMulti-user system can’t waste the time3270 screen handles operator activity
CICS-Dev 27
Pseudo-Conversational
Conversational program remains in storage during entire interaction.Pseudo-conversational program only in storage for a few seconds each action.Many more users can be processedStorage used more efficientlyMinor complication to programs!
CICS-Dev 28
Pseudo-Conversational
Terminal handles operator entryAttention Key signals CICS screen ready Enter, PF, PA, or Clear Key - (Event)
CICS reloads program (Virtual Storage)Program start at BEGINNING every timeYou must keep up with where user isUser unaware that program restarted
CICS-Dev 29
Sample CICS Scenario
Transaction ID Entered Looked up in PCT - Program loadedProgram displays initial map and endsUser enters data and hits ‘Enter’ keyProgram reloaded (from CICS storage) Receives data from screen Processes data Sends response back to screen Returns to CICS