A system abend 0C1 occurred in an undetermined module.
A program-interruption code 0001 (Operation Exception) is associated with this
abend and indicates that:
An attempt was made to execute an instruction with an invalid operation code.
The abend occurred after executing machine instruction 0DEF (BRANCH AND SAVE) in
module X CSECT SCHEDMON at offset X'5C'.
A program-interruption code 0001 (Operation Exception) is associated with this
abend and indicates that:
An attempt was made to execute an instruction with an invalid operation code.
The abend occurred after executing machine instruction 0DEF (BRANCH AND SAVE) in
module X CSECT SCHEDMON at offset X'5C'.
Here is the short bit of code for it:
LINK EP=BPXWDYN,PARAM=(MYFILE),VL=1
OPEN (DDN,(OUTPUT))
MVC OUTREC,=CL80' '
MVC OUTREC(5),=C'HELLO'
PUT DDN,OUTREC
CLOSE (DDN)
LINK EP=BPXWDYN,PARAM=(FREEFILE),VL=1
DDN DCB DDNAME=MYFILE,DSORG=PS,MACRF=(PM),LRECL=80,RECFM=FB
MYFILE DC CL48'ALLOC FI(MYFILE) DA("Z00620.ASMSCHED(TEST)") SHR'
FREEFILE DC CL15'FREE FI(MYFILE)'
OPEN (DDN,(OUTPUT))
MVC OUTREC,=CL80' '
MVC OUTREC(5),=C'HELLO'
PUT DDN,OUTREC
CLOSE (DDN)
LINK EP=BPXWDYN,PARAM=(FREEFILE),VL=1
DDN DCB DDNAME=MYFILE,DSORG=PS,MACRF=(PM),LRECL=80,RECFM=FB
MYFILE DC CL48'ALLOC FI(MYFILE) DA("Z00620.ASMSCHED(TEST)") SHR'
FREEFILE DC CL15'FREE FI(MYFILE)'
I know for sure that this:
LINK EP=BPXWDYN,PARAM=(MYFILE),VL=1
Is giving a return code that's not zero, I've just taken out the test for it in my code for now.
I don't really understand how to use BPXWDYN yet, I've just been experimenting and to trying to get it to work. I've been mostly using Robert Samples' post in this topic(https://ibmmainframes.com/about35091.html) as a reference. And here's the code from his post:
ASMTEST CSECT
REGEQU
STM R14,R12,12(R13)
LR R12,R15
USING ASMTEST,R12
LA R15,SAVEAREA
ST R13,4(R15)
ST R15,8(R13)
LR R13,R15
OPEN (SYSPRINT,(OUTPUT))
PUT SYSPRINT,=CL133'HELLO WORLD'
LINK EP=BPXWDYN,PARAM=(P1ADDR),VL=1
LTR R15,R15
* TEST FOR GOOD RETURN -- IF SO, JUMP OVER MOVE OF R15 TO OUTPUT
* BZ DYNWRITE
CVD R15,R15CVD
UNPK BPXM1R15(8),R15CVD+4(4)
CLI BPXM1R15+7,C'J'
BL BPXPLUS
MVI BPXMSG1+14,C'-'
B PUTCODE
BPXPLUS EQU *
MVI BPXMSG1+14,C'+'
PUTCODE EQU *
OI BPXM1R15+7,X'F0'
PUT SYSPRINT,BPXMSG1
DYNWRITE EQU *
OPEN (DDN,(OUTPUT))
PUT DDN,BPXMSG2
CLOSE (DDN)
LINK EP=BPXWDYN,PARAM=(P2ADDR),VL=1
CLOSE (SYSPRINT)
L R13,SAVEAREA+4
XR R15,R15
RETURN (14,12),RC=(15)
SAVEAREA DS 18F
DDN DCB DDNAME=MYFILE,BLKSIZE=27920,DSORG=PS,MACRF=(PM), X
LRECL=80
SYSPRINT DCB DDNAME=SYSPRINT,BLKSIZE=133,DSORG=PS,MACRF=(PM)
DC C'SYSSNAP DCB FOUNDATION.'
CNOP 0,4 FULLWORD ALIGNMENT.
P1ADDR DC H'54'
PARM01 DC CL54'ALLOC DD(MYFILE) DA(''TTSSRS0.BPXWDYN.FILE.DATA'') X
SHR'
CNOP 0,4 FULLWORD ALIGNMENT.
P2ADDR DC H'16'
PARM02 DC CL16'FREE DD(MYFILE)'
R15CVD DS D
BPXMSG1 DC 0CL133
BPXMSG2 DC 0CL80
DC CL15'BPXWDYN R15 = '
BPXM1R15 DS CL8
DC CL110' '
FINAL EQU *
END ASMTEST
REGEQU
STM R14,R12,12(R13)
LR R12,R15
USING ASMTEST,R12
LA R15,SAVEAREA
ST R13,4(R15)
ST R15,8(R13)
LR R13,R15
OPEN (SYSPRINT,(OUTPUT))
PUT SYSPRINT,=CL133'HELLO WORLD'
LINK EP=BPXWDYN,PARAM=(P1ADDR),VL=1
LTR R15,R15
* TEST FOR GOOD RETURN -- IF SO, JUMP OVER MOVE OF R15 TO OUTPUT
* BZ DYNWRITE
CVD R15,R15CVD
UNPK BPXM1R15(8),R15CVD+4(4)
CLI BPXM1R15+7,C'J'
BL BPXPLUS
MVI BPXMSG1+14,C'-'
B PUTCODE
BPXPLUS EQU *
MVI BPXMSG1+14,C'+'
PUTCODE EQU *
OI BPXM1R15+7,X'F0'
PUT SYSPRINT,BPXMSG1
DYNWRITE EQU *
OPEN (DDN,(OUTPUT))
PUT DDN,BPXMSG2
CLOSE (DDN)
LINK EP=BPXWDYN,PARAM=(P2ADDR),VL=1
CLOSE (SYSPRINT)
L R13,SAVEAREA+4
XR R15,R15
RETURN (14,12),RC=(15)
SAVEAREA DS 18F
DDN DCB DDNAME=MYFILE,BLKSIZE=27920,DSORG=PS,MACRF=(PM), X
LRECL=80
SYSPRINT DCB DDNAME=SYSPRINT,BLKSIZE=133,DSORG=PS,MACRF=(PM)
DC C'SYSSNAP DCB FOUNDATION.'
CNOP 0,4 FULLWORD ALIGNMENT.
P1ADDR DC H'54'
PARM01 DC CL54'ALLOC DD(MYFILE) DA(''TTSSRS0.BPXWDYN.FILE.DATA'') X
SHR'
CNOP 0,4 FULLWORD ALIGNMENT.
P2ADDR DC H'16'
PARM02 DC CL16'FREE DD(MYFILE)'
R15CVD DS D
BPXMSG1 DC 0CL133
BPXMSG2 DC 0CL80
DC CL15'BPXWDYN R15 = '
BPXM1R15 DS CL8
DC CL110' '
FINAL EQU *
END ASMTEST
I don't understand why he is using P1ADDR in
LINK EP=BPXWDYN,PARAM=(P1ADDR),VL=1
I used this site (http://csc.columbusstate.edu/woolbright/LINKAGE.HTM) to learn about program linking/calling conventions and felt like I understood it overall, but I don't really know how it's being applied in this case.
Sorry if I didn't provide enough information or if I put useless info. I've only been learning Assembler for a couple weeks so I don't know too much yet.