Can we dynamically increase the size of occurs clause? i.e
In case I an not sure of the size of array and want to
increase the size at run time.If yes , how?
Answer / lu
yes, ...you declare an array like this:
77 ws-counter pic 9(04) value zeroes.
01 ws-array.
07 ws-field pic x (01) ouccurs 1 to 1000
depending on ws-counter.
Procedure Division.
Perform Read-file until ws-end-of-file = 'y'.
Read-file.
Read file at end
move 'y' to ws-end-of-file.
if ws-end-of-file not = 'y'
add 1 to ws-counter
move aa of file to ws-field (ws-counter).
the maximun is 1000 occurrences and minimun is 1...
Is This Answer Correct ? | 14 Yes | 0 No |
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
in the TIME parameter we r giving hours r minutes
How do you code Cobol to access a parameter that has been defined in JCL?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???
What is diff between vsam and db2?what is advantage of db2 over vsam?which is best suited one?
Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS
What are the differences bitween cobol and cobol-2?
can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?
what are the diferences b/w sub-script and index?
what is meant by binary search?