Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

COBOL Programming :: Alphanumeric to Numeric move on UNIX

$
0
0
Author: mistah kurtz
Subject: Alphanumeric to Numeric move on UNIX
Posted: Wed Jul 27, 2016 8:47 pm (GMT 5.5)

We are migrating a COBOL program from Mainframe to Unix System.

In one of the COBOL program there is a MOVE statement to move the data from PIC X(4) to PIC 9(4).

If the alpha nuimeric field is all spaces, then the Numeric field has the value as X'404040F0" in Mainframe. But In Unix environment Numeric field has all the spaces: X'40404040".

I believe that this is due to different platform and compiler differences. But the requirement is that the output should match exactly.

I though of moving the hard coded value X'404040F0" if the alphanumeric field has all spaces. But i was just wondering if this is the only possible way.

Could you suggest if there are any other way to achieve this on UNIX.

Thanks.
K.


Viewing all articles
Browse latest Browse all 8500

Trending Articles