A curious thing happened to me on my old job. There, they use IBM MVS/ESA. I needed to call the program 'SYSRACF' for security purposes in the program.
So when I coded it, at first, I made it a dynamic call. I had a WS field coded:
01 PROGRAM-NAME PIC X(8) VALUE SPACES.
The field was defined with 8 bytes because most of our program names had 8 characters in it. But the program name 'SYSRACF' has only 7 bytes.
So I had to make the call to SYSRACF:
MOVE 'SYSRACF' TO PROGRAM-NAME.
CALL PROGRAM-NAME USING CHECK-SECURITY-DATA.
And I got a bad return code. Investigating it further using InterTest (debugging tool for CICS programs), I found that the name being passed was 'SYSRACF[low-value]'.
Of course the system didn't recognize any program called 'SYSRACF[low-value]'. For whatever reason, the final low-value byte wasn't truncated.
But when I made a static call i.e.
CALL 'SYSRACF' USING CHECK-SECURITY-DATA.
It worked just fine. InterTest showed that the system saw the field as 'SYSRACF' without the low-value.
Any ideas as to why this happens, anyone? Curious minds want to know.
Nina Too