Author |
Message |
Topic: How to view/display the index of a SEARCH on an array |
dhruv
Replies: 7
Views: 4848
|
Forum: Application Programming Posted: Thu Jul 22, 2004 3:06 pm Subject: How to view/display the index of a SEARCH on an array |
Since INDEX variables are actually register notations, they must be in their native binary format.
So, the following statements should work
SET Working-storage-pic-9-variable TO SCHIDX1
DISPLA ... |
Topic: Conversion |
dhruv
Replies: 9
Views: 3821
|
Forum: Application Programming Posted: Thu Jul 22, 2004 10:59 am Subject: Conversion |
Thanks for all your replies.
The reason i had posted this question was I was under the impression that I was missing something basic.
But if thats the way the cobol compiler is implemented, then ... |
Topic: Conversion |
dhruv
Replies: 9
Views: 3821
|
Forum: Application Programming Posted: Thu Jul 22, 2004 6:06 am Subject: Conversion |
I agree that low-values are binary zeroes.
So If VAR1 = ZEROES (VAR1 = x'000000')
being evluated as false is correct.
But then, why is the statement
IF VAR1 = VAR2 (VAR1 = x'000000' , ... |
Topic: Conversion |
dhruv
Replies: 9
Views: 3821
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:54 am Subject: Conversion |
There is no SOC7 abend. I am a little surprised that you expect one.
Anyway, what about the following scenario
VAR1 PIC 9(3) .
VAR1_RDF REDEFINES VAR1 PIC X(3).
MOVE LOW-VA ... |
Topic: SEARCH & SEARCH ALL statement in COBOL |
dhruv
Replies: 6
Views: 4700
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:48 am Subject: SEARCH & SEARCH ALL statement in COBOL |
If you use a limiting factor (equivalent of the ODO) in the PERFORM VARYING statement, in conjunction with an indexed variable(not a working storage variable), then i suppose the PERFORM VARYING might ... |
Topic: SEARCH & SEARCH ALL statement in COBOL |
dhruv
Replies: 6
Views: 4700
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:37 am Subject: SEARCH & SEARCH ALL statement in COBOL |
Lets say you a table with 100 elements.
But only the first 30 elements have been populated. IF the ODOvariable is 30, then the SEARCH will come out after scanning through the first 30 elements, ra ... |
Topic: Conversion |
dhruv
Replies: 9
Views: 3821
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:33 am Subject: Conversion |
Assigned low-values through group level move
Thanks |
Topic: SEARCH & SEARCH ALL statement in COBOL |
dhruv
Replies: 6
Views: 4700
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:30 am Subject: SEARCH & SEARCH ALL statement in COBOL |
The following need to considered when deciding between a linear SEARCH vs PERFORM
SEARCH uses index Specified in the INDEXED BY CLAUSE.
Also, linear SEARCH on a table using a OCCURS DEPENDIN ... |
Topic: Conversion |
dhruv
Replies: 9
Views: 3821
|
Forum: Application Programming Posted: Thu Jul 22, 2004 4:12 am Subject: Conversion |
I am a little confused with the following scenario
VAR1 : Defined as pic 9(3) Contains low-values (x'000000')
VAR2 : Defined as pic 9(3) contains 0 (x'F0F0F0).
IF VAR1 = ZEROES
( This sta ... |
Topic: Making the Last Record as the First Record in File |
dhruv
Replies: 23
Views: 9609
|
Forum: Utilities Posted: Tue Jun 01, 2004 10:26 am Subject: Making the Last Record as the First Record in File |
Hi vini,
If the order of records needs to be maintained. then one way you can avoid all this sorting is to
. Write the header record to a seperate file
. Concatenate this 'header' file ahead ... |
|