ABEND S0C1 REASON 001



High Level Assembler(HLASM) for MVS & VM & VSE

ABEND S0C1 REASON 001

Postby sngxd » Wed Mar 21, 2018 2:22 am

Hello folks

Could you please someone help me on that?

This is my call into a program

INITM720 CALL  UTDIPU,(UTDDDNAM,UTDIPDEV,UTDIPADR,UTDIPPRT)            
         LTR   15,15                                                  
         BNZ   NOTFOUND                                                
         SPACE                                                        
         MVC   UNITMSG+18(3),UTDIPDEV  INSERT UNIT NAME IN MESSAGE    
         WTO   MF=(E,UNITMSG)          ISSUE MESSAGE                  
         MVC   ZUNITADR,UTDIPDEV                                      
         SR    R15,R15                                                
         B     RETURN                                                  
         BR    14                                                      
NOTFOUND EQU   *                                                      
         WTO   'DPSPUNCH UNIT NOT FOUND'                              
RETURN   EQU   *                                                      
         L     14,SAVER14                                              
         BR    14                                                      
UTDDDNAM DC    CL8'DPSPUNCH'           DDNAME OF DEVICE                
UTDIPDEV DC    C'    '                 EBCDIC DEVICE NUMBER (TCPIP)    
UTDIPADR DC    F'0'                    IP ADDRESS OF ATTACHED DVD TOWER
UTDIPPRT DC    H'0'                    PORT NUMBER OF ATTACHED TOWER  
SAVER13  DS    F                                                      
SAVER14  DS    F                                                      
STACK    DS    18F                                                    
UNITMSG  WTO   'DPSPUNCH UNIT=XXXX',ROUTCDE=(3,5,11),DESC=(2),MF=L    
            SPACE
 


When I run I am always receving

IEA995I SYMPTOM DUMP OUTPUT                              
SYSTEM COMPLETION CODE=0C1  REASON CODE=00000001          
 TIME=14.45.05  SEQ=15860  CPU=0000  ASID=00ED            
 PSW AT TIME OF ERROR  073D1000   80000002  ILC 2  INTC 01
   NO ACTIVE MODULE FOUND                                
   NAME=UNKNOWN                                          
   DATA AT PSW  00000000 - 000A0000  000130E1  00000000  
   GR 0: 00001968   1: 00009388                          
      2: 0000A000   3: 00014128                          
      4: 0000A000   5: 00000000                          
      6: 0009F000   7: 0000004B                          
      8: 00007E00   9: 00108378                          
      A: 80106000   B: 00107000                          
      C: 00009000   D: 00006D50                          
      E: 801064D8   F: 00000000                          
 END OF SYMPTOM DUMP            
 


The call of another module is happening as expected , because I receive the correct output, but after that get error

DPSPUNCH UNIT=0CCX                                              
DPS0503E(BLT) ESTAE ENTERED FOR ABEND S0C1 REASON 001 IN JOB ASMTEST2 <=========
IEA995I SYMPTOM DUMP OUTPUT                                                    
SYSTEM COMPLETION CODE=0C1  REASON CODE=00000001                                
 TIME=14.45.05  SEQ=15860  CPU=0000  ASID=00ED                                  
 PSW AT TIME OF ERROR  073D1000   80000002  ILC 2  INTC 01                      
   NO ACTIVE MODULE FOUND                                                      
   NAME=UNKNOWN                                                                
   DATA AT PSW  00000000 - 000A0000  000130E1  00000000                        
   GR 0: 00001968   1: 00009388                                                
      2: 0000A000   3: 00014128                                                
      4: 0000A000   5: 00000000                                                
      6: 0009F000   7: 0000004B                                                
      8: 00007E00   9: 00108378                                                
      A: 80106000   B: 00107000                                                
      C: 00009000   D: 00006D50                                                
      E: 801064D8   F: 00000000                                                
 END OF SYMPTOM DUMP                                                            
IEF472I ASMTEST2 BUILD - COMPLETION CODE - SYSTEM=0C1 USER=0000 REASON=00000001




CODE' d
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: ABEND S0C1 REASON 001

 

Re: ABEND S0C1 REASON 001

Postby enrico-sorichetti » Wed Mar 21, 2018 2:32 am

look at the manuals on how to setup a proper savearea chain
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2728
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 140 times

Re: ABEND S0C1 REASON 001

Postby Robert Sample » Wed Mar 21, 2018 3:02 am

What is the AMODE / RMODE of your program? What is the AMODE / RMODE of UTDIPU? The S0C1 could be due to AMODE / RMODE issues, or the called program cannot be found (did you link it into your load module or is it in the STEPLIB for your program?), among other reasons.
Robert Sample
Global moderator
 
Posts: 3507
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 248 times

Re: ABEND S0C1 REASON 001

Postby steve-myers » Wed Mar 21, 2018 4:18 am

