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 |
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
can we use 77 level no for Redefines?if we use give an example?
What is the difference between COMP & COMP-3 ?
Following questions were asked in Capegemini on 8th sep,2012 mainframe test 1.)Condition code for dul recors in VSAM- 2.) Is NULL or =NULL in Select statement 3.)max size of CI 4.)What happens after CI is full 5.)Ques on COND parameter 6.)which among following can not be rolled back a)delete table b.)droptable c)Update d.)insert 7.)groupby and orderby sql querries 8.)Max extents in VSAM file 9.)quesn on DPRTY=(1,10) 10.)range of condition codes in COBOL 11.)occurs clase can not be used at which level? 12.)delimiter in jcl 13.)sort card for file in PGM=SORT 14.)PIC(6) value 120056 possible? 15)question on BLKSIZE Is (20,20) and (20,10) possible? 16.)number of bytes in RDF 17.)Can we use index in WS-section or LK-section 18.)Verify command in IDCAMS used for? 19.)question on Alternate Index 20.)Return code of file attribute mismatch 21.)In which format COBOL variables stored? 22.)what is Alternate of HANDLE? 23.)can SUM,AVG,MIN,ROUND used in numeric and char variable data types? 24.)What is the datatype of FILE STATUS codes in WS-section?
which is better either static call or dynamic call? and why?
What kind of error is trapped by on size error option?
How to recover a deleted source physical file from library?
I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest
what is the difference between external and global variables?
how do u link sub pgm to main pgm ?
what is meant by binary search?
What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?