Why is There Air (Assembler)



Why is There Air (Assembler)

Postby RISCCISCInstSet » Sun Oct 30, 2011 10:37 pm

Actually, I'm looking for someone to tell me something about how to define a symbol in z/OS assember. (z390 emulator)

:mrgreen:
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby Robert Sample » Mon Oct 31, 2011 1:43 am

how to define a symbol in z/OS assember
You need to be more precise -- do you want to define a MACRO symbol, a variable, a constant, a label for an instruction, or what?

And this is a HELP forum -- not a TEACHING forum. If you want instruction, you would vastly be better off getting it from a school or even by reading a book rather than posting questions here.

These users thanked the author Robert Sample for the post:
RISCCISCInstSet (Mon Nov 12, 2012 5:20 am)
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Why is There Air (Assembler)

Postby RISCCISCInstSet » Mon Oct 31, 2011 10:02 am

Present code:
         TITLE 'PROGRAM 4 80/80 LISTING'
         PRINT NOGEN
COPY     SUBENTRY
         WTO   'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
         OPEN  (INFILE,INPUT)
         OPEN  (DATAIN,INPUT)
         OPEN  (OUTFILE,OUTPUT)
         OPEN  (SUMMARY,OUTPUT)
         WTO   'Files opened successfully'
*
LOOP     EQU   *
         GET   INFILE,IRECORD
         MVC   ORECORD,=CL133' '
         MVC   ORECORD(80),IRECORD
         PUT   OUTFILE,ORECORD
         B     LOOP
READLOOP    DS    0H
          GET    DATAIN,INREC
          ZAP    TOTAL,=P'0'
          PACK  WORK8,NUM1
          AP    TOTAL,WORK8
          PACK  WORK8,NUM2
          AP    TOTAL,WORK8
          PACK  WORK8,NUM3
          AP    TOTAL,WORK8
          MP    TOTAL,=P'100'
          DP    TOTAL,=P'3'
          MVC   OUTID,INID
          UNPK  AVERAGE,TOTAL(5)
          PUT    SUMMARY,OUTREC
          B    READLOOP
WORK8      DS    D
TOTAL      DS    PL6
INREC      DS    CL80
INID       EQU   INREC,5
NUM1      EQU   INREC+6,5
NUM2      EQU   INREC+12,5
NUM3      EQU   INREC+18,5
OUTREC      DS    CL13
OUTID      EQU   OUTREC,5
AVERAGE     EQU   OUTREC+6,7
*
EOF      EQU   *
         CLOSE (INFILE,,OUTFILE)
         WTO   'PROG4 ENDED OK'
         SUBEXIT
ENDDATA     DS    0H
          CLOSE  (DATAIN,,SUMMARY)
          SUBEXIT

DATAIN      DCB    DDNAME=INPUT,                                       X
              DSORG=PS,                                                X
              EODAD=ENDDATA,                                           X
              LRECL=80,                                                X
              RECFM=FT,                                                X
              MACRF=GM
INFILE   DCB   DDNAME=INFILE,                                          X
               DSORG=PS,                                               X
               RECFM=FT,                                               X
               LRECL=80,                                               X
               EODAD=EOF,                                              X
               MACRF=GM
*
OUTFILE  DCB   DDNAME=OUTFILE,                                         X
               DSORG=PS,                                               X
               RECFM=FT,                                               X
               LRECL=133,                                              X
               MACRF=PM
*
SUMMARY  DCB   DDNAME=OUTPUT,                                          X
               BLKSIZE=130,                                            X
               LRECL=13,                                               X
               DSORG=PS,                                               X
               RECFM=FT,                                               X
               MACRF=PM
IRECORD  DC    CL80' '
ORECORD  DC    CL133' '
 END COPY


