Answers were Sorted based on User's Feedback
Answer / shan
To be more clear,
Declare a variable with usage is index (01 WS--VAR-DISPLAY
USAGE IS INDEX)
then SET WS-VAR-DISPLAY to WS-INDEX
|Is This Answer Correct ?||10 Yes||5 No|
Answer / naina
Yes, we can!!!
The easiest way, which would work in all versions of COBOL
SET W-S-VAR-PICS9(9)-USAGE-DISPLAY TO THE-INDEX-U-WANT-TO-
|Is This Answer Correct ?||4 Yes||4 No|
You can't directly display the Index. But you can create a normal numeric field in your working storage and set that to the Index.
05 WS-CUSTOMER PIC X(25) OCCURS 10 INDEXED BY INDEX1.
05 WS-INDEX-COUNT PIC 9(02) VALUE 0.
SET WS-INDEX-COUNT TO INDEX1.
|Is This Answer Correct ?||0 Yes||0 No|
What is file status 92?
i need a program by giving input as a abcd in any randem order but i need a output as 1234 related to abcd. i.e,. a for 1,b=2,c.....etc..
What is the file organization clause ?
I have files that contains both duplicates files(occur more than twice) and non-duplicate files.The file is already sorted by a key.I want to determine those records that are duplicate and will be move to a duplicate file and non- duplicate files to be move to a valid file.thank you.help please
What is Comm?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
how can i see junk values in dclgen or in hostvariable of comp ?
maximum of how many screens we can open in emulator
Explain Restart Logic in Cobol?
what is the maximum error code in mainframe
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
is this below syntax correct? CALL 'subprg' using A,B Please help