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
 
How to use CHARIN Funtion is REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
View previous topic :: :: View next topic  
Author Message
pj2810

New User


Joined: 07 Aug 2012
Posts: 4
Location: india

PostPosted: Tue Aug 07, 2012 11:03 am    Post subject: How to use CHARIN Funtion is REXX
Reply with quote

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

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Tue Aug 07, 2012 11:59 am    Post subject:
Reply with quote

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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 07, 2012 3:13 pm    Post subject:
Reply with quote

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

New User


Joined: 07 Aug 2012
Posts: 4
Location: india

PostPosted: Tue Aug 07, 2012 3:47 pm    Post subject: Reply to: How to use CHARIN Funtion is REXX
Reply with quote

This is problem a from zOS
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 182
Location: UK

PostPosted: Tue Aug 07, 2012 4:18 pm    Post subject:
Reply with quote

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

New User


Joined: 07 Aug 2012
Posts: 4
Location: india

PostPosted: Tue Aug 07, 2012 4:57 pm    Post subject: Reply to: How to use CHARIN Funtion is REXX
Reply with quote

Many Thanks for your answers ... Quite helpful icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 07, 2012 5:26 pm    Post subject: Re: Reply to: How to use CHARIN Funtion is REXX
Reply with quote

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? icon_eek.gif

As David says, this is your problem then.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 658
Location: Whitby, ON, Canada

PostPosted: Tue Aug 07, 2012 5:33 pm    Post subject:
Reply with quote

Stream I/O (CHARIN et al) is a function package that can be installed on z/OS. It is not part of the native TSO/Rexx support.

See http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.rexa100%2Fh1981605210.htm
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 07, 2012 7:30 pm    Post subject:
Reply with quote

Thanks Don, appreciate the URL.

I surely did miss that link in my searches.... icon_redface.gif

Regards,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Wed Aug 08, 2012 2:39 am    Post subject: Re: How to use CHARIN Funtion is REXX
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests 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 write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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