Intro to Program Development - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Intro to Program Development

Description:

Determined by ATTRIBUTE BYTES (First character of each field! ... Protection Attribute. Protected user can't key data in field ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 31
Provided by: neallr
Category:

less

Transcript and Presenter's Notes

Title: Intro to Program Development


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

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

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

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

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 macros used to create MAP
  • Usually a Screen Generator is used

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

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

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)

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!

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

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

12
Protection Attribute
  • Protected user cant 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

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

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!

15
Attribute Byte Format
0
1
2
3
5
4
6
7
Bit Function Values 0-1 Reserved Must be
0 2-3 Protection and Shift 00 Unprot
alpha 01 Unprot numeric 10
Protected stop 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
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

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!

18
Coding a BMS Mapset
  • Only need two Assembler commands
  • PRINT NOGEN
  • END
  • And three BMS MACRO Instructions
  • DFHMSD Map Set Definition
  • DFHMDI Map Definition
  • DFHMDF Field (Attribute byte) Definition

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

20
DFHMSD Macro
  • MAPSET1 DFHMSD TYPESYSPARM, X
  • LANGCOBOL, X
  • MODE INOUT, X
  • TERM3270-2, X
  • CTRLFREEKB, X
  • STORAGEAUTO, X
  • TIOAPFXYES

21
DFHMDI Macro
  • MAP1 DFHMDI SIZE(24,80), X
  • LINE1, X
  • COLUMN1

22
DFHMDF Macro
  • FLDNM DFHMDF POS(line,col), X
  • LENGTHnn, X ATTRB(PROT), X
  • ignored here COLORBLUE, X
  • INITIALinit value

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

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 AssemblerMarginal in COBOL
  • You can code your own if careful!

25
Symbolic Map Suffix List
  • I The INPUT data field
  • O The OUTPUT data field (Same loc I)
  • L Binary Halfword-S9(4) COMP that contains 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

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 cant waste the time
  • 3270 screen handles operator activity

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!

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

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
  • Receives data from screen
  • Processes data
  • Sends response back to screen
  • Returns to CICS

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
Write a Comment
User Comments (0)
About PowerShow.com