Since you are not showing the complete routine, we can only speculate.
  1. As Mr. Sorichetti says, when you define a subroutine that is called from another program, you must prepare to return to that program. This is what Mr. Sorichetti means. The exact things your program must do.
    1. Save the registers your program is going to use into the register save area the program that called your program must supply. The IBM provided SAVE macro is a good way to do this
    2. If your program is going to call another program or it is going to use the common I/O macros like GET, PUT, READ, WRITE and CHECK, your program must prepare a new register save area. Ideally, this register save area must be linked to the chain of save areas. Most of my programs look like this
      MYPGM    CSECT
               SAVE  (14,12),,*
               BALR  12,0
               USING *,12
               LA    15,SAVEAREA
               ST    13,4(,15)
               ST    15,8(,13)
               LR    13,15
      ***** Insert your code here *****
               L     13,4(,13)
               RETURN (14,12),RC=0
      SAVEAREA DC    9D'0'
               ...
      The most common register save area requires 72 bytes; this is what 9 8 byte double words provides.
      I also prefer my register save areas to be double word aligned.
    3. You must restore all of the registers your program used to their contents when your program was entered before it returns. Registers 15, 0, and 1 are exceptions to this rule. Register 15 is often used as a return code, and registers 0 and 1 can be used for other purposes.
Now this scheme is not without issues.
  • Most of the time too many registers are saved and restored. This is the most expensive part of the call/return scheme.
  • Experts in how the hardware actually works do not like how the SAVE macro expands. The issues are really too subtle for most of us.
In the 1990s, responding to issues with C++ performance, which, essentially by design, calls a lot of very small routines, IBM traced part of the problem to the traditional entry/exit process like is used in my example. IBM devised an alternate way to handle this process called XPLINK. XPLINK, among other things, reduces the number of registers that are saved and restored by most subroutines. We, as Assembler programmers, can think about this. It turns out we don't always use a lot of registers, and by careful thought, we do not have to save and restore essentially all the registers as my little sample does.

Many installations provide macros to handle the entry and exit code. I have never liked these macros. There are a number of significant variations, and many of these macros provide a multitude of operands to direct the way the macros expand that are confusing, even if they are used. I much prefer to stick to SAVE and RETURN, and handle the variations as required without depending on macros. Of course, all too often I goof, and it often leaves a confusing mess that takes some effort to analyze.

Mr. Sample mentioned AMODE and RMODE. This can be important. I can see the system was in AMODE 31 when the program failed, and register 14 - surprise! - has what appears to be an AMODE 31 address in it. The remaining registers are indeterminate. The contents of register 12 suggest, but does not prove, this is a directly called (from JCL) RMODE 24 program. There are many reasons a program branches to location 0, which certainly appears to be what happened here, but there is insufficient information here to try to determine the true cause.
steve-myers
Global moderator
 
Posts: 1932
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 206 times

Re: ABEND S0C1 REASON 001

Postby sngxd » Wed Mar 21, 2018 6:59 am

Hello folks this is the call that works :
UTDIPUT  CSECT                                                          
          LR    12,15                                                    
          USING UTDIPUT,12                                              
          ST    14,SAVER14                                              
          ST    13,SAVER13                                              
          LA    13,STACK                                                
          CALL  UTDIPU,(UTDDDNAM,UTDIPDEV,UTDIPADR,UTDIPPRT)            
          L     13,SAVER13                                              
          LTR   15,15                     IF TCPIP DEVICE                
          BNZ   NOTFOUND                                                
          MVC   UNITMSG+18(4),UTDIPDEV  INSERT UNIT NAME IN MESSAGE      
          WTO   MF=(E,UNITMSG)          ISSUE MESSAGE                    
          B     RETURN                                                  
 NOTFOUND EQU   *                                                        
          WTO   'DPSPUNCH UNIT NOT FOUND'                                
 RETURN   EQU   *                                                        
          L     14,SAVER14                                              
          BR    14                                                      
 UTDDDNAM DC    CL8'DPSPUNCH'           DDNAME OF DEVICE                
 UTDIPDEV DC    C'    '                 EBCDIC DEVICE NUMBER (TCPIP)    
 UTDIPADR DC    F'0'                    IP ADDRESS OF ATTACHED DVD TOWER
 UTDIPPRT DC    H'0'                    PORT NUMBER OF ATTACHED TOWER    
 SAVER13  DS    F                                                        
 SAVER14  DS    F                                                        
 STACK    DS    18F                                                      
 UNITMSG  WTO   'DPSPUNCH UNIT=XXXX',ROUTCDE=(3,5,11),DESC=(2),MF=L      
          END


So I have tried just copy it to the big program just changing the UTDIPUT SECT for INITM730 and tried to run but I received some issues when try compile.
Sorry I am new in assembler codes and I am just figure out how make it run into the main program

*** coded ***
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: ABEND S0C1 REASON 001

Postby steve-myers » Wed Mar 21, 2018 7:10 am

You're lucky it worked. You did not save and restore registers you modified - register 12 - before your return.
steve-myers
Global moderator
 
Posts: 1932
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 206 times

