IBM Z and LinuxONE IBM Z

  • 1.  Need to get some knowledge on HLASM and Macros

    Posted Fri March 31, 2023 11:09 AM
    Hello!
     
    I am new to this group and need help with some questions. My job profile allows me to work in Mainframe Assembler instructions. However, I'm more interested in learning HLASM, especially the MACROS. Where do I need to start on this site to get the skill? 



    ------------------------------
    ------------------------------
    Avijit Pramanick
    ------------------------------
    ------------------------------


  • 2.  RE: Need to get some knowledge on HLASM and Macros

    Posted Fri March 31, 2023 12:15 PM

    I would suggest you start by downloading the complete documentation that IBM provides for working with HLASM. Here is the link... HLASM publications

    I'm unsure what you mean by interest in macros. Are you interested in writing macros or are you interested in the various IBM supplied macros that access services provided by z/OS or subsystems such as JES, VSAM, etc?



    ------------------------------
    Fred Brandes
    ------------------------------



  • 3.  RE: Need to get some knowledge on HLASM and Macros

    Posted Fri March 31, 2023 01:11 PM

    What background in programming do you have? Other languages you know? Assembler is very different...

     

    I'd say the best overall intro, very detailed but not impossible to follow, is John Ehrman's textbook, available free at http://www.cbttape.org/ftp/asmbook/alnv200.pdf .

     

    I'm not sure that there's any shorcut way to jump in and learn macros without at the same time learning a lot about the target machine instructions. John's book has it all...

    --
    Tony Harminc

    Software Engineering

    Beta Systems Software of Canada Inc.


    Office:  +1-403-618-6600
    Email:tony.harminc@betasystems.com
    http://www.betasystems.com

     






  • 4.  RE: Need to get some knowledge on HLASM and Macros

    Posted Sat April 01, 2023 08:14 PM

    Avijit –

     

    I am going to be somewhat contrary here. Yes, the Ehrman book is absolutely the BEST book on Z assembler. Yes, of course the IBM doc is relevant.

     

    That said, I think assembler is so different, and I think a Z-specific tutorial may not exist – so I am going to suggest you look around for a real tutorial, a real "course," in programming for some platform where tutorials exist and that would be easier to play around on: maybe a Raspberry Pi?

     

    Assembler is real tricky. Let me give you an example. Consider

     

    A = B + C

     

    in some programming language – pretty much any common programming language. It could be Rexx; add a semicolon and it could be C or PL/I; add COMPUTE and a period and it could be COBOL. Now here on the other hand is the same logic in Z assembler:

     

    L   R2,C

    A   R2,B

    ST  R2,A

     

    Completely different, right? And what's more, the C, PL/I or COBOL is valid whether A, B and C are 16, 32 or 64-bit binary fields, or decimal fields. In assembler, on the other hand, my example is only good for 32-bit A, B and C. If they are 16 bits, then the assembler must instead be

     

    LH  R2,C

    AH  R2,B

    STH R2,A

     

    (And if A,B and C are decimal it is COMPLETELY different!)

     

    What's worse, HLASM will not correct you if you get it wrong. If you code L, A and ST when the fields are actually 16 bits, your code will assemble and run without obvious error – but your results will be way, way off.

     

    So I think you need a real tutorial, or someone to sit beside you and help you get over the initial learning curve. I doubt that many of us here learned Z or 360/370/390 assembler utterly on our own out of only a reference book.

     

    Not trying to discourage you. We need more assembler programmers. Good luck!

     

    Charles

     

    Sent from Mail for Windows

     






  • 5.  RE: Need to get some knowledge on HLASM and Macros

    Posted Sat April 01, 2023 08:45 PM

    Jim Elliott | Senior IT Consultant
    GlassHouse Systems Inc. 






  • 6.  RE: Need to get some knowledge on HLASM and Macros

    Posted Sat April 01, 2023 08:50 PM

    Okay, fair enough. I take it halfway back. You could definitely learn to code assembler from that presentation, with two big if's (accounting for my halfway back): (1) that you had a machine to practice on, which the OP may – although many employers would frown on it, especially the first time the code went into a loop and added 50 MSUs to the R4HA; and (2) if you had someone to ask questions of (which the OP may, or may not). If you were in John's SHARE session you could raise your hand, but that opportunity sadly is no longer available.

     

    Charles

     

    Sent from Mail for Windows

     






  • 7.  RE: Need to get some knowledge on HLASM and Macros

    Posted Mon April 03, 2023 09:51 AM

    Hi All,

    I have 7+year of experience  in mainframe system  programming  and I am very much interested on learning high level  assembler and have gone through share Inc presentation and some of POP reference. But yes I agree some one pointed out that learning own assembler is quite difficult. So I am too not sure if any one or anywhere can get tutor or guidance!

    Thanks alot!

    Anant



    ------------------------------
    Anant T
    ------------------------------