How do define Dymanic array in cobol how do u define single
demensional arry and multidymensional arry in ur cobol.
Answers were Sorted based on User's Feedback
Answer / billyboyo
In IBM Cobol
1) In IBM's Language Environment you can dynamically
acquire storage (look up HEAP in the manual). The storage
you acquire you can use as you like. Can be an array,
therefore a dynamic array. It is a "work-around" as dynamic
arrays are not directly supported.
2) 01 SINGLE-DIM-ARRAY
05 SDA-ITEM PIC X OCCURS 30.
A single-dimension array of thirty one-byte characters.
3) 01 MULTI-DIM-ARRAY.
05 MDA-FIRST-DIM OCCURS 20.
07 MDA-SECOND-DIM OCCURS 30 PIC X.
A multi-dimension array of 20 times 30 one-byte characters.
| Is This Answer Correct ? | 4 Yes | 1 No |
single dimensional array-
01 year grp.
05 month pic 9(2) occurs 12times.
multi dimensional array
01 year grp.
05 month occurs 12times.
05 weak occurs 4 times.
05 days pic x(4) occurs 7 times.
dynamic array-
01 yy grp.
05 month pic x(4) occurs 10-12 times depending upon 'yygrp'.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / mr.perfect
dynamic array is used to accept the value based on the
random value
dynamic array-
01 yy grp.
05 month pic x(4) occurs 10 times depending upon IDX
IDX is variable name
01 idx pic x(1).
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kalyan.p430
sorry i cant understand what is dynamic array?......pls
anyone explain to me
| Is This Answer Correct ? | 0 Yes | 0 No |
WHAT IS SOC3?HOW IT CAN BE RESOLVED?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
there is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify? a.SEQUENTIAL b.RANDOM c.DYNAMIC D.ACCESS MODE has nothing to do with it
What is the difference between perform … with test after and perform … with test before?
When search all is used in cobol program without sorted input data?
6 Answers CGI, Principal Finance,
what happens of we dont give time stamp in precompilation process
what is jcl approach for programming?
i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?
Define REDEFINE clause and Is it possible to have the redefine clause anywhere in the working storage section for a data name?
hw to create 3 dimensional array & hw to access it?
What is SDSF?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.