Highlighted
Absent Member.
Absent Member.
634 views

[archive] Vutil Right Justifying Numeric Fields

[Migrated content. Thread originally posted on 05 August 2005]

We are having problems after we transfer our Data files from our LINUX Server to our Windows PC. If we transfer the file (via NFS) to our PC and try to execute the program while in AcuBench we get a data error., that the file format is incorrect.
We tried to convert the file to a sequential file while it is still on the LINUX server and then transfer the Sequential file (as an ASCII file) to the PC and then using vutil to create the Indexed file. When we do that vutil will Right justify all of the numeric fields while our code is looking for left justified numeric fields. Our code will read the file but the numeric fields are all wrong and any Math performed gives you wrong answers.

To get around this we wrote our own indexing program.

The question is shouldn't the Data file be able to be read on either platform? LINUX or Windows?
:confused:
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Vutil Right Justifying Numeric Fields

The file must be transferred binary. I suspect the transfer via NFS is not binary and that this is where the problem is being introduced. If you FTP the file in binary mode it should work fine.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Vutil Right Justifying Numeric Fields

NFS does not do any kind of file translation when copying files from a server.

However, NFS is renowned for being both buggy and slow, and this may have caused the problems you experienced.

I would strongly recommend using 'samba' to allow you to map drives on the PC to directories on the server. It comes as standard on most Linux distros, so you should already have it installed.

That way you can either open the data files directly on the server, or just drag and drop them from the server onto the PC.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Vutil Right Justifying Numeric Fields

I was wrong about using NFS. We are using scp (ssh secure copy) to move the files and they are being moved in binary mode. So in essence they are being ftp'd in binary mode to the PC.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Vutil Right Justifying Numeric Fields

Checkout the acucobol file utility VIO, this may be of some help.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Vutil Right Justifying Numeric Fields

We have experienced a problem if the vision file is vision version 2 on the Unix server, and then transferred to windows. Vutil on the windows couldn't rebuild the file to version 3 or 4, due to "incorrect filetype".

Then we ran vutil -rebuild -3 on the Unix and then transferred the files to windows, and the problem was solved.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.