Page 4 of 5

Re: Mainframe Assembler Macro

PostPosted: Thu Dec 01, 2011 3:04 pm
by deathwish73
If it is Low, then we go to Primecheck method

Else, we go to method PRIME

Re: Mainframe Assembler Macro

PostPosted: Thu Dec 01, 2011 5:17 pm
by steve-myers
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.

Re: Mainframe Assembler Macro

PostPosted: Thu Dec 01, 2011 11:41 pm
by deathwish73
Then how to fix it?

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 1:38 am
by steve-myers
This has already been discussed in this topic. READ THE PREVIOUS POSTS.

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 4:37 am
by deathwish73
I did, and I put what I had above

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 4:38 am
by steve-myers
deathwish73 wrote:I did, and I put what I had above
Unlikely. Very unlikely.

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 5:38 am
by Robert Sample
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.

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 6:01 am
by BillyBoyo
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.

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 10:28 am
by dick scherrer
Hello,

And be aware that your topic-timestamps will likely be different as the times i see are as of my local time. . .

Re: Mainframe Assembler Macro

PostPosted: Fri Dec 02, 2011 1:07 pm
by BillyBoyo
Thanks. Well, that's funny. So, Deathwish, look for those times pretending you are on GMT. Or re-read everything.