Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what if any ,is the syntex error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
........
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.

Answer Posted / vish

the syntax is wrong..a couple of mistakes...

1. The level of C is 02 which means it is a sublevel of B.
hat being the case B becomes the group level item and hence
the PIC clause for B is invalid.

2. The conditional statement is wrong, correct sysntax can
be either ib below:
IF (B IS NUMERIC)
ADD 10 TO C

IF B IS NUMERIC
ADD 10 TO C

Basically 'IS' is missing from the statement.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a Search can be done on a table with or without Index?

1255


What is the difference between a binary search and a sequential search what are the pertinent cobol?

1105


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1170


What is the difference between PIC 9.99 and 9v99 in COBOL?

1264


What is the difference between binary search and sequential search?

1054


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1138


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17820


What is amode(31)

1121


What is comp-1 and comp-2?

1198


how do you reference the fixed unblock file formats from cobol programs

1187


How do you differentiate between cobol and cobol-ii?

1151


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4128


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

7770


Why occurs cannot be used in 01 level in COBOL?

1135


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

3198