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

Multiple parameters


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Thu Jun 09, 2016 7:54 pm
Reply with quote

Hello,

I would like to give two parameters to a Program in REXX. These should be in different lines, because otherwise they will not be processed. But if I put them in two different lines they are processed separately. Is there any way to give two lines as parameter to a program? I know it depends on the program to, but I am curious, maybe someone know some kind of solution.

Code:

ADDRESS TSO                                     
DSN ='yyyyyyy'                                         
"ALLOC F(AJMPRINT) DA(zzzzzzz) SHR"   
"ALLOC F(AJMOUT) DA("DSN") SHR"     
             
"AJMCMD ADDRESS AJM(xxxxx)"                   
"AJMCMD EXTRACT GROUP(xxxx) NET(xxxx)"

"FREE FILE(AJMPRINT)"                           
"FREE FILE(AJMOUT)"                             
"FREE FILE(AJMCMD)"
                             


I need the two AJMCMD statements to be below each other, but processed at the same time.

I tried to allocate the ajmcmd and to open it with execio diskr, but the program did not do anything.
I tried the ADDRESS LINKpgm to, but I did not succeed. Any Idea?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 10, 2016 2:07 am
Reply with quote

Why do they need to be "below each other"? Why can they not be on the same line? why can they not have other lines between?

Are you asking if multi-threading is possible in Rexx? (Nope, as far as I can tell - try PL/1).
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 12:08 pm
Reply with quote

Unfortunately the Program can process them only thisway, i tried it the give them in the same line.
I am not speaking about multi-threading, these belong together.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jun 10, 2016 1:13 pm
Reply with quote

unfortunately, while the problem might be clear to You, You were not able to explain it to us
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 10, 2016 2:19 pm
Reply with quote

Two statements on one line is easy - just seperate each one with a semi-colon. But they still execute separately.

Or, do you mean you want the two statements to be merged into one statement?
I have no idea what AJMCMD is or AJM. It is not Rexx. Is it a vendor product? If so, the documentation should tell you how to use it and any problems should be addressed to the vendor.
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 2:24 pm
Reply with quote

Yes, it was the semicolon. I figured it out to in the meantime. But thank you anyway. Gosh, I spent too many hours on this little problem...

Yes AJM is not rexx, it is a vendor product.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 10, 2016 3:30 pm
Reply with quote

But why do you need the 2 statements on the same line? There is no difference between that and having them on separate lines. They both execute one at a time. Having them on separate lines is the preferred style.
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 3:57 pm
Reply with quote

I do not neccessariy need them in the same line, but if I put them just simply in two lines, they are processed after each other, separately, although they belong together.
I borrowed the whole thing from JCL(more parameters more lines), where this works fine, there was no very specific dokumentation for rexx, or tso.
This is why I asked. But the semi-colon works.

I wanted to know, if I can give parameters not only as string, but in an allocated dd, and open them with execio.
Or maybe with ATTCHPGM, of LINKPGM.
Or any other solution, that makes my code work. And then you saved the day.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jun 10, 2016 4:03 pm
Reply with quote

Quote:
This is why I asked. But the semi-colon works.


what is that You do not understand when we say that writing
Code:
first rexx stmt; second rexx stmt;...;umpteenth rexx stmt

the statements execute in STRICT sequence
and the behaviour is EXACTLY the SAME as writing
Code:
first rexx stmt
second rexx stmt
...
umpteenth rexx stmt


and NEVER a rexx script has the need to write multiple statements on the same line
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 4:31 pm
Reply with quote

I understand. I really appreciate that you make it clear.

Not like I want to prove you wrong, because I pretty sure you know much more than I in this topic. But I tried that:


"ALLOC F(AJMPRINT) DA(xx) SHR"
"ALLOC F(AJMOUT) DA("DSN") SHR"
"AJMCMD ADDRESS AJM(xx)"
"EXTRACT GROUP(xx) NET(xx)"
"FREE FILE(AJMPRINT)"
"FREE FILE(AJMOUT)"
"FREE FILE(AJMCMD)"


Trace: >L> "EXTRACT GROUP(xx) NET(xxx)"
IKJ56500I COMMAND EXTRACT NOT FOUND

Wich means the extract needs the AJMCMD, just like in the original code I posted. And thatway they are processed separately (because they are handled as separate rexx statement). In this case the program acts differently with a semicolon, and with statements in separate lines. Cheers[/code]
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 4:31 pm
Reply with quote

I understand. I really appreciate that you make it clear.

Not like I want to prove you wrong, because I pretty sure you know much more than I in this topic. But I tried that:

[code]
"ALLOC F(AJMPRINT) DA(xx) SHR"
"ALLOC F(AJMOUT) DA("DSN") SHR"
"AJMCMD ADDRESS AJM(xx)"
"EXTRACT GROUP(xx) NET(xx)"
"FREE FILE(AJMPRINT)"
"FREE FILE(AJMOUT)"
"FREE FILE(AJMCMD)"



[code]
Trace: >L> "EXTRACT GROUP(xx) NET(xxx)"
IKJ56500I COMMAND EXTRACT NOT FOUND

Wich means the extract needs the AJMCMD, just like in the original code I posted. And thatway they are processed separately (because they are handled as separate rexx statement). In this case the program acts differently with a semicolon, and with statements in separate lines. Cheers[/code]
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 4:41 pm
Reply with quote

And this the statement that works:
"AJMCMD ADDRESS AJM(xx);EXTRACT GROUP(xx) NET(xx)"
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jun 10, 2016 4:59 pm
Reply with quote

it means that the script is not parsed by rexx but by somebody else!
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 5:01 pm
Reply with quote

Yes, it the parameters are parsed by the program.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jun 10, 2016 5:14 pm
Reply with quote

as usual the info posted at the beginning was misleading ...
confusing a rexx statement with the parameters passed to AJMCMD

Code:
"AJMCMD ADDRESS AJM(xx);EXTRACT GROUP(xx) NET(xx)"


are NOT two rexx statements

just a strange way for the AJMCMD to parse the parameters.

topic moved, it is not a REXX problem.
Back to top
View user's profile Send private message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 5:42 pm
Reply with quote

I feel like I should apologise for asking....

Man, my first sentence was: "I would like to give two parameters to a Program in REXX"

And you say: confusing a rexx statement with the parameters passed to AJMCMD

Why exactly, I do not know.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jun 10, 2016 5:55 pm
Reply with quote

Quote:
Why exactly, I do not know.


because You asked in the REXX section of the forum
and You should have noticed that
we all replied according to the common practices and standards of REXX

if AJM wants parameters in a different format it means that
the question is not rexx related. AMEN
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top