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

Cobol - Passing value using verb VALUE


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Nov 25, 2010 5:30 pm
Reply with quote

Hi,
I want to pass following value while defining variable:
value = 'INCLUDE COND=(1,8,CH,NE,C' ')'

but to ' i am getting error while compiling the code.

Kindly guide how to pass the value mentioned above
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 25, 2010 5:33 pm
Reply with quote

krunalbafna wrote:
but to ' i am getting error while compiling the code.
Well lucky old you, getting an error.

OK, so you have an error. Any chance you might actually want to tell us about it as unfortunately yesterday was psychic day.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Nov 25, 2010 5:47 pm
Reply with quote

Hi,
I want to pass following value while defining variable:
value = 'INCLUDE COND=(1,8,CH,NE,C' ')'

I am passing the following parameter in value clause as
VALUE = 'INCLUDE COND=(1,8,CH,NE,C''' ''')'

I am getting error while compiling the code.
Following is the error:
"')'" was invalid.  Scanning was resumed at the next area "A" item, level-number, or the start of the next clause.

Kindly guide how to pass the value mentioned above
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 25, 2010 5:47 pm
Reply with quote

how many single quotes to you expect to use?
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Nov 25, 2010 5:49 pm
Reply with quote

I want to pass two single qutoes with a space in between the two quotes
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Nov 25, 2010 6:00 pm
Reply with quote

Please post the COBOL variable definition you've used. Just a guess, if you've used " ' " (single inverted comma), try wraping the contentes in double-quotes:
Code:
"INCLUDE COND=(1,8,CH,NE,C' ')"
.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Nov 25, 2010 6:01 pm
Reply with quote

And yes, please learn to use the BBCodes Tags.
Back to top
View user's profile Send private message
richard198

New User


Joined: 19 Nov 2010
Posts: 1
Location: cn.gz

PostPosted: Mon Nov 29, 2010 2:02 pm
Reply with quote

Anuj Dhawan wrote:
Please post the COBOL variable definition you've used. Just a guess, if you've used " ' " (single inverted comma), try wraping the contentes in double-quotes:
Code:
"INCLUDE COND=(1,8,CH,NE,C' ')"
.



good ,i didn't know this b4
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Nov 29, 2010 3:18 pm
Reply with quote

You're welcome. I just hope it works for OP as well.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Dec 01, 2010 1:01 pm
Reply with quote

Hi Anuj,
THanks for the reply
where can i get the BBCodes Tags
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Dec 01, 2010 1:05 pm
Reply with quote

ibmmainframes.com/faq.php?mode=bbcode

Bill
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top