开发者

Assembly Code Programming for z390 Mainframe

开发者 https://www.devze.com 2023-04-11 13:14 出处:网络
Not finished with this problem In this program an unknown problem causes the assembler to reject the code because of apparently unknown macros, or what looks to the assembly like macros. I\'m not s

Not finished with this problem

In this program an unknown problem causes the assembler to reject the code because of apparently unknown macros, or what looks to the assembly like macros. I'm not sure how to correct this.

I'm using the z390 Portable Mainframe Assembler and Emulator (http://www.z390.org/).

Another link: www.z390.org/z390_Documentation.htm

The relevant pdf is at http://tradingwiz.net63.net/pdf/Sessions5and6.pdf.

An assembly manual is at http://publibz.boulder.ibm.com/epubs/pdf/asmr1020.pdf, but I'm having trouble applying it.

Update: I still want to remove the error about "missing macro =DSORG=PS" and I don't know how to tell the assembler where the base register is ("no base register found")

Another question: Are there any resources for this you know of, particularly ones easy to understand?

If you want further information of some kind I'll be happy to help.

        TITLE 'CS 4321 Program #4 by J. Colt Wright'
        PRINT NOGEN    
COPY SUBENTRY

    TITLE 'PROGRAM 4 80/80 LISTING'

    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT


INFILE  DCB   DDNAME=INFILE,    X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=72,         X
              EODAD=EOF,        X
              MACRF=GM          X
*
OUTFILE DCB   DDNAME=OUTFILE,   X
              DSORG=PS,         X
              RECFM=FT,         X
              LRECL=80,         X
              MACRF=PM          
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
          ENDPGM  DS D
          END COPY

20:22:31 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/08/11
20:22:31 PROG4     AZ390 AZ390E error  29      (1/29)211                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/30)212                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/31)213                 LRECL=72,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=72,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/32)214                 EODAD=EOF,        X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/33)215                 MACRF=GM          X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=GM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/36)252                 DSORG=PS,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/37)253                 RECFM=FT,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/38)254                 LRECL=80,         X
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = LRECL=80,
20:22:31 PROG4     AZ390 AZ390E error  29      (1/39)255                 MACRF=PM 
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = MACRF=PM
20:22:31 PROG4     AZ390 AZ390E error  29      (1/43)259                 ENDPGM  DS D
20:22:31 PROG4     AZ390 AZ390I ERRSUM missing macro = ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
20:22:31 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =RECFM=FT,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=72,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =EODAD=EOF,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=GM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =LRECL=80,
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =MACRF=PM
20:22:31 PROG4     AZ390 AZ390E ERRSUM missing macro =ENDPGM
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =8
20:22:31 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
20:22:31 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 10
20:22:32 PROG4     AZ390 开发者_开发百科AZ390I FID=  1 ERR=  10 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
20:22:32 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2420

        TITLE 'CS 4321 Program #4 by J. Colt Wright' 
        PRINT NOGEN    
COPY          SUBENTRY
    TITLE 'PROGRAM 4 80/80 LISTING'
    PRINT NOGEN
COPY2 SUBENTRY

    WTO 'PROG4 COPY PROG4 (ASCII) TO COPY (ASCII)'
    OPEN (INFILE,INPUT)
    OPEN (OUTFILE,OUTPUT)
    WTO 'Files opened successfully'
*
LOOP EQU *
    GET INFILE,IRECORD
    MVC ORECORD,=CL133' '
    MVC ORECORD(80),IRECORD
    PUT OUTFILE,ORECORD
    B LOOP
*
EOF EQU *
    CLOSE (INFILE,,OUTFILE)
    WTO 'PROG4 ENDED OK'
    SUBEXIT

    SUBEXIT   


INFILE  DCB     DDNAME=INFILE,                                         X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=72,                                              X
                EODAD=EOF,                                             X
                MACRF=GM
*
OUTFILE DCB     DDNAME=OUTFILE,    
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=80,                                              X
                MACRF=PM
*
IRECORD DC    CL72' '
ORECORD DC    CL80' '
ENDPGM  DS D
 END COPY


08:39:00 PROG4     MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/09/11
08:39:00 PROG4     AZ390 AZ390E error 144      (1/15)141       MVC ORECORD,=CL133' '
08:39:00 PROG4     AZ390 AZ390I no base register found
08:39:00 PROG4     AZ390 AZ390E error  29      (1/39)258                       DSORG=PS,                                                RECFM=FT,                                                LRECL=80,                                               MACRF=PM
08:39:00 PROG4     AZ390 AZ390I ERRSUM missing macro = DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM Critical Error Summary Option
08:39:00 PROG4     AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
08:39:00 PROG4     AZ390 AZ390E ERRSUM missing macro =DSORG=PS,
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   copy   files =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total missing   macro  files =1
08:39:00 PROG4     AZ390 AZ390E ERRSUM total undefined symbols      =0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total mz390 errors    = 0
08:39:00 PROG4     AZ390 AZ390E ERRSUM total az390 errors    = 2
08:39:01 PROG4     AZ390 AZ390I FID=  1 ERR=   2 c:\Program Files\Automated Software Tools\z390\CS4321\PROG4.MLC
08:39:01 PROG4     MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2374


I'm no expert in the z390 emulator but from what I know of the standard z/OS assembler I'd take a look at your continuation characters (the 'X's in the DCB macro invocations you have coded). Generally they should be in column 72 and the continued statement should start in column 16 of each continued line.

On the last continuation line of your first DCB I'd remove 'X' continuation character on the MACRF=GM as that is the end of your statement.

Also your ENDPGM label should be in column 1 otherwise the assembler thinks it's a statement/macro invocation

Give the z/OS assembler a chance - after 20 or 30 years you'll grow to love it.


Well for the missing macro DSORG=PS ... that is because you don't have a continuation on first line of your OUTFILE DCB macro invocation. The macro invocation runs from the OUTFILE DCB down to the MACRF=PM a few lines later so you need a continuation on all the lines except the last to tell the assembler it is all the one statement. I know the syntax stuff is a pain in the butt but if you persist with the assembler and in particular the macro processor you will find it has some very flexible and elegant capabilities.

As for the missing base register ... could be a few things. As i said i don't know the emulator but it looks as though it is complaining about not having a base register for either the ORECORD or the =CL133' ' literal. I'm guessing it is the latter. Literals are normally located in the code based on the location of an LTORG instruction in your code or at the end of the CSECT. I can't tell from the listing you have whether there is a generated LTORG instruction or not (could be generated by the SUBENTRY or SUBEXIT but they are macro/copybooks specific to your installation so I have no way of knowing what they do other than guessing). The odd thing from looking at it though is you have 2 SUBENTRY statements and 2 SUBEXITS. From guessing what those sort of macros normally do, I would expect 1 of each. So try taking out the COPY2 SUBENTRY and one of the SUBEXITS and see if it is any better. Failing that, see if you can get a full listing of the generated statements with some option in z390 (change the PRINT NOGEN to PRINT GEN for a start) and that may help.

I just finished helping my kids with there homework and now this! Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消