Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Multiple parameters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Multiple parameters
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: 1715
Location: UK

PostPosted: Fri Jun 10, 2016 2:07 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jun 10, 2016 1:13 pm    Post subject: Reply to: Multiple parameters
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: 1715
Location: UK

PostPosted: Fri Jun 10, 2016 2:19 pm    Post subject:
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    Post subject:
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: 1715
Location: UK

PostPosted: Fri Jun 10, 2016 3:30 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jun 10, 2016 4:03 pm    Post subject: Reply to: Multiple parameters
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    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jun 10, 2016 4:59 pm    Post subject: Reply to: Multiple parameters
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jun 10, 2016 5:14 pm    Post subject: Reply to: Multiple parameters
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jun 10, 2016 5:55 pm    Post subject: Reply to: Multiple parameters
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us