- I've scanned this and many other fora for this and got nowhere.
I've RTFMd too and there's no depth in any examples.
I've tried various different approaches...
I want to call BPXWDYN to ALLOC/FREE/unameit and trap the error messages.
s99msg. never has anything, whatever weird errors I try to simulate, here the '.' instead of a ',' in the ALLOC.
Anyone got a nice little bit of working code that does this?
Here's my last futile attempt in function "BPX"...
(Details and comments removed for clarity.
The ABEXIT routine is just a standard error routine to ISPEXEC SETMSG the short&long messages)
- - - - - - - - - - - - - - - - 2 Line(s) not Displayed
sm = "BPXWDYN ERROR"
- - - - - - - - - - - - - - - - 2 Line(s) not Displayed
ADDRESS TSO
CALL SYSCALLS "ON"
PARSE VALUE "" WITH cdd edd
CALL BPX "ALLOC NEW REUSE",
"LRECL(255) RECFM(VB) DSORG(PS) BLKSIZE(32720)",
"RTDDN(SDD) RTDSN(SDS) SPACE(3.3)CYL RELEASE MSG(WTP)"
- - - - - - - - - - - - - - - - 8 Line(s) not Displayed
EXIT
BPX:
ARG __cmd
s99msg. = 0
retc = BPXWDYN(__cmd)
IF( retc<>0 )THEN DO
lm = "CALL BPXWDYN:" __cmd,
"§ENDED RC="retc "X'"C2X(retc)"'"
IF( s99msg.0<>0 )THEN DO
DO i = 1 TO s99msg.0
lm = lm"§"s99msg.i
END
END
ELSE NOP
CALL ABEXIT sm,lm
END
ELSE NOP
RETURN
- - - - - - - - - - - - - - - - 34 Line(s) not Displayed
sm = "BPXWDYN ERROR"
- - - - - - - - - - - - - - - - 2 Line(s) not Displayed
ADDRESS TSO
CALL SYSCALLS "ON"
PARSE VALUE "" WITH cdd edd
CALL BPX "ALLOC NEW REUSE",
"LRECL(255) RECFM(VB) DSORG(PS) BLKSIZE(32720)",
"RTDDN(SDD) RTDSN(SDS) SPACE(3.3)CYL RELEASE MSG(WTP)"
- - - - - - - - - - - - - - - - 8 Line(s) not Displayed
EXIT
BPX:
ARG __cmd
s99msg. = 0
retc = BPXWDYN(__cmd)
IF( retc<>0 )THEN DO
lm = "CALL BPXWDYN:" __cmd,
"§ENDED RC="retc "X'"C2X(retc)"'"
IF( s99msg.0<>0 )THEN DO
DO i = 1 TO s99msg.0
lm = lm"§"s99msg.i
END
END
ELSE NOP
CALL ABEXIT sm,lm
END
ELSE NOP
RETURN
- - - - - - - - - - - - - - - - 34 Line(s) not Displayed
Thanks in advance.