View previous topic :: View next topic
Author
Message
vinayknj New User Joined: 26 May 2008Posts: 50 Location: Bangalore
I have written simple test program as below. I don't unerstand the reason for SOC4 abend.
Code:
TESTPGM2 START
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
* SAVE (14,12)
USING *,R15
BALR R15,R0
BCTR R15,R0
BCTR R15,R0
STM R14,R12,12(R13)
LA R14,SAVE18
ST R13,4(R0,R14)
ST R14,8(R0,R13)
LR R13,R14
* XR R0,R0
* MVZ INSTRUCTION
*
LA R3,OP1
WTO 'DATA BEFORE MVZ'
WTO TEXT=(R3),ROUTCDE=11
MVZ 3(5,R3),2(R3)
WTO 'DATA AFTER MVZ'
WTO TEXT=(R3),ROUTCDE=11
* MVN INSTRUCTION
*
LA R4,OP2
WTO 'DATA IN OP2 FOR MVN'
WTO TEXT=(R4),ROUTCDE=11
LA R5,OP3
MVN 2(4,R5),2(R4)
WTO 'RESULT OF MVN'
WTO TEXT=(R5),ROUTCDE=11
***
LR R14,R13
L R13,4(R0,R14)
LM R14,R12,12(R13)
LA R15,0
* BR R14
RETURN (14,12),RC=0
ERROR1 WTO 'END-OF-FILE REACHED'
* DATA FIELDS FOR MNZ, MVN OPERATIONS
OP1 DC H'06'
DC CL6'1B3D5F'
OP2 DC H'04'
DC CL4'7890'
OP3 DC H'06'
DC CL6'123456'
TEMP1 DC H'03'
DC CL3' '
*
SAVE18 DS 18F
*
ADDFLD DSECT
OPERTNA DC CL3' '
FILLER1A DC C' '
ADD1A DC FL4'30'
FILLER2A DC C' '
ADD2A DC HL2'20'
FILLER3A DC C' '
RESULTA DC FL4'0'
FILLER4A DC CL64' '
*
END
Please let me know if anything wrong in the above code. Thanks[/i]
Back to top
Nic Clouston Global Moderator Joined: 10 May 2007Posts: 2455 Location: Hampshire, UK
Possibly because you are using R15 as your base register but I believe things like WTO modify it. Use another register as your base register (R12 seems popular).
Back to top
Bill O'Boyle CICS Moderator Joined: 14 Jan 2008Posts: 2501 Location: Atlanta, Georgia, USA
Here's some similar advice from last time -
Code:
TESTPGM2 CSECT BEGIN CSECT
SAVE (14,12) SAVE REGISTERS
BALR R12,0 R12 IS BASE-REGISTER
USING *,R12 INFORM ASSEMBLER
******** BCTR R15,R0
******** BCTR R15,R0
******** STM R14,R12,12(R13)
******** LR R14,R13
L R13,4(,R13) RESTORE CALLER'S R13
XR R15,R15 ENSURE X'00'S
RETURN (14,12),RC=(15) RESTORE AND RETURN
******** LR R14,R13
******** L R13,4(R0,R14)
******** LM R14,R12,12(R13)
******** LA R15,0
******** BR R14
Any label in a DSECT defined as a "DC" is considered to be comments as they are treated as "DS".
You are overcomplicating things.
I will not post any more advice.
Bill
Back to top
Garry Carroll Senior Member Joined: 08 May 2006Posts: 1193 Location: Dublin, Ireland
I'm with Bill.
You seem to want to use the forum as a 'teach me' resource - which it is NOT!! .
Garry
Back to top
nigelosberry New User Joined: 06 Jan 2009Posts: 88 Location: Ggn, IN
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello Vinay,
You might be better served in our Student and Fresher Forum - www.ibmmainframeforum.com/
While we don't have the resources to "teach", some topics do go into some depth.
Back to top
Please enable JavaScript!