Planet MVS Dave's unofficial HLASM web page Dave's S/390 Assembler FAQ Top Ten |
You'll get a S0C1, S0C4 or some other nasties.USING csect,R12,R11,R10 ... ... BAS R10,do_something
Buried somewhere in your program is: TM field,value BE herebut you needed this code: TM field,value BO here
I'd like to thank Gilbert Saint-flour for sending me this suggestion.
Loc Object Code Addr1 Addr2 Stmt Source Statement 000000 00000 00011 1 MYCSECT CSECT , R:F 00000 2 USING *,R15 3 * 000000 D500 F00C 00F1 0000C 000F1 4 CLC FLAG,C'1' 5 * 000006 D500 F00C F010 0000C 00010 6 CLC FLAG,=C'1' 7 * 00000C F1 8 FLAG DC C'1' 9 * 000010 10 LTORG , 000010 F1 11 =C'1'
In this case, the only way to find the error was to check the expansion of the Macro to see how it used the LENGTH= operand.
This is what was intented:
LA R6,32 length for obtain STORAGE OBTAIN,LENGTH=(6),ADDR=(7),LOC=ANY + CNOP 0,4 + B IHB0001B .BRANCH AROUND DATA +IHB0001F DC BL1'00000000' .FLAGS @D5C + DC AL1(0*16) .KEY + DC AL1(0) .SUBPOOL + DC BL1'00110010' .FLAGS +IHB0001B DS 0F + LR 0,6 .STORAGE LENGTH + L 15,IHB0001F .CONTROL INFORMATION + L 14,16(0,0) .CVT ADDRESS + L 14,772(14,0) .ADDR SYST LINKAGE TABLE + L 14,160(14,0) .OBTAIN LX/EX FOR OBTAIN + PC 0(14) .PC TO STORAGE RTN + LR 7,1 .SAVE ADDR OF STORAGEThis STORAGE OBTAIN is incorrect and gets 6 bytes and not 32:
LA R6,32 length for obtain STORAGE OBTAIN,LENGTH=6,ADDR=(7),LOC=ANY + CNOP 0,4 + B IHB0002B .BRANCH AROUND DATA +IHB0002L DC A(6) .STORAGE LENGTH +IHB0002F DC BL1'00000000' .FLAGS @D5C + DC AL1(0*16) .KEY + DC AL1(0) .SUBPOOL + DC BL1'00110010' .FLAGS +IHB0002B DS 0F + L 0,IHB0002L .STORAGE LENGTH + L 15,IHB0002F .CONTROL INFORMATION + L 14,16(0,0) .CVT ADDRESS + L 14,772(14,0) .ADDR SYST LINKAGE TABLE + L 14,160(14,0) .OBTAIN LX/EX FOR OBTAIN + PC 0(14) .PC TO STORAGE RTN + LR 7,1 .SAVE ADDR OF STORAGE
ROCKGRPS ISFNTBL PAGE,1,PLANT,1,JAGGER,1,RICHARDS,1 X LENNON,1,MCCART,1 |
ROCKGRPS ISFNTBL PAGE,1,PLANT,1,JAGGER,1,RICHARDS,1, X LENNON,1,MCCART,1 |
|
A_EC B A_ECL(0,R15) Branch past EyeCatcher DC AL1(A_ECE-A_ECV) Length of Eyecatcher A_ECV DC C'CSECTA - &SYSDATC &SYSTIME - ' DC C'program description here' A_ECE EQU * DS 0H A_ECL EQU *-A_EC |
See how nice it is to have the Eyecatcher on CSECTA, CSECTB and CSECTD and the loss of information on CSECTC which doesn't have one.SAVE AREA TRACE PROCEEDING FORWARD FROM TCBFSA NAME=SAMPEC WAS ENTERED VIA LINK AT EP CSECTA - 19990623 10.47 - Main CSECT in SAMPEC: Calls CSECTB SA 00005FA8 WD1 00000000 HSA 00000000 LSA 00006DDC RET 80FD0310 EPA 00006D78 R0 FD000008 R1 00005FF8 R2 00000040 R3 009DB7D4 R4 009DB7B0 R5 009F9120 R6 009A5FF8 R7 FD000000 R8 009F9000 R9 009F93A0 R10 00000000 R11 009F9120 R12 00E62612 NAME=SAMPEC WAS ENTERED VIA CALL AT EP CSECTB - 19990623 10.47 - Calls CSECTC which has no eyecatcher SA 00006DDC WD1 00000000 HSA 00005FA8 LSA 00006E94 RET 40006DD2 EPA 00006E28 R0 FD000008 R1 00005FF8 R2 00000040 R3 009DB7D4 R4 009DB7B0 R5 009F9120 R6 009A5FF8 R7 FD000000 R8 009F9000 R9 009F93A0 R10 00000000 R11 009F9120 R12 00006D78 Note: the next entry is for CSECTC which does NOT have a Standard OS eyecatcher Notice how we are in the dark with no "AT EP yada yada yada" information! NAME=SAMPEC WAS ENTERED VIA CALL SA 00006E94 WD1 00000000 HSA 00006DDC LSA 00006F0C RET 40006E8E EPA 00006EE0 R0 FD000008 R1 00005FF8 R2 00000040 R3 009DB7D4 R4 009DB7B0 R5 009F9120 R6 009A5FF8 R7 FD000000 R8 009F9000 R9 009F93A0 R10 00000000 R11 009F9120 R12 00006E28 NAME=SAMPEC WAS ENTERED VIA CALL AT EP CSECTD - 19990623 10.47 - We ABEND to show Save Area Trace SA 00006F0C WD1 00000000 HSA 00006E94 LSA 00006FB8 RET 40006F02 EPA 00006F58 R0 FD000008 R1 00005FF8 R2 00000040 R3 009DB7D4 R4 009DB7B0 R5 009F9120 R6 009A5FF8 R7 FD000000 R8 009F9000 R9 009F93A0 R10 00000000 R11 009F9120 R12 00006EE0 SA 00006FB8 WD1 00000000 HSA 00006F0C LSA 00000000 RET 00000000 EPA 00000000 R0 00000000 R1 00000000 R2 00000000 R3 00000000 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 INTERRUPT AT 00006FB6 PROCEEDING BACK VIA REG 13 SA 00006FB8 WD1 00000000 HSA 00006F0C LSA 00000000 RET 00000000 EPA 00000000 R0 00000000 R1 00000000 R2 00000000 R3 00000000 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 NAME=SAMPEC WAS ENTERED VIA CALL AT EP CSECTD - 19990623 10.47 - We ABEND to show Save Area Trace SA 00006F0C WD1 00000000 HSA 00006E94 LSA 00006FB8 RET 40006F02 EPA 00006F58 R0 FD000008 R1 00005FF8 R2 00000040 R3 009DB7D4 R4 009DB7B0 R5 009F9120 R6 009A5FF8 R7 FD000000 R8 009F9000 R9 009F93A0 R10 00000000 R11 009F9120 R12 00006EE0
MYAREA DSECT , MYAREA_ID DS CL8'MYAREA' ...other fields here... MYAREA_END DS CL4'END '
Dave's S/390 Assembler FAQ web page IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |