1) can we display the index?
Answers were Sorted based on User's Feedback
Answer / shan
Ya correct,
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
Display WS-VAR-DISPLAY
| Is This Answer Correct ? | 12 Yes | 7 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.
Example:
01 WS-TABLE.
05 WS-CUSTOMER PIC X(25) OCCURS 10 INDEXED BY INDEX1.
01 WS-NUMERICS.
05 WS-INDEX-COUNT PIC 9(02) VALUE 0.
SET WS-INDEX-COUNT TO INDEX1.
DISPLAY WS-INDEX-COUNT.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / naina
Yes, we can!!!
The easiest way, which would work in all versions of COBOL
is
SET W-S-VAR-PICS9(9)-USAGE-DISPLAY TO THE-INDEX-U-WANT-TO-
DISPLAY
DISPLAY W-S-VAR-PICS9(9)-USAGE-DISPLAY
| Is This Answer Correct ? | 4 Yes | 5 No |
How to define a array dynamically.....
What is the LINKAGE SECTION used in COBOL?
01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would be stored in b.
is this below syntax correct? CALL 'subprg' using A,B Please help
What are declaratives and what are their uses in cobol?
if we have a 10 steps how to override the 4th step in jcl?
How to resolve the soc4 & soc7 other than following answers. Soc4 can resolved using mispleed dd name and dd name is not matching with file and soc7 check the sysdump and copy the offest address then correct it in the program.
10 Answers ADP, Amdocs, Cap Gemini, Keane India Ltd, Super Value, TCS,
hie everyone.i just completed my b.tech in electronics and joined mainframes course.am i doing right course for my better future?please help me with your suggestions.ill be very thankful to you guys.
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
How can you pass values from COBOL program to non-COBOL programs?
why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc