Sie sind auf Seite 1von 15

1

CiCS: Customer Information controlling System

 Command Level Language


 Online Programs
 Multi Tasting
 Multithreading

BMS is used for Develop screens

Basic Mapping Support (Assembler Maoro)

SDF is a tool used for developing screens

Screen Definition Facility

MAPSET
1-8 Alpha Numeric – MAPSET --- DFHMSD
(Defined Field
MAP1 Hierarchy Mapset
MAP2 Defination)
MAP3 1-8 --------- MAP ------ DFHMDI

1-30 ------ FIELDS ---- DFHMDF

Text Fields Nonenterable

MAP is nothing but screen


MAP Consists of Fields (Protect & Un Protect)

Text Fields Variables

User id Source BMSMACRO (BMS001)

72

User Defined ` Operands Parameters


Names
DEHMSD TYPE = MAP or DSECT or &SYSPARM X
MODE = IN/OUT or INOUT X
MAPS 001(S) LANGUAGE = COBOL X
Mandotory CNTL=(FRSET, PRINT,FREEKB,ALARAM)

To release the lock for keyboard


or
To unlock Keyboard
TIOAPEX = YES

Terminal Inputoutput Area prefix – Used to reserve


12 bytes of storage for I/O commands
2

MAPS001 Compiler

Customer Details

IOAFL Cust.No. ------ Store in Load MAP (object VARIABLES Stored in


Module Prog) Copy library
IOAFL Cust.Name ----- as a member

Physical Map Symbolic Map


I = Input
O=Output Used by end user Used by Appln Programmer
A=Attribute
F=Field Stored in Loadlib Stored in Copylib
L=Length

Parameter:-

Type = MAP ----- Generates Physical map In Symbolic Map each


Type = DSECT --- Generates Symbolic Map variable is divided into 5
Type = &SYSPARM --- Generates both Physical & symbolic Map parts like I,O,A,FL

1. Physical MAP:-

It is the actual output of Assembler Macro . i.e.object program which consists of


text & variables

It will be copied to load module

Can be used by End user

2. Symbolic MAP:-

Which Consists of variable (5 Variables generated for variable)

Stored in copy library i.e. user defined PDS as separate member which must be copied into
Application program.

Can be used by Application Programmer to receive or send data to the user or to chage field
Attributes or to position the cursor at required location.
3

MAPS00IS DFHMSD Type = MAP or DSECT or &SYSPARM, X


Mode = In/out or INOUT X
LAN = COBOL X
TIOAPFX = YES
CNTL = (FRSET,PRINT, FREEKB) X

MAP001M DFHMDI SIZE = (24,80) --- Default X


= (10,20)
10 = Rows, 20 = Cols.

DFHMDF Pos = (1,10) X


10= St Pos of Col, 1 = St pos of Row
Initial = “ Customer Details) X
Length = 25

DFHMDF Pos = (2,10) X


Initial = “………………” X
Length = 25 X

DFHMDF Pos = (4,1) X


Initial = “Cust.No” X
Length = 8 X

Mcust No DFHMDF Pos = (4,11) X


ATTRB = (Unprotect / Protect,IC, Red,Drk,Skip,Fset) X

Input Cursor or
Insert Cursor Color
Dark

To skip to next enterable field


PICIN = “9(S)” X
PICOUT = “Z(5)” X
Length = 16 X

DFHMDF Pos = (7,1) X


Initial = “Cust.Name” X
Length = 9 X

McustNam DFHMDF Pos = (7,12) X


PICIN = “x(10)” X
PICOUT = “x(10)” X
Attrb: (Unprotect/Red/Drk/Askip/FSET) X
4

USERID SOURCE COPLIB (MCT001M)

01 MCNST001I

2 MCNST NO I PIC 9(5)

02 Filler PIC X(12) ---- For Commands

2 MCNST NO L PIC S9(4)Comp --- Automatically Generated by system

02 MCNST NO A PIC X(1)

02 MCNST NO F Redefines Mcnst No A PIC X(1)

02 MCNSTNAMI PIC X(10)

02 Filler PIC X(12)

2 MCNSTNAML PIC S9(4)Comp

2 MCNSTNAMA PIC X(1)

02 MCNSTNAMF Redefines McnstNam A PIC X(1)

01 Mcnst0010 Redefines MCnst001I

02 McnstNoo PIC Z(5)


02 McnstNamO PIC X(10)

WORKING ---- STORAGE SECTION

Copy MCT001M

STEPS TO WRITE ASSEMBLER MACRO:-

 Create PDS & Member then code Assembler Macro by using DFHMSD, DFHMD1,
DFHMDF

 Compiler Assembelr Macro by using JCL or ISPF panel

 Go to Spool by = S.ST find for syntax errors

 Type F MNOTE in command prompt or ERROR if there are any syntax error

COMPILE

ASSEMBLE

LINK EDITORS
5

Exec CICS

SEND TEXT

Form (“ Contact system Admin”) ……….. Like display “Contact system Admin”

Contact system Admin

End - Exec

Exec CICS

Send Text

From (WS – MSG) using Variable instead of Static Text

End – Exec

Exec CICS

Send CICS COBOL

MAP(“Mcnst001M”) SEND DISPLAY


MAPset(“Mcnst001S”) RECEIVE ACCEPT

End – Exec

Exec CICS

Send Variables
MAP (WS-MAP)
MAP set (WS-MAPSET)

End – Exec

Exec CICS
Receive
MAP (WS-MAP)
MAP set (WS-MAPSET)

End – Exec

Customer Details

Cust.No. = 10

Cust.Name = XYZ
6

DB2 Normal Conversation

CUSTOMER DETAILS

Cust.No …………………..

Cust Name ……
Pr Psendo Conversation

Reinificati
Termination Reinifiation

 At the time of waiting for response, release the resources i.e. terminate the
transaction or program (Connection).After receiving the response, reinitiate the
transaction or program . This Conversion is called psendo conversion.

 In system view, it is two step process


 1. Termination
 2. Reinitiation

 In user view, it is only single step

Exec CICS

Return
TransID (“TO01”) User Defined

End – Exec

PSEuDO CONVERSATION:-

TRANS
TRO1

ONLINE SYSTEM

Normal Conversation Pseudo Conversation

MAP Displayed

 When message or Map sent to the terminal, transaction will be terminated & waiting
for the users response.
7

 After receiving response from the user reinitiate the transaction (acquirer all the
resources)

 In system view, multitasking

 In user view, single task.

ADVANTAGES:-

 Releases all the resources at the time of waiting for the users response

COMMUNICATION AREA:-

 At the time of terminating the transaction, the working storage – section variables
are stored into a variable declared in linkage section

 This area is called communication area

 It is global

 The max six of this variable is 6JK.

(linkage Section)

01 DFHCOMMAREA PIC X (65,53J)

 At the time of reinitiation the data is retrieve from the variable

 Communication Area can be used to pass the data from on transaction to another.

 For the first entry of transaction the Communication Area is empty

 For next entry, it must not be zero.

PROCE4DURE DIVISION

If EIBCALEN = 0 To check the length of Communication Area, it is zero for


first entry, non zero
For next entry.
Exec CICS

Send
MAP (‘MAPNAME’)

MAPSET (‘MAPSET’)
End – exec
Exec CICS

Return
Transid (“TR01”)
End-Exec
Else
Exec CICS
8

Receive MAP (‘MAPNAME’)


MAPSET (‘MAPSET’)
End – Exec

End-it
If EIBCALEN = 0 Cust.No. …….
Cust Name ……..
Exec CICS Message: ………
Send
MAP(‘MAPNAME’) Enter F2 F3 F4
MAPSET(‘MAPSETNAME’)
End – Exec

Exec CICS Functionlays


Return
Transid)”TR01”) Stored
EIBAID
End – Exec.

End – If DFHAID Attention Identifers


(F1 –F24)
Perform Receive- Map – Para three Receive – Map – Exit
Perform Function – Keys – Para three Function – Keys – Exit
Receive – Map – Para

Exec CICS

Receive
MAP(MAPNAME) Copy DFHAID in WS - Section
MAPSET(MAPSETNAME)
End – Exec 01 EIBAID PIC X(4)
88 DFHPF1 Value “F1”
Receive – Map – Exit 88 DFHPF2 Value “F2”
88 DFHEnter Value “Enter”
Exit

Function – Keys – Para

Evaluate EIBAID
When DFHEnter 88 DFHPF24 Value “F24”

Perform validation – logic three validation – logic – exit


When DFHPF3

Pefrom Exit – logic three exit – logic –Exit


When DFHPF10

Perform Insert – logic three Insert – logic – Exit

When DFHPF11

Perform update – logic three update – logic – Exit


When Other
9

Perform Invalid – Key three Invalid – Key – Exit

End – Evaluate

Function – keys – exit In map


1 line --- Header
Exit 23line --- Messages
24 or last --- Footer
Validation – logic

If McnstNoI = Zeroes
Move “Invalid cust. No.” to MMESGO
Exec CICS Move - 1 to McnstNol – Dynomic way to position the cursor
Send
MAP (MAP NAME)
MAPSET(MAPSETNAME)

End – Exec

Exec CICS To Dynamically position the


cursor
Return 1. Move – 1 to Mcnst NoL
Transid(“TR01”) i.e. Lengthfield
2. Send
End – Exec Map (…………….)
End if Map (…………….)
Cursor (200) relative
If Mcnst NoI No is not Numeric cursor position

Move Spaces to MMESGO


Move “Must be Numeric” to MMESGO

Move - 1 to Mcnst NoL


Exec CICS
Send
MAP (MAPNAME)
MAPSET(MAPSETNAME)
End –exec

Exec CICS Send Para

Return

Transid(“TR01”)
End – Exec
End if
If Mcnst NoI (1:1) < > 1
Move Spaces To MMESGO
Move “First digit Must be 1” to MMESGO
Move – 1 To McnstNoL
Exec CICS
Send
10

MAP(MAPNAME)
MAPSET(MAPSET NAME)
End – Exec
Exec CICS
Return
Transid (“TR01”)
End-Exec End-If
Move McnstNoI to (DFHCommArea(1:5)) Ws-Cust-No

If McnstNamI = Spaces

Move “Invalid Name” to MMESGO


Move – 1 toMcnstNamL
Perform Send – Para

End If

Move McnstNamI to(DFHCommArea(6:10)) Ws-Cust-Name

Move Ws-Comm-area to DFHcommArea

CURSOR TECHINQUES:-

 Three Types of Cursor techniques

(i) Static –By specifying i.e in Assembler macro, Cursor can be positioned at
required field.

(ii) Dynamic Cursor position –Dynamically cursor can be positioned by


assigning - 1 to the length field from symbolic map.This technique is used in
application program more frquently

Eg:- Invalid Data validation or to jump from one field to another field

(iii) Relative cursor position – Cursor can be positioned at required location by


specifying relative position relative to zero in the Cursor option with send
map command.

DFH Comm Area:

 System defined global variable which must be declared in linkage section with 01
level no

 Which can be used to pass the data from on program to another program, on
transaction to another transaction.

 Max size area for DFH Comm Area is 65Kbytes


11

PROCEDURE DIVISION :-

Move Spaces to DFH Comm Area


I nitialise DFH Comm Area ----- Aliphanumaric, Numaeric

 To transfer the control from one program to another

We use XCTL

Exec CICS

XCTL
Program (“CICSOOL”)
CommArea(DFHcommArea)
Length (Comm-Length)

End- Exec

 We can use link to transfer the control

 The diff between XCTL &LINK is when we use XCTL the control is not Expected to
back to the screen but when we use link it will expect that the control will back

Exec CICS

LINK

Program(“CICS001”)
CommAre(DFHCommArea)
Length(Comm – length)

End Exec

 If we use F8 Key Page up & F9 for Page down, data is to be transferred from
database to screen.But we use temp area for storing this info.this is call queene

01 Ws-Comm-Area

02 Transfer - data

3 CustNo. PIC 9(5)

02 Save – data

03 CustNo. PIC 9(5)


03 CustName PIC X(20)

02 Multiple – rows
03 Ws-data PIC X(5) access 1,00,000times
12

LINK:-

 Which can be used to transfer the control from one prog to another prog
 Control is expected back to original prog.(no need of explicit CICS command to
transfer back)
 Ef:- Validations

Socket programming
Complex business functionalities

XCTL:-

 Which can be used to transfer the control from one prog. To another Prog.
 Control is not expected back to original prog
 To get the control back to main prog XCITL command must be used in sub program

Eg:- Transfering the control from main menu (prog) to sub prog or subprog to main
menu(Prog)

Link --- to lower level


XCTL --- to same level
Return --- to Higher level

MOVE 30 TO WS_TSO_LEN

Exec CICS Ws - Section


01 Ws -TSQ - AREA
Write Ts 02 Ws –TSQ-CusfNo Pic 59(5)
QUEUE(“TS001”) 02 Ws- TSQ – CustName Pic X(10)
From (Ws-TSQ-AREA) 02 Ws-TSQ – CustLoc Pic X(10)
LENGTH (Ws-TSQ-LEN) 01 Ws-TSQ-LEN Pic 59(4) comp
ITEM(Ws-TSQ-Item)
Main/Aux
If we want to define that Quene auxiliary memory.We have to define Quene id TST table it is
CICS supplied table.

End-Exec

Add + 1 to Ws-TSQ-Item

To define queid in TST exate member &write the following assembler maoro.

USEID SOURCE DFHTST (TS0001)

DFHTST Type = “Queue” TST = Temporary Storage Table

QueID = “TS001”

TO Retrieve the data from queue to structure:-


13

Move +1 to Ws-TSQ-ITEM
Perform until Qzero (End of Queue)

Exec CICS

ReadQ TS
QUEUE (“TS001”)
Into(Ws-TSQ-AREA)
Length(Ws-TSQ-LEN)
Item(Ws-TSQ-Item)

End – Exec

Add +1 to Ws – TSQ – Item


End – Perform

Response Code:- To find the end of the queue

Deleting the Queue:

Exec CICS
DeleteQTS We cannot delete single row in queue
QUEUE(“TS001”) When we apply delete command the queue
End - Exec becomes empty
Queue is global

Up dating The Queue:-

Exec CICS

RewriteQts
From (Ws-TSQ-Area)
Queue(“TS001”)
Length(Ws-TSQ-Len)
Item(Ws-TSQ-Item)

End – Exec

TSQ:- Temporary storage queue

 Which is similar to physical sequential file


 Records entered in entry – sequential order with relative record number
 Records can be sequentially or Random by using item number which must be
defined in Working – Storage Section as separate field
 The Queue name must be user defined i.e. 1-8 Alph numeric characters must be
unique in system
 TSQ can be storage in main memory or Auxiliary memory (QueueID or Queue Name
must be defined in TST(Temp Storage Table) which is CICS supplied table
 TSQ can be used to pass the data within CICS
 TSQ can be used to reduce no. of DB2 calls & improve program efficiency
 TSQ can be used for page up, Page down logic
 TSQ can be used for reporting printing online
 Entire TSQ data can be deleted by using delete command (No specific row deletion)
14

TDQ:- Transient Data Queue

 Used to pass the data from one CICI to another CICS region
 Used to pass the data from CICS to Batch Program

TDQ

Intra Partition Extra Partition

CICS to CICS region CICS to Batch

Delete, Write Delete Write Apply

 While using TSQ, we can read the records any no of times


 While using TDQ, multiple read against TSQ is not possible
 Read is destructive i.e. when we read the queue the data is lost
 Updation is not possible
 Delete can apply to intra partition but not to extra position.

TDQ can be stored in main or auziliary.

If we store in Auxiliary we need to define

Queue ID DCT Table (Destination Control Table)

DFHDCT Type = QUEUF


Type = Intra/ Extra
Queid = “TD001”
Trigerleve = 1000
Program = Cobol

01 Ws-Hd

02 Ws – Sub – He – 1 PIC X(100) value “Customer Details”


02 Ws – Sub – He – 2 PIC X (100) value “Page No”

01 Ws-line PIC X(100) value A;;” ---“

PROCEDURE DIVISION

WRITE Cust - Rep from Ws-Sub-He-1


15

WRITE Cust - Rep from Ws-Line


WRITE Cust – Rep from Ws-Sub – He – 2

TSQ TDQ

 Records entered in entry Sep. order Records entered in entry sep.order with
With relative record number out relative record number

 Multiple read commands can be applied Only one read command can be applied
Against rows against rows (Read is destructive)
 Records can be accessed Sepertially Only sequential access
Or random

 Queue must be defined in TST if the Queue must be defined m DCT


Data store in auxiliary memory (Destination Control Table)

 Can be used to pass the data from Can be used to pass data withinCICS
One prog to another within CICS region region or outside of CICS region like
Batch

Eg:- Report printing, Trigessing Batch Prog


Bb specifying Trigger level

 Updation is passible Updation is not possible

CICS Supplied Tables

PCT -- Program control Table --- Transaction


PPT -- Processing Prog Table -- Program / Mapsets
TCT – Terminal Control Table

DFHPCT TYPE = TRANSACTION


Transid = “TR01”
Program = “CICS001”
Program = “CICS002”

DFHPPT TYPE = Program Type = MAPSET


Program = “CICS001” MAPSET = Mcnstcol
TransID = “TR01” Tra

Das könnte Ihnen auch gefallen