20:48:22 prog4a    MZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_29 10/29/11
20:48:22 prog4a    MZ390 MZ390E error  11       (1/55)55 continuation line < 16 characters -               DSORG=PS,                                                X
20:48:22 prog4a    MZ390 MZ390E error  11       (1/57)57 continuation line < 16 characters -               LRECL=80,                                                X
20:48:22 prog4a    MZ390 MZ390E error  11       (1/59)59 continuation line < 16 characters -               MACRF=GM
20:48:22 prog4a    MZ390 MZ390E error  11       (1/74)74 continuation line < 16 characters -                BLKSIZE=130,                                            X
20:48:22 prog4a    MZ390 MZ390E error  11       (1/76)76 continuation line < 16 characters -                DSORG=PS,                                               X
20:48:22 prog4a    MZ390 MZ390E error  11       (1/78)78 continuation line < 16 characters -                MACRF=PM
20:48:22 prog4a    AZ390 AZ390E error 196         (1/2)1         
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 198     (5/108)106                          LA     1,DATAIN
20:48:22 prog4a    AZ390 AZ390I symbol not defined DATAIN
20:48:22 prog4a    AZ390 AZ390E error 198     (5/108)126                          LA     1,SUMMARY
20:48:22 prog4a    AZ390 AZ390I symbol not defined SUMMARY
20:48:22 prog4a    AZ390 AZ390E error 196      (1/20)154   READLOOP    DS    0H
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/21)155             GET    DATAIN,INREC
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/22)156             ZAP    TOTAL,=P'0'
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/23)157             PACK  WORK8,NUM1
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/24)158             AP    TOTAL,WORK8
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/25)159             PACK  WORK8,NUM2
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/26)160             AP    TOTAL,WORK8
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/27)161             PACK  WORK8,NUM3
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/28)162             AP    TOTAL,WORK8
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/29)163             MP    TOTAL,=P'100'
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/30)164             DP    TOTAL,=P'3'
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/31)165             MVC   OUTID,INID
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/32)166             UNPK  AVERAGE,TOTAL(5)
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/33)167             PUT    SUMMARY,OUTREC
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/34)168             B    READLOOP
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/35)169   WORK8      DS    D
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/36)170   TOTAL      DS    PL6
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/37)171   INREC      DS    CL80
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/38)172   INID       EQU   INREC,5
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/39)173   NUM1      EQU   INREC+6,5
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/40)174   NUM2      EQU   INREC+12,5
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/41)175   NUM3      EQU   INREC+18,5
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/42)176   OUTREC      DS    CL13
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/43)177   OUTID      EQU   OUTREC,5
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/44)178   AVERAGE     EQU   OUTREC+6,7
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/50)206   ENDDATA     DS    0H
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/51)207             CLOSE  (DATAIN,,SUMMARY)
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/52)208             SUBEXIT
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/55)209   DATAIN      DCB    DDNAME=INPUT,                                                     DSORG=PS,                                                X
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/57)212                 EODAD=ENDDATA,                                                         LRECL=80,                                                X
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/59)215                 RECFM=FT,                                                              MACRF=GM
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error  29      (1/74)291   SUMMARY  DCB   DDNAME=OUTPUT,                                                         BLKSIZE=130,                                            X
20:48:22 prog4a    AZ390 AZ390I ERRSUM missing macro = DCB
20:48:22 prog4a    AZ390 AZ390E error 196      (1/76)294                  LRECL=13,                                                              DSORG=PS,                                               X
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E error 196      (1/78)297                  RECFM=FT,                                                              MACRF=PM
20:48:22 prog4a    AZ390 AZ390I invalid character in opcode - 
20:48:22 prog4a    AZ390 AZ390E ERRSUM Critical Error Summary Option
20:48:22 prog4a    AZ390 AZ390E ERRSUM Fix and repeat until all nested errors resolved
20:48:22 prog4a    AZ390 AZ390E ERRSUM missing macro =DCB
20:48:22 prog4a    AZ390 AZ390E ERRSUM total missing   copy   files =0
20:48:22 prog4a    AZ390 AZ390E ERRSUM total missing   macro  files =1
20:48:22 prog4a    AZ390 AZ390E ERRSUM total undefined symbols      =2
20:48:22 prog4a    AZ390 AZ390E ERRSUM total mz390 errors    = 6
20:48:22 prog4a    AZ390 AZ390E ERRSUM total az390 errors    = 37
20:48:22 prog4a    AZ390 AZ390I FID=  1 ERR=  41 c:\Program Files\Automated Software Tools\z390\CS4321\prog4a.MLC
20:48:22 prog4a    AZ390 AZ390I FID=  5 ERR=   2 c:\PROGRA~1\AUTOMA~1\z390\mac\ZOPEN.MAC
20:48:22 prog4a    MZ390 ENDED   RC=12 SEC= 0 MEM(MB)= 47 IO=2630


I don't understand:

continuation line < 16 characters
invalid character in opcode
symbol not defined

And this is a HELP forum -- not a TEACHING forum. If you want instruction, you would vastly be better off getting it from a school or even by reading a book rather than posting questions here.

Sorry I'm not absolutely superb at looking stuff up. :|

Can you tell me what my errors mean/give me an URL for the "manual" to this type of code and tell me where to look therein/otherwise set me on the right track without doing my work for me?

Thanks
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby enrico-sorichetti » Mon Oct 31, 2011 5:51 pm

