can u plz expain me how to declare dynamic array? what is
the meaning of depending on clause in dynamic array?
Answers were Sorted based on User's Feedback
Answer / amarnadh reddy
When a table of variable size is required, the occurs
depending clause may be used.
01 A1 PIC 99.
01 REC-1.
05 P1 PIC XX.
05 P2 PIC 99 OCCURS 1 TO 90 TIMES DEPENDING ON A1.
Here depending on the value of the data name A1 the size of
P2 Will be decided. It can be anything between 1 and 90.
| Is This Answer Correct ? | 31 Yes | 4 No |
Answer / roger riek
You can indeed create dynamic arrays in MVS Cobol. You need
to use the heap facility in the language environment.
There is a discussion about how to do this at
http://home.centurytel.net/rjriek/
| Is This Answer Correct ? | 0 Yes | 1 No |
dynaic array is notink but a two dimension array.
01 studet.
02 stunam occurs 3 to 4 times depanding on n.
03 stuname pic x(15).
03 stumrk occurs 2 times.
04 stumark pic 9(3).
this is dynamic array.now runtime will pass the input.because
using depanding clause.
depanding clause pass the value runtime.
| Is This Answer Correct ? | 3 Yes | 12 No |
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?
Why IBM?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
wht is structured cobol pgm and non structred cobol pgm ?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the purpose of Identification Division?
What is an in-line perform ?
HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?
can I copy book which contain db2 statment in procedure divion?
How to remove 2 duplicate records and copy only one using job control language?
Can printer files (having 133 characters) be of variable length?
what is s000 u4087 error? please give the all error codes in cobol,jcl.