Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Program Development

Similar presentations


Presentation on theme: "Intro to Program Development"— Presentation transcript:

1 Intro to Program Development
Develop complete program specs Design the program Create required CICS table entries Create the BMS mapset Code the program Compile and Test the program Document 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 Tables Files, DB/2 Tables read/updated CICS-Dev

3 Program Design Critical! Can save hours (days!)
PSEUDO-CONVERSATIONAL (different!) Event Driven - Major Functions Processing 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 program
MAP provides for screen formatting MAPSET is group of screens (1 or more) Normally only one MAP per MAPSET Only three macro’s used to create MAP Usually a ‘Screen Generator’ is used CICS-Dev

6 Code the Program Uses standard COBOL code (almost!)
Also uses CICS Commands To include a CICS Command: EXEC CICS CICS Command (with PARAMETERS) END-EXEC CICS-Dev

7 Compile Program Special CICS Pre-compiler
CICS 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 user Should not be last step! CICS-Dev

10 Creating a BMS MAPSET 3270 is FIELD oriented display
Screen divided into user defined fields Each field has CHARACTERISTICS Determined 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 attribute
Attribute Byte determines the fields characteristics Basic 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 field
Unprotected – user allowed to key data Auto-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 intensity
Bright – shown in high intensity No-display – not shown (background) Used for password entry Also used to ‘hide’ data on screen CICS-Dev

14 Shift Attribute Alphanumeric – allows most characters
Numeric – 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 1 2 3 4 5 6 7 Bit Function Values
1 2 3 4 5 6 7 Bit Function Values 0-1 Depends on bits See ATTR copylib 2-3 Protection and Shift 00 – Unprot alpha 01 – Unprot numeric 10 – Protected 11 – Protected skip 4-5 Intensity 00 – Normal 01 – Normal 10 – Bright 11 – No display 6 Reserved Must be 0 7 Modified Data Tag 0 – Field not modified 1 – Field was modified CICS-Dev

16 Extended Attributes Allow Extra Colors: Highlighting Validation
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 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, X LANG=COBOL, X
MODE= INOUT, X TERM=3270-2, X CTRL=FREEKB, X STORAGE=AUTO, X DSATTS=(COLOR,HILIGHT), X MAPATTS=(COLOR,HIGHLIGHT), X TIOAPFX=YES CICS-Dev

21 DFHMDI Macro VIDSnM1 DFHMDI SIZE=(24,80), X LINE=1, X COLUMN=1
CICS-Dev

22 DFHMDF Macro FLDNM DFHMDF POS=(line,col), X
LENGTH=nn, X ATTRB=(unPROT), X COLOR=BLUE, X INITIAL=‘init value’ CICS-Dev

23 ATTRB Parameter BRT High intensity display NORM Normal intensity
DRK Not displayed (Hidden) PROT Protected – no data keyed UNPROT Data may be keyed in IC Initial cursor position FSET MDT set ON for field CICS-Dev

24 The Symbolic Map Copy member created by Assembly
Use COPY statement in COBOL Maximum of 7 character field names MAPGEN adds the 8th (last) character Fine for Assembler–Marginal in COBOL You can code your own – if careful! CICS-Dev

25 Symbolic Map Suffix List
I The INPUT data field O The OUTPUT data field (Same loc I) L Binary Halfword-S9(4) COMP Nbr chars data returned in input field F Char w/’80’ if field was cleared A 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 data Single user system - nothing else to do Multi-user system can’t waste the time 3270 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 processed Storage used more efficiently Minor complication to programs! CICS-Dev

28 Pseudo-Conversational
Terminal handles operator entry Attention Key signals CICS screen ready Enter, PF, PA, or Clear Key - (Event) CICS reloads program (Virtual Storage) Program start at BEGINNING every time You must keep up with where user is User unaware that program restarted CICS-Dev

29 Sample CICS Scenario Transaction ID Entered
Looked up in PCT - Program loaded Program displays initial map and ends User enters data and hits ‘Enter’ key Program reloaded (from CICS storage) Receives data from screen Processes data Sends response back to screen Returns to CICS CICS-Dev

30 CICS Input/Output CICS handles all I/O
Treat screen as simple file (one record) Can Read Screen – RECEIVE MAP Can Write Screen – SEND MAP Can Return to CICS with ID of Program to execute next time user keys AID key Return without TRANS-ID, Exits to CICS CICS-Dev


Download ppt "Intro to Program Development"

Similar presentations


Ads by Google