29 lines
894 B
Plaintext
29 lines
894 B
Plaintext
PROC 1 DSN INFORM
|
|
/* GOTDSN: DETERMINE IF THE PERSON TESTING HAS THE DSNAME ALLOCATED
|
|
/* NO PROVISION MADE FOR MEMBERNAME
|
|
/* CONTRIBUTED: DAVID MCRITCHIE, "THE REXX MACROS TOOLBOX", 1989/09/04
|
|
SET INFORM = &SYSCAPS(&INFORM.)
|
|
SET SYSOUTTRAP = 400
|
|
LISTALC STA
|
|
SET N = &SYSOUTLINE
|
|
SET SYSOUTTRAP = 0
|
|
SET I = 1
|
|
SET LP = &STR((
|
|
DO WHILE &I <= &N
|
|
SET DX = &STR(&&SYSOUTLINE&I..)
|
|
SET DX = &STR(&DX.)
|
|
SET IX = &SYSINDEX(&STR(&LP.),&STR(&DX.))
|
|
IF &IX ^= 0 THEN SET DX = &SUBSTR(1:&EVAL(&IX. - 1),&STR(&DX.))
|
|
/* WRITE &IX. _ &DX. _ &DSN. _ &LP.
|
|
IF X&SUBSTR(1:1,&STR(&DX.)) = X&STR( ) THEN GOTO NIX
|
|
IF X&STR(&DX.). = X&STR(&DSN.). THEN DO
|
|
IF INFORM = &INFORM THEN -
|
|
WRITE GOTDSN -- YES YOU ARE ALLOCATED TO &DSN. <---<<
|
|
EXIT CODE(0)
|
|
END
|
|
NIX: -
|
|
SET I = &I. + 1
|
|
END
|
|
IF INFORM = &INFORM THEN -
|
|
WRITE GOTDSN -- YOU ARE NOT ALLOCATED TO &DSN.
|
|
EXIT CODE(4) |