View previous topic :: View next topic
|
Author |
Message |
pj2810
New User
Joined: 07 Aug 2012 Posts: 4 Location: india
|
|
|
|
Hi,
I am trying to write REXX program using CHARIN function.
But getting following error
Code: |
14 +++ VAR1 = CHARIN ( INPUT, 1, 20)
Error running CHARIN1, line 14: Unexpected "," or ")" |
Code that i have written is,
Code: |
"EXECIO 1 DISKR INFILE"
PARSE PULL INPUT
/*SAY INPUT*/
VAR1 = CHARIN ( INPUT, 1, 20)
SAY VAR1
"EXECIO 0 DISKR INFILE(FINIS" |
Coded - Anuj |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
I'd suggest you start reading a manual for REXX on z/OS. CHARIN is not doing what you want it to do, and next to that, it's rarely available on z/OS systems. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I agree with Robert (prino), CHARIN/LINEIN/CHAROUT/LINEOUT are for PC and EXECIO for mainframe.
This is your first post on the Forum, so tell us if you are phrasing a probelm from zOS world or from PC? |
|
Back to top |
|
|
pj2810
New User
Joined: 07 Aug 2012 Posts: 4 Location: india
|
|
|
|
This is problem a from zOS |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Well, I think that's your probelm then. According to the manual there is no such command as CHARIN.
What makes you think there is? |
|
Back to top |
|
|
pj2810
New User
Joined: 07 Aug 2012 Posts: 4 Location: india
|
|
|
|
Many Thanks for your answers ... Quite helpful |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
pj2810 wrote: |
This is problem a from zOS |
There is no "end scope terminator" in your sentence (too much COBOL these days), so I'll assume your statement is not yet complete -- why do you say it's from zOS, just because you've used something applicable to PC in the realm of native zOS?
As David says, this is your problem then. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Thanks Don, appreciate the URL.
I surely did miss that link in my searches....
Regards, |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
pj2810 wrote: |
Hi,
I am trying to write REXX program using CHARIN function.
But getting following error
Code: |
14 +++ VAR1 = CHARIN ( INPUT, 1, 20)
Error running CHARIN1, line 14: Unexpected "," or ")" |
Code that i have written is,
Code: |
"EXECIO 1 DISKR INFILE"
PARSE PULL INPUT
/*SAY INPUT*/
VAR1 = CHARIN ( INPUT, 1, 20)
SAY VAR1
"EXECIO 0 DISKR INFILE(FINIS" |
|
The issue of whether or not CHARIN is available on your system is not relevant to the error you're getting. In z/OS (at least) Rexx, a function name must be immediately followed by the opening parenthesis. Change your code to
Code: |
"EXECIO 1 DISKR INFILE"
PARSE PULL INPUT
/*SAY INPUT*/
VAR1 = CHARIN(INPUT,1,20)
SAY VAR1
"EXECIO 0 DISKR INFILE(FINIS" |
|
|
Back to top |
|
|
|