View previous topic :: View next topic
|
Author |
Message |
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
Hello,
Can anyone tell me if rexx can work with amod 24 programs?
And if not what is the best way for me to call an amod 24 program from rexx
Thanks,
Shahaf |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
And if not what is the best way for me to call an amod 24 program from rexx |
if NOT there is no way
but why not test Yourself and tell what happens . |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
What exactly do you mean by 'work with'? I don't think REXX cares that you program is amode24, but you might have a problem with calling REXX program services from that program. The reference manual states:
Quote: |
Some general conventions about calling TSO/E REXX routines:
- All calls are in 31 bit addressing mode.
- All data areas may be above 16 MB in virtual storage. |
|
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
I have a problem calling an amod 24 program from rexx |
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
I will explain my self better
I have rexx program that call an amod24 assembler program (that read data from adabas tables) with rexx variables.
1. Is there a way for me to define below the line variables in rexx?
2. can i call a natural program from rexx?
Thanks,
Shahaf. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Unfortunately you have not explained yourself very well at all ......
Have you read the ADABAS / NATURAL manuals to find out if there is a REXX interface, or contacted your site support to see if there is an option to do this, and is that option installed / turned on.
Some sites decide that yes an option is available, but here we will turn it off. Don't ask me why, some people just decide that they know best Only YOUR site people know what happens at your site |
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
AGAIN.
We have an assembler program that call an adabas table and return data from a specific table of your choosing.
I need to call that assembler program from REXX,
The problem is that i call that assembler program with REXX variables that are above the line and the assembler program is amod24.
so i return to my questions:
1. Is there a way for me to define below the line variables in rexx?
2. can i call a natural program from rexx? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
It is usually not a major exercise to convert an AMODE 24 Assembler program to AMODE 31/RMODE24. Converting to AMODE 31/RMODE ANY is more difficult.
Converting an AMODE 24 program so that the part that retrieves Rexx variables runs AMODE 31 and the rest runs AMODE 24 is usually MUCH MORE difficult than converting the entire program to run AMODE 31.
Quote: |
... amod24 assembler program (that read data from adabas tables) with rexx variables |
I'm confused. Here you seem to be saying you already have an AMODE 24 program that uses Rexx variables. Find out what it is doing and copy that to your program. |
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
steve-myers wrote: |
you seem to be saying you already have an AMODE 24 program that uses Rexx variables. Find out what it is doing and copy that to your program. |
It doesn't work |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
it would have been simpler if You had told that the program was an external REXX function
but why the amode24 constraint ? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Let's take the classic simple copy program -
Code: |
SCOPY CSECT
USING *,12
SAVE (14,12),,*
LR 12,15
LA 15,SAVEAREA
ST 13,4(,15)
ST 15,8(,13)
LR 13,15
OPEN (INPUT,INPUT,OUTPUT,OUTPUT)
LOOP GET INPUT
LR 0,1
PUT OUTPUT,(0)
B LOOP
EOF CLOSE (INPUT,,OUTPUT)
L 13,4(,13)
RETURN (14,12),RC=0
SAVEAREA DC 9D'0'
INPUT DCB DSORG=PS,MACRF=GL,DDNAME=INPUT,EODAD=EOF
OUTPUT DCB DSORG=PS,MACRF=PM,DDNAME=OUTPUT
END SCOPY |
To convert it to AMODE 31, this is all you have to do -
Code: |
SCOPY CSECT
SCOPY AMODE 31
USING *,12
SAVE (14,12),,*
LR 12,15
LA 15,SAVEAREA
ST 13,4(,15)
ST 15,8(,13)
LR 13,15
OPEN (INPUT,INPUT,OUTPUT,OUTPUT)
LOOP GET INPUT
LR 0,1
PUT OUTPUT,(0)
B LOOP
EOF CLOSE (INPUT,,OUTPUT)
L 13,4(,13)
RETURN (14,12),RC=0
SAVEAREA DC 9D'0'
INPUT DCB DSORG=PS,MACRF=GL,DDNAME=INPUT,EODAD=EOF
OUTPUT DCB DSORG=PS,MACRF=PM,DDNAME=OUTPUT
END SCOPY |
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
REXX services are 31-bit as stated above. So it seems that you have a couple of choices:
1) Reassemble the program with amode 31, remember that you can keep rmode 24 if the problem is doing I/O.
2) Write an amode 31 interface program which does the REXX stuff and in turn calls the ADABAS interface program.
3) use another interface, but I assume that you already have looked at that. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
shahaf wrote: |
...It doesn't work |
Golly gee, that's real useful! What happens? An S0C4 ABEND? That sometimes is indicative of an AMODE conflict!
Where did this program come from? Perhaps you can go back to the source of the program for assistance. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Can you show us the CALL that you issue?
Perhaps you are using the rexx CALL statement. The parameter list is different than what an assembler program normally expects.
I think you should use the Address TSO "CALL 'my.lib(myprog)' 'my parms'" statement, which provides the normal MVS assembler parameter list. |
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
Pedro wrote: |
Can you show us the CALL that you issue?
Perhaps you are using the rexx CALL statement. The parameter list is different than what an assembler program normally expects.
I think you should use the Address TSO "CALL 'my.lib(myprog)' 'my parms'" statement, which provides the normal MVS assembler parameter list. |
That is exactly what I am doing |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Still, can you show us the call that you issue?
I recommend starting the trace just before the call. and show us the trace results. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Can you issue your CALL statement outside of REXX? For example, in ISPF option 6:
Code: |
CALL 'my.lib(myprog)' 'my parms' |
and does it work correctly?
That is, you should ensure that you are issuing the correct CALL statement before trying to issue it from rexx. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
The problem is that i call that assembler program with REXX variables that are above the line |
show how you specify your variables in the call to the program. The rexx processor should resolve the variables before it transfers control the TSO host command processor. |
|
Back to top |
|
|
shahaf
New User
Joined: 28 Nov 2018 Posts: 8 Location: israel
|
|
|
|
Hello,
Thanks for all the replies.
I fixed it by calling from REXX --> COBOL --> ASSEMBLER. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the real problem is that You never told how the assembler program was called |
|
Back to top |
|
|
|