Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are
the ways for doing this?
Answer Posted / varun v
yes you can..use REDEFINES for the same purpose.
Move X(9) to 9(9):-
Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).
Now you can move X(9) variable to WS-VARX.Eventually it is
moved to the 9(9) variable WS-VARN.
Similarly viceversa..
| Is This Answer Correct ? | 18 Yes | 12 No |
Post New Answer View All Answers
What is the usage of comp fields in cobol?
What is redefines clause in COBOL?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
what is the difference between COBOL2 AND COBOL390?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
Differentiate between structured cobol programming and object-oriented cobol programming.
What the difference is between continue and next sentence?
Which division and paragraphs are mandatory for a COBOL program?
Explain how you can characterize tables in cobol?
In COBOL, what is the different between index and subscript?
What type of SDLC u followed? Why?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
What are the different rules for performing sort operation?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What are the pertinent COBOL