Can we move SPACES to numeric field and ZEROES to
alphabetic field? If yes what are the way doing this?
Answer Posted / siva
yes, we can move accordingly thru REDEFINES clause.
Example :
01 WS-A PIC 9(5).
01 WS-AR REDEFINES WS-A PIC X(5).
01 WS-B PIC A(5).
01 WS-BR REDEFINES WS-B PIC X(5).
MOVE 12345 TO WS-A.
MOVE SPACES TO WS-AR.
MOVE 'ABCDE' TO WS-B.
MOVE ZEROES TO WS-BR.
WS-A, WS-AR contains spaces and WS-B, WS-BR contains
zeroes.
Is This Answer Correct ? | 19 Yes | 1 No |
Post New Answer View All Answers
What the difference is between continue and next sentence?
When is inspect verb is used in cobol?
HOw can I get the negative sign while deduct high value from low value
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Explain how you can characterize tables in cobol?
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
What guidelines should be followed to write a structured cobol prgm?
What is redefines clause in COBOL?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What is an in line perform? When would you use it? Anything else you wish to say about it.
what happens if parmparameter passes zero bytes to the program
Write a program to explain size error.
What is the difference between external and global variables in COBOL?
Whats the difference between search & search ALL?