|
From: Steve Richter <srichter@AutoCoder.com> Maybe I was a bit hasty. The situation is like this: I tried the following program "TEST" (I'm running at level 50). DCL DD RESOLVE CHAR(34); ... DCL SYSPTR .SYSPGM; DCL SPCPTR .SPCPGM; DCL DD PGAS CHAR(1024) BAS(.SPCPGM); CPYBLA RESOLVE-TYPE, X'0201'; CPYBLAP RESOLVE-NAME, "TEST", " "; RSLVSP .SYSPGM, RESOLVE, *, *; SETSPPFP .SPCPGM, .SYSPGM; BRK "1"; RTX *; Then CRTMIPGM TEST STRDBG TEST ADDBKP STMT(1) PGMVAR(('PGAS' ())) OUTFMT(*HEX) CALL TEST and got: CPF1989 Domain violation occurred for variable PGAS. Then CALL MAKESYS TEST (don't try this; it is my homegrown program to make system state) then CALL TEST This time no error message. This was my rationale for my statement that your program needed to be system state. But I was not happy with this. In fact, the actual domains for both the program and its associated state were both USER, so what was going on? Next step, change the program as follows: DCL DD PGAS CHAR(1024) BAS(.SPCPGM); DCL DD DATA CHAR(1024); CPYBLA RESOLVE-TYPE, X'0201'; CPYBLAP RESOLVE-NAME, "TEST", " "; RSLVSP .SYSPGM, RESOLVE, *, *; SETSPPFP .SPCPGM, .SYSPGM; CPYBLA DATA, PGAS; BRK "1"; RTX *; compile, start the debugger, then ADDBKP STMT(1) PGMVAR(('DATA' ())) OUTFMT(*HEX) CALL TEST NO ERROR ! The debugger shows what is in DATA. This is somewhat puzzling (a bug, I think, although I'm waiting to hear the WAD argument). So, it seems that accessing PGAS directly leads to an error, but copying PGAS into DATA, and then accessing DATA is OK. In any case the SETSPPFP instruction is not the problem, so you can get a pointer to PGAS even at level 50.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.