Presentation Transcript
CICS :CICS IBM’s Customer Information Control System
CICS Programming Languages :CICS Programming Languages Assembler
COBOL
PL/I
Rexx
C/C++
JAVA
Common types of on-line systems: :Common types of on-line systems: Menu
Inquiry
Data entry
On-line system considerations: :On-line system considerations: Performance
File integrity
Security
Ease of use.
Data integrity
Program Design :Program Design Critical! Can save hours (days!)
PSEUDO-CONVERSATIONAL (different!)
Event Driven - Major Functions
Pseudo-Conversational :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
Pseudo-Conversational :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!
Pseudo-Conversational :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
PSEUDOCONVERSATIONAL PROGRAMMING: :PSEUDOCONVERSATIONAL PROGRAMMING:
CICS Table Entries :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 Service Diagram :CICS Service Diagram Terminal
Control (VTAM,SNA,TCP/IP) Basic
Mapping
Support Terminal User Application
Programming
Interface Application
Program Maps File Control SQL DL/I VSAM DB2 IMS OS/390 CICS
CICS Program Invocation :CICS Program Invocation User Enters
TRANS-ID CICS finds
TRANS-ID in PCT
to get program name CICS finds
program name
in PPT CICS loads program
into memory/
starts program CICS runs program
in address space TRANS-ID = Transaction Identifier
PCT = Program Control Table
PPT= Processing Program Table
CICS Example - Screen 1 :CICS Example - Screen 1
CICS Example - Screen 2 :CICS Example - Screen 2
CICS Example - Screen 3 :CICS Example - Screen 3
CICS Example - Screen 4 :CICS Example - Screen 4
Creating a BMS MAPSET :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
Create the BMS Mapset :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 Screen :CICS Screen Basic Mapping Support (BMS) or a Screen painter used to develop
BMS uses assembler macros to define screen layout(s)
DFH = Always means CICS
DFHMSD = mapset descriptor (one per mapset)
DFHMDI = map descriptor initiator (one per map)
DFHMDF = map descriptor field (one for each map field)
Define a Mapset :Define a Mapset To define the mapset.
name DFHSMD TYPE=(type of mapset),
MODE=how map is used,
CTRL=FREEKB,
LANG=language,
TIOAPFX=YES,
STORAGE = AUTO
To end a mapset definition
DFHSMD TYPE=FINAL
Example Mapset Definition :Example Mapset Definition MENU013 DFHMSD TYPE=&SYSPARM,
MODE=INOUT,
TERM=ALL,
LANG=COBOL,
TIOAPFX=YES,
CTRL=FREEKB,
BASE=MAPS
Maps and field definitions go here
DFHMSD TYPE=FINAL
END
Define a Map :Define a Map MENU013 DFHMDI SIZE=(24,80),
LINE=1,
COLUMN=1
Define Fields :Define Fields DFHMDF POS=(7,10),LENGTH=10,INITIAL='LAST NAME:',
ATTRB=ASKIP
LNAME DFHMDF POS=(7,21),LENGTH=20,ATTRB=(UNPROT,IC)
MESSGE DFHMDF POS=(5,10),LENGTH=64,ATTRB=(PROT)
ATTRB Parameter :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
Protection Attribute :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
Intensity Attribute :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
Coding a BMS Mapset :Coding a BMS Mapset Only need two Assembler commands
PRINT NOGEN
DFHMSD – Map Set Definition
DFHMDI – Map Definition
DFHMDF – Field (Attribute byte) Definition
DFHMDI – Map Definition
DFHMDF – Field (Attribute byte) Definition
END
More terminology :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!
The Symbolic Map :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!
Symbolic Map Suffix List :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
Sample CICS Scenario :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
CICS Input/Output :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
Send A Map :Send A Map * SEND MAP FIRST TIME IN.
*
IF EIBCALEN = 0
MOVE 'MENU013' TO MAP-NAME
PERFORM SEND-MAP-MAPONLY
PERFORM RETURN-TRANSID
END-IF
SEND-MAP-MAPONLY.
EXEC CICS SEND MAP(MAP-NAME)
MAPONLY
ERASE
NOHANDLE
END-EXEC
EVALUATE EIBRESP
WHEN DFHRESP(NORMAL)
Receive a Map :Receive a Map *
* RECEIVE MAP
*
EXEC CICS RECEIVE MAP(MAP-NAME)
INTO(MAPS)
NOHANDLE
END-EXEC
EVALUATE EIBRESP
WHEN DFHRESP(NORMAL)
CONTINUE
WHEN DFHRESP(MAPFAIL)