Re: ABEND S0C1 REASON 001

Postby sngxd » Wed Mar 21, 2018 7:28 am

Yes but my problem is trying to put into in the main code, this is just a simple called

Then I change it into the code like :

          SPACE                                                          
 INITM720 CSECT                                                          
          LR    12,15                                                    
          USING *,12                                                    
          ST    14,SAVER14                                              
          ST    13,SAVER13                                              
          LA    13,STACK                                                
          CALL  UTDIPU,(UTDDDNAM,UTDIPDEV,UTDIPADR,UTDIPPRT)            
          L     13,SAVER13                                              
          LTR   15,15                     IF TCPIP DEVICE                
          BNZ   NOTFOUND                                                
          MVC   UNITMSG+18(4),UTDIPDEV  INSERT UNIT NAME IN MESSAGE      
          WTO   MF=(E,UNITMSG)          ISSUE MESSAGE                    
          B     RETURN                                                  
 NOTFOUND EQU   *                                                        
          WTO   'DPSPUNCH UNIT NOT FOUND'                                
 RETURN   EQU   *                                                        
          L     14,SAVER14                                              
          BR    14                                                      
 UTDDDNAM DC    CL8'DPSPUNCH'           DDNAME OF DEVICE                
 UTDIPDEV DC    C'    '                 EBCDIC DEVICE NUMBER (TCPIP)    
 UTDIPADR DC    F'0'                    IP ADDRESS OF ATTACHED DVD TOWER
 UTDIPPRT DC    H'0'                    PORT NUMBER OF ATTACHED TOWER    
 SAVER13  DS    F                                                        
 SAVER14  DS    F                                                        
 STACK    DS    18F                                                      
 UNITMSG  WTO   'DPSPUNCH UNIT=XXXX',ROUTCDE=(3,5,11),DESC=(2),MF=L      
          SPACE                                                          
 *----------------------------------------------------------------------
 *   GETMAIN DEPENDENCY TABLE TO HOLD PREREQ AND SUPERSEDE NAMES        
 *----------------------------------------------------------------------
          SPACE                                                          
 INITM740 TM    O1FLAG,O1BROWSE         ARE WE RUNNING BROWSE      Z939  
          BO    INITM770                BIY                        Z939  
          SPACE                                                          
          L     XW,=A(QADEPSIZ)         DEPENDENCY TABLE SIZE      Z256  
          SPACE                                                          
          GETMAIN RU,LV=(XW),SP=LOCSPN,LOC=(ANY,ANY)  GET ABOVE    Z256  
          SPACE                                                          
          ST    REG1,QADEPTAB           SET DEPENDENCY TABLE ADDR  Z256  
          ST    REG1,QADEPUSE           SET LAST SLOT USED ADDR    Z256  
          AR    REG1,XW                 END OF DEPENDENCY TABLE    Z256  
          ST    REG1,QADEPTOP           STORE TABLE END ADDRESS    Z256  
          EJECT                                                          
 *----------------------------------------------------------------------
 *   LOAD I/O AND DUPLICATE PROCESSOR IF UPDATE EXECUTION                
 *----------------------------------------------------------------------
          SPACE                                                          
          TM    JFLAG,JUPDATE           INPUT OR CONTROL RUN            
          BZ    INITM750                BRANCH IF NOT                    
          SPACE                                                          
          LOAD  EP=DPSGETIN             GENERAL INPUT READ MODULE  Z463  
          ST    REG0,QVGETIN            SAVE ENTRY POINT                
          SPACE                    
 


Just changed the UTDIPUT to INITM720 and in the end of file , change the "end" to "space" and I got return code 8 when try compile


     215 Statements Flagged in this Assembly        8 was Highest Severity Code                                          
 0HIGH LEVEL ASSEMBLER, 5696-234, RELEASE 6.0, PTF UI50739                                                                
 0SYSTEM: z/OS 02.02.00              JOBNAME: QUVS2A      STEPNAME: DPSINSYS   PROCSTEP: (NOPROC)                          
 0Unicode Module:   ASMA047C   From Page     1148   To Page    17584           ECECP: International 1                      
  Data Sets Allocated for this Assembly                                                                                    
   Con DDname   Data Set Name                                Volume  Member                                                
    P1 SYSIN    DPS.SOURCE.ASM                               PR0004  DPSINSYS                                              
    L1 SYSLIB   DPS.MACRO.ASM                                PR0004                                                        
    L2          DPS.UTD.MACRO                                PR0000                                                        
    L3          SYS1.MACLIB                                  MFLS11                                                        
 1                                  Diagnostic Cross Reference and Assembler Summary                             Page  432
 -                                                                                            HLASM R6.0  2018/03/21 01.43
 0  L4          SYS1.MODGEN                                  MFLS11                                                        
       SYSLIN   SYS18080.T014303.RA000.QUVS2A.OBJ.H01                                                                      
       SYSPRINT QUVS2.ASM.LIST                               PR0004

Coded for you - yet again. Please use the code tags when posting code and data
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post