when i am trying to move 6 byte alphanumeric data to 6 byte numeric variable, i am able to get the data properly. but when i am passing an alphanumeric data greater than 6 bytes,my programcanhandle that data and get only the 6 bytes from the input data in the alphanumeric variable then pass to the numeric variable.
in the second case i am not getting the correct output.
Problem when trying to moving alpha numeric to char
ok for the language barrier, but what about rereading the post before hitting enter ???
better to scratch everything and restart from the beginning
cheers enrico When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser, so that I am sure that the information requested can be reached with a very small effort
1. Numeric fields should contain numbers -- if the PICTURE is nothing but 9's, then you should have nothing but zero through nine in that varaible. 2. Moving AAA/ZA to a numeric variable, you will get AAA/Z1 and (depending upon the compiler option NUMPROC) that's the way COBOL works -- it will ensure there is a valid sign (or unsigned byte) so the X'C1' in the last byte will be changed to X'F1'. 3. You can get around the whole problem by changing the receiving variable to PIC X(6) instead of PIC 9(6) -- or whatever you have it defined as. You might have to investigate JUST RIGHT in the COBOL manual (link at the top of the page).