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.
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
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|
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What does the initialize statement do ?
how will u code parm parameter and where pls ?
can i use multiple when statements in search & search all ? justify ur answer?
can I copy book which contain db2 statment in procedure divion?
why do u need inspect verb?
WHAT IS SOC3?HOW IT CAN BE RESOLVED?
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
if you give cylinder(1,1)how many cylinders it will be allocate?
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??