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|
which one is the best of com and com-3.using of real time ?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Differentiate COBOL and COBOL-II?
can i use multiple when statements in search & search all ? justify ur answer?
what is meant by binary search?
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
if someone is using my file,how can i find which user id is using?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.
u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?
what is a zoned decimal data type and how it will be stored?