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
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
What kind of error is trapped by on size error option?
What is link edit in cobol?
How do you reference the following file formats from cobol programs?
what is the difference between COBOL2 AND COBOL390?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is an in line perform? When would you use it? Anything else you wish to say about it.
How are the next sentence and continue different from each other?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Give some examples of command terminators?
A table has two indexes defined. Which one will be used by the SEARCH?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
i need a small 3d program using inline and outline.