Cobol – IBM SC34-6814-04 User Manual

Page 552

Advertising
background image

COBOL

Figure 41 on page 531, in COBOL, redefines the NETNAME, so that the last four
characters are used to select a more suitable model than that selected in the
sample control program.

*

R7 now points to model name

VALIDT

CLI

SELECTED_MODELNAME,C’ ’

MTS model name supplied?

BNE

VALIDM1

Yes

LH

R6,MODELNAME_COUNT

Count of models

LTR

R6,R6

Were any presented?

BZ

RETURN

No

LA

R8,MODELNAME

First model name

*
LOOP2

CLC

8(8,R7),0(R8)

Is this model name here?

BE

VALIDM

*

LA

R8,L’MODELNAME(R8)

Next model name

BCT

R6,LOOP2

*
*

Now we know the required model name was not presented

*

to this exit by CICS, a return rejects the logon

*

B

RETURN

*
*

At this point the model name was found in those presented

*

It is given to CICS and the new termid is

*

the netname

*
VALIDM

MVC

SELECTED_MODELNAME,0(R8)

R8 was left pointing at

*

model name

VALIDM1

DS

0H

MVC

SELECTED_TERM_ID,NETNAME

Use netname for termid

*

(4 chars)

*
*
* SELECTIONS COMPLETE, RETURN
*

MVI

SELECTED_RETURN_CODE,X’00’

Indicate all OK

B

RETURN

Exit program

*
*

Table of netnames allowed to log on and the model name

*

necessary for the logon to be successful

*
*

Format of table :

*

Bytes 1

to

8

Netname allowed to log on

*

9

to

16

Model required for netname

*

DS

0D

TABLE

DC

CL8’L77A’,CL8’3270064’

DC

CL8’L77B’,CL8’3270065’

TABLEN

DC

Y((*-TABLE)/16)

*

Figure 40. Example of how to customize the DFHZATDX sample program (part 2)

530

Customization Guide

Advertising