Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rexx on amod 24

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
shahaf

New User


Joined: 28 Nov 2018
Posts: 7
Location: israel

PostPosted: Thu Nov 29, 2018 1:07 am    Post subject: Rexx on amod 24
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

Senior Member


Joined: 14 Mar 2007
Posts: 10541
Location: italy

PostPosted: Thu Nov 29, 2018 2:38 am    Post subject: Reply to: Rexx on amod 24
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 User


Joined: 01 Sep 2015
Posts: 248
Location: Denmark

PostPosted: Thu Nov 29, 2018 4:15 am    Post subject:
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: 7
Location: israel

PostPosted: Thu Nov 29, 2018 10:53 am    Post subject: Reply to: Rexx on amod 24
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: 7
Location: israel

PostPosted: Thu Nov 29, 2018 12:23 pm    Post subject:
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: 8744
Location: Welsh Wales

PostPosted: Thu Nov 29, 2018 12:35 pm    Post subject:
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: 7
Location: israel

PostPosted: Thu Nov 29, 2018 12:57 pm    Post subject:
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: 681
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:14 pm    Post subject:
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: 7
Location: israel

PostPosted: Thu Nov 29, 2018 2:19 pm    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10541
Location: italy

PostPosted: Thu Nov 29, 2018 2:24 pm    Post subject: Reply to: Rexx on amod 24
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: 681
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:32 pm    Post subject: Convert AMODE 24 to AMODE 31
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 User


Joined: 01 Sep 2015
Posts: 248
Location: Denmark

PostPosted: Thu Nov 29, 2018 2:38 pm    Post subject:
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: 681
Location: The Universe

PostPosted: Thu Nov 29, 2018 2:46 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Nov 30, 2018 10:49 am    Post subject: Reply to: Rexx on amod 24
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: 7
Location: israel

PostPosted: Fri Nov 30, 2018 11:23 am    Post subject: Re: Reply to: Rexx on amod 24
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

Senior Member


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

PostPosted: Sat Dec 01, 2018 10:54 am    Post subject: Reply to: Rexx on amod 24
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

Senior Member


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

PostPosted: Sat Dec 01, 2018 11:01 am    Post subject: Reply to: Rexx on amod 24
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

Senior Member


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

PostPosted: Sat Dec 01, 2018 11:09 am    Post subject: Reply to: Rexx on amod 24
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: 7
Location: israel

PostPosted: Sun Dec 02, 2018 11:37 am    Post subject: Reply to: Rexx on amod 24
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

Senior Member


Joined: 14 Mar 2007
Posts: 10541
Location: italy

PostPosted: Sun Dec 02, 2018 3:28 pm    Post subject: Reply to: Rexx on amod 24
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to process gdg in rexx program wh... pkmurali CLIST & REXX 0 Thu Dec 13, 2018 10:08 am
No new posts Need advise in calling DFSORT from REXX ajithajt CLIST & REXX 9 Thu Nov 29, 2018 10:50 am
No new posts Will this code extract 1 byte from fi... pkmurali CLIST & REXX 8 Sat Nov 10, 2018 11:13 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts Encoding using rexx pkmurali CLIST & REXX 2 Sat Sep 08, 2018 1:05 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us