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
 
ALPHABETIC check in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Thu Aug 17, 2017 7:13 pm    Post subject: ALPHABETIC check in COBOL
Reply with quote

Hi,

Can we code the ALPHABETIC check in cobol as follows

IF VAR1 ALPHABETIC
MOVE A TO B

or do I need to code IS ALPHABETIC

IF VAR1 IS ALPHABETIC
MOVE A TO B

Is both correct ?
Back to top
View user's profile Send private message

prino

Senior Member


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

PostPosted: Thu Aug 17, 2017 7:44 pm    Post subject:
Reply with quote

Why the flipping 'ell don't you try, rather than wasting our time here?
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 112
Location: Puerto Rico

PostPosted: Thu Aug 17, 2017 7:46 pm    Post subject:
Reply with quote

Both are correct.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Thu Aug 17, 2017 7:54 pm    Post subject:
Reply with quote

Thanks
Jose Mateo
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 17, 2017 8:08 pm    Post subject: Reply to: ALPHABETIC check in COBOL
Reply with quote

The Enterprise COBOL V6.1 Language Reference manual is at http://publibfp.boulder.ibm.com/epubs/pdf/igy6lr10.pdf and page 264 gives the syntax diagram for class conditions. The syntax diagram makes it very clear that the IS can be part of the statement or not -- programmer's choice.

Bookmark this reference manual -- if you use it before posting you will resolve most of this type of question without needing to post anything. This IS an expert's forum and you are expected to be able to do your own research BEFORE posting a question.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Thu Aug 17, 2017 8:32 pm    Post subject: Reply to: ALPHABETIC check in COBOL
Reply with quote

Quote:
Is both correct ?


what happened when You tested it with a small COBOL program ?
or when You looked at the COBOL manuals ?
icon_evil.gif
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 408
Location: USA

PostPosted: Thu Aug 17, 2017 8:59 pm    Post subject: Reply to: ALPHABETIC check in COBOL
Reply with quote

Quote:
Is both correct ?

'Is' is Not correct. You should use 'Are'.

So, the correct statement is:
Quote:
Are both correct?

icon_biggrin.gif

.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1817
Location: NY,USA

PostPosted: Fri Aug 18, 2017 8:54 pm    Post subject:
Reply with quote

Good one!! RahulG31 icon_biggrin.gif
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Fri Aug 18, 2017 10:46 pm    Post subject: Re: Reply to: ALPHABETIC check in COBOL
Reply with quote

RahulG31 wrote:
Quote:
Is both correct ?

'Is' is Not correct. You should use 'Are'.

So, the correct statement is:
Quote:
Are both correct?

icon_biggrin.gif

One can also understand this as:
Quote:
Is "both" correct?
(or it must be replaced with "boss"?)

icon_razz.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

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