Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are
the ways for doing this?
Answers were Sorted based on User's Feedback
hi all
Numeric can be moved to alphanumeric
and alphanumeric can be moved to numeric only if it has the
numeric data.
Is This Answer Correct ? | 41 Yes | 10 No |
Answer / sivakumar sekharannair
Chakri and kavya are correct.We can move numeric to
alphanumeric and vice versa. error will be thrown only when
we do arithmetic operations when we move alpha numeric to
numeric data items .
Is This Answer Correct ? | 20 Yes | 1 No |
Answer / jawaad
yes you can do both , but wait....
1) 9(9) to x(9) will be fine
2) x(9) to 9(9) may have problem in some cases:-
a) Suppose :x(9) has value "5"
when you move to 9(9) it will be
"5 " ,Yes 9(9) will have spaces
instead of
"000000005"
b)you will get soc7 when you perform arithemetic on x(9)
above
Is This Answer Correct ? | 10 Yes | 3 No |
Answer / 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 |
Answer / chakri
kavya is right. We can move numeric to alphanumeric and
vice versa. error will be thrown only when we do arithmetic
operations when we move alpha numeric to numeric data
items .
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / sp
Fully agree to Jayaprabhu.
We can move 9(9) to X(9). But if alphanumeric field
contains only numeric then and then we can move X(9) to 9
(9).
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ajay
Sorry ..
I don't know why you are looking into Redefines clause for
the above ...
See what ever it is you can able to move from NUMERIC to
ALPHANUMERIC.But you can not able to move alphanumerics to
NUMERIC.
Move 9(9) to x(9) --possible
Move x(9) to 9(9) -- Not possible.
They may try to confuse you ... but don't give a chance to
them Thanks.
Is This Answer Correct ? | 12 Yes | 8 No |
Answer / leena_kulkarni
Hey varun,
thanx for the answer but do you know the other way than
REDEFINES? Actually I was looking for that.
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / harish
Hi,
i hope ajay's answer is correct,but if by moving we will
not get any error .suppose if we use recieved field in any
operation we will get soc07 ..
pls correct me if anything wrong
HARISH POOMGAME SHIVAPPA
NIIT TECHNOLOGY
KOLKATA
Is This Answer Correct ? | 1 Yes | 2 No |
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??
What is Comm?
2 Answers IBM, Kemper Corporation,
How does IDMS insure data integrity?
How many bytes S(8) comp field occupy and its maximum value?
The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
hai friends ,i have HSBc exam on this sunday,my platform is Mainframe,i have 1 year exp,pls any one send me placement papers of Hsbc and technical questions on mainframe
6 Answers Citi Bank, CitiGroup, HSBC, iNautix, Wipro,
How can we know that cobol program is using report file or simple file....?
In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)
I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??