Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SOC4 abend in Assembler program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Jun 16, 2011 4:02 pm    Post subject: SOC4 abend in Assembler program
Reply with quote

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
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Thu Jun 16, 2011 4:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Jun 16, 2011 4:29 pm    Post subject: Reply to: SOC4 abend in Assembler program
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jun 16, 2011 6:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Thu Jun 16, 2011 11:04 pm    Post subject:
Reply with quote

looks as if no lessons learnt from http://ibmmainframes.com/about54725.html

disappointing...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 16, 2011 11:57 pm    Post subject:
Reply with quote

Hello Vinay,

You might be better served in our Student and Fresher Forum - http://www.ibmmainframeforum.com/

While we don't have the resources to "teach", some topics do go into some depth.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Sr SW Eng-Rocket Software (Assembler,... Kenneth Barton Lasky Mainframe Jobs 0 Fri Aug 25, 2017 12:29 am
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us