Adrian Eka
Adrian Eka

Reputation: 5

What is the underlying cause of an Undefined Operation Code error for Assembly on MVS?

I have the following JCL to compile an assembly language program :-

//JRETEST JOB (A925,22360679777),'AESANJA',NOTIFY=&SYSUID,
//        MSGLEVEL=(1,1)
//PROCLID JCLLIB ORDER=IBMUSER,LEARN.ASMJCL
//     EXEC ASMACL
//SYSOUT DD SYSOUT=*
//C.SYSIN DD *
TEST   START 0
       PRINT NOGEN
*      SAMPLE PROGRAM
       BASR 15,0
       USING *,15
       PRINTOUT MYNAME,*
MYNAME DC C'ADRIAN EKA SANJAYA'
       END TEST
/*

When I run this I get an "undefined operation field" error indicating that PRINTOUT is the undefined operation.

Screen showing undefined operation field.

I am quite confused as I am following a guide, the code being similar :-

//JRETEST JOB (A925,2236067977),′ J.EHRMAN′
// EXEC ASMACLG
//C.SYSIN DD *
Test Start 0 First line of program
       Print NoGen
* Sample Program
       BASR 15,0 Establish a base register
       Using *,15 Inform the Assembler
       PRINTOUT MyName,* Print name and stop
MyName DC C′ John R. Ehrman′ Define constant with name
       END Test Last statement
/* 

Upvotes: 0

Views: 465

Answers (3)

cschneid
cschneid

Reputation: 10775

PRINTOUT is not an operation code as defined in the z/OS Principles of Operation. PRINTOUT is also apparently not a macro defined in a library in the SYSLIB concatenation of the step executing the ASMA90 program in your ASMACL cataloged procedure.

It is possible your instructor did this deliberately to begin to teach you how to diagnose problems with your code using the Assembly listing. Documentation for the IBM High Level Assembler (HLASM) is here. The documentation includes information about how to diagnose problems with your code using the Assembly listing.

Upvotes: 2

povk
povk

Reputation: 49

The underlying cause is that macros used in Ehrman's book are not included in any standard macro libraries. You can either copy them from the book or get them from https://idcp.marist.edu/documents/33945/44724/Macros+%281%29.zip/b268c9c7-c9c5-32a5-d078-072131ef4625?t=1551806362564 and copy them to some maclib for later use.

Upvotes: 2

user8879466
user8879466

Reputation: 1

in my opinion you used a lowercase letter in your JCL. So correcting //c.SYSIN to //C.SYSIN should do the work. CU Andreas

Upvotes: 0

Related Questions