three topics on the same issue...
and You ask us to be polite!
to prove Your incompetence I just download the z390 assembler
fixed the setup for my environment
cut and pasted Your fucked up program and ...
first run ... the messages received where completely different from Yours

just tested after having fixed Your errors
and worked nicely
here is the fixed source working
         TITLE 'PROGRAM 4 80/80 LISTING'
         PRINT NOGEN
COPY     SUBENTRY
         WTO   'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
         OPEN  (INFILE,INPUT)
         OPEN  (DATAIN,INPUT)
         OPEN  (OUTFILE,OUTPUT)
         OPEN  (SUMMARY,OUTPUT)
         WTO   'Files opened successfully'
*
LOOP     EQU   *
         GET   INFILE,IRECORD
         MVC   ORECORD,=CL133' '
         MVC   ORECORD(80),IRECORD
         PUT   OUTFILE,ORECORD
         B     LOOP
READLOOP DS    0H
         GET   DATAIN,INREC
         ZAP   TOTAL,=P'0'
         PACK  WORK8,NUM1
         AP    TOTAL,WORK8
         PACK  WORK8,NUM2
         AP    TOTAL,WORK8
         PACK  WORK8,NUM3
         AP    TOTAL,WORK8
         MP    TOTAL,=P'100'
         DP    TOTAL,=P'3'
         MVC   OUTID,INID
         UNPK  AVERAGE,TOTAL(5)
         PUT   SUMMARY,OUTREC
         B     READLOOP
WORK8    DS    D
TOTAL    DS    PL6
INREC    DS    CL80
INID     EQU   INREC,5
NUM1     EQU   INREC+6,5
NUM2     EQU   INREC+12,5
NUM3     EQU   INREC+18,5
OUTREC   DS    CL13
OUTID    EQU   OUTREC,5
AVERAGE  EQU   OUTREC+6,7
*
EOF      EQU   *
         CLOSE (INFILE,,OUTFILE)
         WTO   'PROG4 ENDED OK'
         SUBEXIT
ENDDATA  DS    0H
         CLOSE (DATAIN,,SUMMARY)
         SUBEXIT
DATAIN   DCB   DDNAME=INPUT,                                           X
               DSORG=PS,                                               X
               EODAD=ENDDATA,                                          X
               LRECL=80,                                               X
               RECFM=FB,                                               X
               MACRF=GM
INFILE   DCB   DDNAME=INFILE,                                          X
               DSORG=PS,                                               X
               RECFM=FB,                                               X
               LRECL=80,                                               X
               EODAD=EOF,                                              X
               MACRF=GM
*
OUTFILE  DCB   DDNAME=OUTFILE,                                         X
               DSORG=PS,                                               X
               RECFM=FB,                                               X
               LRECL=133,                                              X
               MACRF=PM
*
SUMMARY  DCB   DDNAME=OUTPUT,                                          X
               BLKSIZE=130,                                            X
               LRECL=13,                                               X
               DSORG=PS,                                               X
               RECFM=FB,                                               X
               MACRF=PM
IRECORD  DC    CL80' '
ORECORD  DC    CL133' '
         END   COPY


z390 programs obey the same rules IBM Hlasm programs do
all You might want to know avbout IBM hlasm is available here
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ASMSH030

since You seem unable to ...
read the z390 docs, search and read the IBM manuals, setup properly Your environment , provide proper info ... add as many as You want

the best advice You can get is ...
look for a job less demanding for Your brain cells :evil:

and when I tried to run it I got ( obviously - since I did not care to allocate the datasets needed )

13:18:53 mftest    EZ390 START USING z390 V1.5.05 ON J2SE 1.6.0_26 10/31/11
PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)
EZ390E error  43 I/O error for DCB=000FFD60 DDNAME=INFILE FILE=
EZ390E error  23 i/o error on open - java.io.FileNotFoundException:  (No such file or directory)
......
EZ390E error  11 ABEND PSW=07050600 800FFB60 0A13         SVC   ABEND S013
 R0-R3 F4F4F4F400000040 F4F4F4F4000FFD60 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4
 R4-R7 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4
 R8-RB F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4 F4F4F4F4F4F4F4F4
 RC-RF F4F4F4F4F4F4F4F4 F4F4F4F4800FFAB8 F4F4F4F400002018 F4F4F4F400000000
EZ390E error  12 program aborting due to abend S013
13:18:53 mftest    EZ390 ENDED   RC=16 SEC= 0 MEM(MB)= 14 IO=46 INS=10

and as described here
http://publibz.boulder.ibm.com/cgi-bin/ ... 0124095350

the meaning of a S013 abend code is ( guess what )
013


