IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COND CODE 3976 in "Hello World" Assembler program.


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balimanja

New User


Joined: 14 Aug 2007
Posts: 40
Location: Bangalore

PostPosted: Fri Nov 20, 2009 2:58 pm
Reply with quote

Hello all,

I am getting a condition code of 3976 in a simple assembler program. I am using ASMA90 to create the OBJ module and HEWL to get the LOAD module.

Here is the SYSMSG for the job:
Code:

IEF285I   SYS09324.T030336.RA000.P76139AM.R0230356     DELETED                 
IEF285I   VOL SER NOS= WRK001.                                                 
IEF373I STEP/TEST2001/START 2009324.0303                                       
IEF374I STEP/TEST2001/STOP  2009324.0303 CPU    0MIN 00.01SEC SRB    0MIN 00.00S
IEF236I ALLOC. FOR P76139AM TEST3001                                           
IGD103I SMS ALLOCATED TO DDNAME STEPLIB                                         
IEF237I JES2 ALLOCATED TO SYSPRINT                                             
HELLO WORLD!                                                                   
IEF142I P76139AM TEST3001 - STEP WAS EXECUTED - COND CODE 3976                 
IGD104I AMTULTS.SASMMOD1.LOADLIB                     RETAINED,  DDNAME=STEPLIB 
IEF285I   P76139.P76139AM.JOB04290.D0000103.?          SYSOUT                   
IEF373I STEP/TEST3001/START 2009324.0303                                       
IEF374I STEP/TEST3001/STOP  2009324.0303 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
IEF375I  JOB/P76139AM/START 2009324.0303                                       
IEF376I  JOB/P76139AM/STOP  2009324.0303 CPU    0MIN 00.04SEC SRB    0MIN 00.00S


And here is the code:

Code:

TEST0001 CSECT               
         STM   14,12,12(13) 
         BALR  12,0         
         USING *,12         
         ST    13,SAVE+4     
         LA    13,SAVE       
         WTO   'HELLO WORLD!'
         L     13,SAVE+4     
         LM    14,12,12(13) 
         BR    14           
SAVE     DS    18F           
         END                 


I have worked on Assembler before but to very little extent. I would request any information on how to rectify this. Or, is it safe to get this code?

Thank you very much,
Manjunath.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Nov 20, 2009 3:09 pm
Reply with quote

the standard convention is that the register 15 contains the return code modulo 4096

so the 3976 is the modulo 4096 of the 15 register content at the return from the program

use an sr 15,15 or an slr 15,15 or an xr 15,15 to zero the register 15 content before returning
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Nov 20, 2009 3:40 pm
Reply with quote

or use the return macro
like this :

L 13,SAVE+4
RETURN (14,12),RC=0
Back to top
View user's profile Send private message
balimanja

New User


Joined: 14 Aug 2007
Posts: 40
Location: Bangalore

PostPosted: Sat Nov 21, 2009 8:01 pm
Reply with quote

Thank you Peter and Enrico. I wanted to know if you have used Z390 assembler emulator. I am confused as to what command-line option I need to use to get a program (which reads and writes a file) running. What I mean is, should I type something after "ASMLG Prog1" at the command-line? There are extensive examples of programs that test the DCB parameters, but my hands are tied since I don't know how to trigger them icon_sad.gif . If you could help me on that I would be really grateful to all of you.

The program that I am referring to is:
Code:

*********************************************************************
* Copyright 2005 Automated Software Tools Corporation               *
* This source code is part of z390 assembler/emulator package       *
* The z390 package is distributed under GNU general public license  *
* Author - Don Higgins                                              *
* Date   - 09/30/05                                                 *
*********************************************************************
TESTDCB1 SUBENTRY
         WTO   'TESTDCB1 COPY SYSUT1 ASC TEXT FILE TO SYSUT2 ASC TEXT'
         OPEN  MF=(E,OFILES)
LOOP     EQU   *
         GET   SYSUT1,RECORD
         AP    PTOT,=P'1'
         MVC   DTOT,=X'40202020'
         ED    DTOT,PTOT
         PUT   SYSOUT,MSG
         PUT   SYSUT2,RECORD
         B     LOOP
EOF      CLOSE MF=(E,CFILES)
         WTO   'TESTDCB1 ENDED OK'
         SUBEXIT
OFILES   OPEN  MF=L,(SYSUT1,INPUT,SYSUT2,OUTPUT,SYSOUT,OUTPUT)
CFILES   CLOSE MF=L,(SYSUT1,,SYSUT2,,SYSOUT)
SYSUT1   DCB   DDNAME=SYSUT1,RECFM=FT,LRECL=80,EODAD=EOF,MACRF=GM
SYSUT2   DCB   DDNAME=SYSUT2,RECFM=FT,LRECL=80,MACRF=PM
SYSOUT   DCB   DDNAME=SYSOUT,RECFM=FT,BLKSIZE=120,MACRF=PM
PTOT     DC    PL2'0'
MSG      DS    0CL120
         DC    C'REC#='
DTOT     DC    CL4' ',C' TEXT='
RECORD   DC    CL80' '
         DC    (MSG+120-*)C' '
         DCBD
         END


Enrico, I did do both RTFM & STFW icon_smile.gif , but could not find any help. So, I ask you to help me out of the experience that you have.

Thank you,
Manjunath...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Sat Nov 21, 2009 8:27 pm
Reply with quote

Hi Manjunath!

I am afraid that I cannot be of too much help ...
I do not work on a windows platfor but on a MAC OS X which is a "linux like" opsys so the hints I can give You are of very little help
( apart the fact that since the gentlemen do not support mac os x had to tweak things quite a lot to test it )

the ASMLG command must be issue after starting the z390 full screen interface/shell

as described here ...
z390.org/z390_Windows_Support.htm
Back to top
View user's profile Send private message
balimanja

New User


Joined: 14 Aug 2007
Posts: 40
Location: Bangalore

PostPosted: Mon Nov 23, 2009 5:40 pm
Reply with quote

Thanks all. I will try to find a way to solve it and if found I will post it here... icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top