IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rexx on amod 24


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Thu Nov 29, 2018 1:07 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 29, 2018 2:38 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Nov 29, 2018 4:15 am
Reply with quote

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
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Thu Nov 29, 2018 10:53 am
Reply with quote

I have a problem calling an amod 24 program from rexx
Back to top
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Thu Nov 29, 2018 12:23 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 29, 2018 12:35 pm
Reply with quote

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 icon_evil.gif Only YOUR site people know what happens at your site
Back to top
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Thu Nov 29, 2018 12:57 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:14 pm
Reply with quote

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
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Thu Nov 29, 2018 2:19 pm
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 29, 2018 2:24 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:32 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Nov 29, 2018 2:38 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:46 pm
Reply with quote

shahaf wrote:
...It doesn't work icon_smile.gif
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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Nov 30, 2018 10:49 am
Reply with quote

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
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Fri Nov 30, 2018 11:23 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Dec 01, 2018 10:54 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Dec 01, 2018 11:01 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Dec 01, 2018 11:09 am
Reply with quote

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
View user's profile Send private message
shahaf

New User


Joined: 28 Nov 2018
Posts: 8
Location: israel

PostPosted: Sun Dec 02, 2018 11:37 am
Reply with quote

Hello,

Thanks for all the replies.
I fixed it by calling from REXX --> COBOL --> ASSEMBLER.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Dec 02, 2018 3:28 pm
Reply with quote

the real problem is that You never told how the assembler program was called
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top