Mainframe Assembler Macro



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

Re: Mainframe Assembler Macro

Postby deathwish73 » Thu Dec 01, 2011 3:04 pm

If it is Low, then we go to Primecheck method

Else, we go to method PRIME
deathwish73
 
Posts: 17
Joined: Fri Nov 18, 2011 2:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Mainframe Assembler Macro

 

Re: Mainframe Assembler Macro

Postby steve-myers » Thu Dec 01, 2011 5:17 pm

deathwish73 wrote:I have a program where we need to convert (have not learned user input) miles/hr to km/hr in assembly.

THe program runs, but it looks wrong. Can someone explain to me how to fix it and what is wrong? Thanks


         PRINT NOGEN                                                   
****************************************************************
*        FILENAME: Convert MI/HR to KM/HR                      *
*        AUTHOR  :                        *
*        SYSTEM  :  pc/370                                     *
*        REMARKS :  Conversion Program                         *
****************************************************************
         START 0                                                       
         REGS
         STM   14,12,12(13)
         BALR  12,0
         USING *,12
         ST    13,SAVEAREA+4
         LA    13,SAVEAREA   
***************************************************************
* Convert Miles/Hour to Km/Hr
***************************************************************
    DP    EARNINGS,CONST   
         MP    EARNINGS,TAXRATE

         MVC   OEARN(16),=XL16'40202020202020206B2020204B202020'
         ED    OEARN(16),EARNINGS
      
    WTO   ' '         
EOFRTN   WTO   OEARN
         WTO   'End of Program Execution'   
       
         L     13,SAVEAREA+4
         LM    14,12,12(13)
         BR    14

EARNINGS DC    PL10'172245'
TAXRATE  DC    PL3'624'
CONST    DC    PL4'1000'
OEARN    DS    CL16

SAVEAREA DS    18F
         END   
You lie. That "program" does not run; the assembly will always fail on the WTO OEARN statement.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Mainframe Assembler Macro

Postby deathwish73 » Thu Dec 01, 2011 11:41 pm

Then how to fix it?
deathwish73
 
Posts: 17
Joined: Fri Nov 18, 2011 2:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Mainframe Assembler Macro

Postby steve-myers » Fri Dec 02, 2011 1:38 am

This has already been discussed in this topic. READ THE PREVIOUS POSTS.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Mainframe Assembler Macro

Postby deathwish73 » Fri Dec 02, 2011 4:37 am

I did, and I put what I had above
deathwish73
 
Posts: 17
Joined: Fri Nov 18, 2011 2:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Mainframe Assembler Macro

Postby steve-myers » Fri Dec 02, 2011 4:38 am

deathwish73 wrote:I did, and I put what I had above
Unlikely. Very unlikely.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Mainframe Assembler Macro

Postby Robert Sample » Fri Dec 02, 2011 5:38 am

If you find and read a z/OS Assembler Services Reference manual (hint: try http://www.ibm.com and search for the title), you will find that WTO has some requirements and limitations that you are totally ignoring. If you get anything from your WTO instructions, it is pure luck.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Mainframe Assembler Macro

Postby BillyBoyo » Fri Dec 02, 2011 6:01 am

deathwish73 wrote:I did, and I put what I had above


You must have read your own posting. Check Mon Nov 28, 2011 2:03 am and 6:05am.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Mainframe Assembler Macro

Postby dick scherrer » Fri Dec 02, 2011 10:28 am

Hello,

And be aware that your topic-timestamps will likely be different as the times i see are as of my local time. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Mainframe Assembler Macro

Postby BillyBoyo » Fri Dec 02, 2011 1:07 pm

Thanks. Well, that's funny. So, Deathwish, look for those times pretending you are on GMT. Or re-read everything.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

PreviousNext

Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post