Explanation: The error occurred during processing of an OPEN macro instruction. This system completion code is accompanied by message IEC141I. Refer to the explanation of message IEC141I for complete information about the task that was ended and for an explanation of the return code in register 15 (which is provided in the IEC141I message text).
Application Programmer Response: Respond as indicated for message IEC141I.

System Programmer Response: If the error recurs and the program is not in error, look at the messages in the job log for more information. Search problem reporting data bases for a fix for the problem. If no fix exists, contact the IBM Support Center. Provide the JCL and the program listing for the job.

Source: DFSMSdfp
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
RISCCISCInstSet (Mon Nov 12, 2012 5:20 am)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Why is There Air (Assembler)

Postby Robert Sample » Mon Oct 31, 2011 6:50 pm

From the HLASM High Level Assembler) Language Reference manual:
2.2.2 Continuation Lines


To continue a statement on another line, follow these rules:

Enter a non-space character in the continuation-indicator field (column 72). This non-space character must not be part of the statement coding. When more than one continuation line is needed, enter a non-space character in column 72 of each line that is to be continued.

Continue the statement on the next line, starting in the continue column (column 16). Columns to the left of the continue column must be spaces. Comment statements may be continued after column 16.
If your continuation line does not start in column 16, you will get an error message -- such as
continuation line < 16 characters -


Invalid character in opcode is most likely -- and this is only a guess -- that either your opcode does not start in column 10, or your operands start in column 15 or earlier. Assembler can be extremely picky about the columns things appear in.

Symbol not defined means just what it says --
symbol not defined DATAIN
means DATAIN was not defined. Whether or not it actually appears in your source code does not matter -- the assembler is telling you that you do not have a valid defintiion for it (maybe because of the continuation line errors preventing it from being recognized as a symbol).


Search for HLASM manual on the IBM web site.

These users thanked the author Robert Sample for the post:
RISCCISCInstSet (Mon Nov 12, 2012 5:20 am)
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Why is There Air (Assembler)

Postby RISCCISCInstSet » Mon Oct 31, 2011 7:37 pm

@enrico-sorichetti: Three topics - same issue? Sorry I'm a noobie that hasn't used forums till now. I won't be doing this anymore.

Also: there's a reason it dawned on me this belonged in "Stupid Questions." :idea:
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby RISCCISCInstSet » Tue Nov 01, 2011 6:33 am

@Robert Sample: I'm still getting a continuation line < 16 characters error after I moved the text to the right. Code at current time:

         TITLE 'PROGRAM 4 80/80 LISTING'
         PRINT NOGEN
COPY     SUBENTRY
         WTO   'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
         OPEN  (INFILE,INPUT)
         OPEN  (DATAIN,INPUT)
         OPEN  (OUTFILE,OUTPUT)
         OPEN  (SUMMARY,OUTPUT)
         WTO   'Files opened successfully'
*
LOOP     EQU   *
         GET   INFILE,IRECORD
         MVC   ORECORD,=CL133' '
         MVC   ORECORD(80),IRECORD
         PUT   OUTFILE,ORECORD
         B     LOOP
READLOOP    DS    0H 
          GET    DATAIN,INREC 
          ZAP    TOTAL,=P'0' 
          PACK  WORK8,NUM1 
          AP    TOTAL,WORK8 
          PACK  WORK8,NUM2 
          AP    TOTAL,WORK8 
          PACK  WORK8,NUM3 
          AP    TOTAL,WORK8 
          MP    TOTAL,=P'100' 
          DP    TOTAL,=P'3' 
          MVC   OUTID,INID 
          UNPK  AVERAGE,TOTAL(5) 
          PUT    SUMMARY,OUTREC 
          B    READLOOP 
WORK8      DS    D 
TOTAL      DS    PL6 
INREC      DS    CL80 
INID       EQU   INREC,5 
NUM1      EQU   INREC+6,5 
NUM2      EQU   INREC+12,5 
NUM3      EQU   INREC+18,5 
OUTREC      DS    CL13 
OUTID      EQU   OUTREC,5 
AVERAGE     EQU   OUTREC+6,7 
*
EOF      EQU   *
         CLOSE (INFILE,,OUTFILE)
         WTO   'PROG4 ENDED OK'
         SUBEXIT
ENDDATA     DS    0H 
          CLOSE  (DATAIN,,SUMMARY) 
          SUBEXIT 

DATAIN            DCB    DDNAME=INPUT,                                 X 
                  DSORG=PS,                                            X 
                  EODAD=ENDDATA,                                       X 
                  LRECL=80,                                            X 
                  RECFM=FT,                                            X 
                  MACRF=GM 
