Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 14

IBM MAINFRAMES

CICS Training Class -04

www.mainframes-online-training.weebly.com

Polsani Anil Kumar

Cursor Positioning Technique

Cursor positioning technique is the process of positioning the cursor at


a particular place on the screen

In CICS we have three types :

1. Static cursor positioning


2. Symbolic cursor positioning

3. Relative cursor positioning


Dynamic Positioning
In static we use IC option coded along with the ATTRB
parameter of DFHMDF macro
We need to code MOVE -1 TO symbolic length field of the
map field
Code send control cursor(screen position) for relative
positioning

Program Control Commands

We can control the execution of program with control commands


like

LINK
XCTL
RETURN
LOAD
RELEASE

Link Command

LINK is used to pass control from one application program to


another which is at Lower Logical Level

The calling program (main program) expects the control to


return back

Data can be passed to called program using COMMAREA,


the maximum data can be up to 32 k bytes.

If the called program is not already in main storage then it is


loaded.

LINK Syntax

EXEC CICS LINK


PROGRAM ( SUBPROGRAM NAME)
COMMAREA(WS-DATAITEM)
LENGTH(LENGTH OF WS-COMMAREA)

END-EXEC.

CONDITIONS : PGMIDERR, NOTAUTH, LENGERR

XCTL Command

Used to pass control from one application program to another


in Same Logical Level

The program (main program) from which the control passed


will be released this means the control will not returned back.

Data can be passed to called program using COMMAREA,


the maximum data can be up to 32 k bytes.

If the called program is not already in main storage then it is


loaded.

XCTL Syntax

EXEC CICS XCTL


PROGRAM ( SUBPROGRAM NAME)
COMMAREA(WS-DATAITEM)
LENGTH(LENGTH OF WS-COMMAREA)

END-EXEC

CONDITIONS : PGMIDERR, NOTAUTH, LENGERR

RETURN Command

RETURN command is used to pass the control from one


program to another at a higher logical level OR CICS

Basically return as two formats

RETURN : Task gets terminated and exits the transaction


RETURN TRANSID(TRASNID) : Release the resource
but leaves trans id on the terminal for next task

Return statements play a major role in Pseudo - Conversation


Data can be passed using COMMAREA when returning to
CICS next task

RETURN Syntax
EXEC CICS RETURN
TRANSID(TRAN)
COMMAREA(WS-DATA AREA)
LENGTH(LENGTH OF WS-DATA AREA)
END-EXEC.
(OR)

EXEC CICS RETURN END-EXEC.


Conditions : INVREQ , LENGERR

Application Program Logical Level


CICS
PROG A
LINK
RETURN
PROG B
XCTL

PROG C
LINK
RETURN
PROG D
XCTL

PROG E
RETURN

COMMAREA & DFHCOMMAREA

COMMAREA used to pass data from one program to another


through LINK/XCTL command.

When COMMAREA is passed to subprogram then the sub


program receiving fields should be declared under
DFHCOMMAREA of linkage section only

The length of the COMMAREA and DFHCOMMAREA must


be having same length

Data that got updated in sub program will be automatically


available in main program after return command.

EIBCALEN is set when COMMAREA is passed

Difference between LINK XCTL CALL

The XCTL command passes control to another program, but


the resources requested by the first program may still be
allocated. A task does not end until a RETURN statement is
executed.

While in LINK command, program control resumes its


instruction following the LINK parameter. The disadvantage
of LINK is that it requires that both the calling program and the
called program remain in main memory even though both are
no longer needed.

whenever you do changes to the called program you need to


compile the calling program also.

In case of LINK , it is not needed .

LOAD & RELEASE

The LOAD command retrieves an object program from disk and loads it
into main storage it's primarily used For a constant table that will be
available system-wide.By using this we are reducing the system overhead
EXEC CICS LOAD
PROGRAM( NAME)
SET(POINTER-REF)
LENGTH(DATA-AREA)
END-EXEC
RELEASE is used to release the LOADED program/table/map.

EXEC CICS RELEASE


PROGRAM( NAME)
END-EXEC
Syntax : NOTAUTH, PGMIDERR

Thank You

Polsani Anil Kumar


www.mainframes-online-training.weebly.com

Polsani Anil Kumar

You might also like