Page 1 of 2

generating load module of rexx

PostPosted: Tue Mar 01, 2011 11:24 am
by syamcs
i got the procedure to compile a rexx program and i wrote the JCL for generating load module. But when i executed it ,i got an error stating STEPLIB dataset not found. So can any one help me in resolving this issue

when i gone through the procedure
//STEPLIB DD DSN=&COMPDSN,DISP=SHR
and
COMPDSN='#HLQREXX.SFANLMD'

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 11:57 am
by enrico-sorichetti
i got an error stating STEPLIB dataset not found. So can any one help me in resolving this issue

nothing we can do, You must research on Your own and provide a dataset which exists/can be found

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 12:14 pm
by syamcs
yea the dataset i got it compilation is working fine now but while executing i am getting soc4 abend... plz help me

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 12:28 pm
by mongan
It is impossible to help you if you do not take the time and effort to completely describe what your problem is. You have told us absolutely nothing except that you have a S0C4. No code example, no jobs, no full error message.

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 12:43 pm
by syamcs
the rexx code is as follows
/*rexx*/
say 'hello world'
the jcl is as follows
000001 //MGMTR03E JOB ,,CLASS=A,MSGCLASS=T,NOTIFY=MGMTR03
000002 // JCLLIB ORDER=MGMTR03.REXX.EXEC
000003 //STEP1 EXEC REXXCL
000004 //STEPLIB DD DSN=REXX.SFANLMD,DISP=SHR
000005 //REXX.SYSIN DD DSN=MGMTR03.REXX.EXEC(EX1),DISP=SHR
000006 //PLKED.SYSEXEC DD DSN=REXX.SEAGCMD,DISP=SHR
000007 //LKED.SYSLIB DD DSN=REXX.SEAGLMD,DISP=SHR
000008 //LKED.SYSLMOD DD DSN=MGMTR03.REXX.LOAD(EX1),DISP=SHR
000009 //STEP2 EXEC PGM=EX1
000010 //STEPLIB DD DSN=MGMTR03.REXX.LOAD,DISP=SHR
000011 DD DSN=REXX.SEAGLPA,DISP=SHR
000012 //SYSOUT DD SYSOUT= *
000013 //SYSPRINT DD SYSOUT= *
MGMTR03E STEP2 - COMPLETION CODE - SYSTEM=0C4 USER=0000 REASON=00000010
THE SORCE FILE IS HAVING THE FOLLOWING FORMAT
FB,80,800
THE LOAD MODULE IS HAVING THE FOLLOWING FORMAT
U,80,800

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 3:32 pm
by NicC
Your load module attributes do not look right to me, your line 11 of the jcl is invalid, what are your linkedit/binder control cards? And where is the error message apart from that displayed in your step completion line?

Re: generating load module of rexx

PostPosted: Tue Mar 01, 2011 4:00 pm
by syamcs
thanks for your suggestion. but the first step is executing fine that is the compilation portion and i am getting the load module in hlq.rexx.load. But after that when i am trying to execute the load module which is in hlq.rexx.load i am getting soc4 abend.
i removed the 11th line from the JCL but still its not working.
this is the details

SYSTEM COMPLETION CODE=0C4 REASON CODE=00000010
PSW AT TIME OF ERROR 078D0000 8DB0029A ILC 4 INTC 10
ACTIVE LOAD MODULE ADDRESS=0DB00248 OFFSET=00000052
NAME=EX1
DATA AT PSW 0DB00294 - 05C01821 18305830 301058B0

Re: generating load module of rexx

PostPosted: Wed Mar 02, 2011 8:24 am
by steve-myers
I agree the stated DCB attributes of the alleged load library appear to be questionable, but ...

Program fetch (the actual piece of z/OS that loads modules into storage) uses what is actually in the load module and completely ignores the stated DCB attributes of the load library. Now if a program like the Binder tries to read the load module it will use the stated DCB attributes, and possibly fail if it encounters something outside of these attributes.

The indicative dump seems to show a problem at the start of the program.

BALR 12,0
LR 2,1
LR 3.0
L 3,16(,3)
L 11,... (the 3rd and 4th bytes of the instruction were not printed)

The failing instruction is the L 3,16(,3) instruction.

Now, I don't know anything about the Rexx compiler, but I'd see if there is something you have to do for a program entered directly from the operating system, like your program. Reg 0 does not have a defined value in this situation, so the LR 3,0 instruction is not doing anything that is useful, which is why the program is failing.

Now you can ask, "Why do you say it is at the start of the program?" That's a fair question.
  • The load module offset is shown as X'0052', which is very low.
  • An instruction like BALR 12,0 is often used to get an address into a register for program code addressability near the beginning of a program.

Re: generating load module of rexx

PostPosted: Wed Mar 02, 2011 9:50 am
by syamcs
thanks steve for spending your valuable time in my problem. Still the problem is not resolved so as per your suggestion there must be some instructions have to be done before before loading the load module right. :)

Re: generating load module of rexx

PostPosted: Thu Mar 03, 2011 5:47 pm
by enrico-sorichetti
the most common reason for 0c4 abends in compiled rexx is ...
using the wrong stub
for a batch run the stub should be MVS