INFILE   DCB    DDNAME=INFILE,                                         X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=80,                                              X
                EODAD=EOF,                                             X
                MACRF=GM
*
OUTFILE  DCB    DDNAME=OUTFILE,                                        X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=133,                                             X
                MACRF=PM
*
SUMMARY  DCB    DDNAME=OUTPUT,                                         X
                BLKSIZE=130,                              Â             X
                LRECL=13,                                              X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                MACRF=PM
IRECORD  DC    CL80' '
ORECORD  DC    CL133' '
 END COPY
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby RISCCISCInstSet » Tue Nov 01, 2011 8:54 am

Noted:
Invalid character in opcode is most likely -- and this is only a guess -- that either your opcode does not start in column 10, or your operands start in column 15 or earlier. Assembler can be extremely picky about the columns things appear in.
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby RISCCISCInstSet » Tue Nov 01, 2011 10:31 am

                TITLE 'PROGRAM 4 80/80 LISTING'
                PRINT NOGEN
COPY            SUBENTRY
                WTO   'PROG4 COPY INFILE (ASCII) TO OUTFILE (ASCII)'
                OPEN  (INFILE,INPUT)
                OPEN  (DATAIN,INPUT)
                OPEN  (OUTFILE,OUTPUT)
                OPEN  (SUMMARY,OUTPUT)
                WTO   'Files opened successfully'
*
LOOP            EQU   *
                GET   INFILE,IRECORD
                MVC   ORECORD,=CL133' '
                MVC   ORECORD(80),IRECORD
                PUT   OUTFILE,ORECORD
                B     LOOP
READLOOP        DS    0H 
                GET    DATAIN,INREC 
                ZAP    TOTAL,=P'0' 
              Â  PACK  WORK8,NUM1 
              Â  AP    TOTAL,WORK8 
                PACK  WORK8,NUM2 
        Â        AP    TOTAL,WORK8 
                PACK  WORK8,NUM3 
              Â  AP    TOTAL,WORK8 
                MP    TOTAL,=P'100' 
              Â  DP    TOTAL,=P'3' 
        Â        MVC   OUTID,INID 
    Â            UNPK  AVERAGE,TOTAL(5) 
      Â        Â  PUT    SUMMARY,OUTREC 
              Â  B    READLOOP 
WORK8           DS    D 
TOTAL           DS    PL6 
INREC           DS    CL80 
INID            EQU   INREC,5 
NUM1            EQU   INREC+6,5 
NUM2            EQU   INREC+12,5 
NUM3            EQU   INREC+18,5 
OUTREC          DS    CL13 
OUTID           EQU   OUTREC,5 
AVERAGE         EQU   OUTREC+6,7 
*
EOF             EQU   *
                CLOSE (INFILE,,OUTFILE)
                WTO   'PROG4 ENDED OK'
                SUBEXIT
ENDDATA         DS    0H 
                CLOSE  (DATAIN,,SUMMARY) 
                SUBEXIT 

DATAIN          DCB   DDNAME=INPUT,                                    X
                DSORG=PS,                                              X
                EODAD=ENDDATA,                                         X
                LRECL=80,                                              X
                RECFM=FT,                                              X
                MACRF=GM 
INFILE          DCB   DDNAME=INFILE,                                   X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=80,                                              X
                EODAD=EOF,                                             X
                MACRF=GM
*
OUTFILE         DCB   DDNAME=OUTFILE,                                  X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                LRECL=133,                                             X
                MACRF=PM
*
SUMMARY         DCB   DDNAME=OUTPUT,                                   X
                BLKSIZE=130,                              Â             X
                LRECL=13,                                              X
                DSORG=PS,                                              X
                RECFM=FT,                                              X
                MACRF=PM
IRECORD         DC    CL80' '
ORECORD         DC    CL133' '
                END COPY

I don't know what's worse, my difficulty or the fact that this is beginner stuff :( (remember, no doing work for me).
RISCCISCInstSet
User avatar
RISCCISCInstSet
 
Posts: 121
Joined: Mon Oct 17, 2011 1:46 pm
Has thanked: 146 times
Been thanked: 0 time

Re: Why is There Air (Assembler)

Postby dick scherrer » Wed Nov 02, 2011 9:48 am

Hello,

(remember, no doing work for me).
:?

For doing "no" work, you have flailed away quite a bit. . . :)

Suggest you copy your program and strip out almost all of the current code. Turn this into a "hello world" program that is only a handful of instructions. Once you have this working, add a bit and continue.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
RISCCISCInstSet (Mon Nov 12, 2012 5:20 am)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to Stupid Questions

 


  • Related topics
    Replies
    Views
    Last post