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 is the difference between subscript and index?



What is the difference between subscript and index?..

Answer / robertd903

Subscripts are programmer-defined variables, of numeric type--used to reference an array.
Example:
77 WS-SUB PIC 9(04) COMP.
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 Times PIC X(80).

In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-SUB) TO...

Indexes are defined by the programmer, but the PICTURE clause is omitted.
Example:
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 TIMES INDEXED BY WS-IDX.
10 FILLER PIC X(80).

In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-IDX) TO...

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas

3 Answers   IBM,


how you read control card into array?

3 Answers   HCL,


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

0 Answers  


) How do you access the migrate the data from production region to development region

1 Answers   IBM,


What is the LINKAGE SECTION used for?

4 Answers  


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


how can u redefine picx(10) with pic 9(6).

3 Answers   TCS,


what is the use of comp2 ? where can we use it with example ?

3 Answers   Covansys,


can we use 77 level no for Redefines?if we use give an example?

3 Answers   Mphasis,


I got user abend U4038 while compiling my runjcl.. can anyone help me?

10 Answers   CGI,


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


How many variables can be declared in w-s section.?

2 Answers  


Categories