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
 

 

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

Active Member


Joined: 07 Feb 2009
Posts: 984
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: 175
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: 641
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: 1738
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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