Has any one out there used C/400 generated bin file on PC?
I have created a binary file on AS/400 IFS using ILE C. The file
contains both numeric data and string data. I have taken care to
translate the string data from EBCDIC to ASCII in my program. When I
transfer this file on PC (using bin option of ftp), the string data is
read correctly by the PC program, however the numeric data is not read
correctly by the PC program. I believe this problem is because the way
PC and AS/400 store bin data differently. PC uses least significant byte
first and AS/400 uses most signifant byte first. I want to know if this
really is the problem or is it something else. If so how should I flip
the bytes of bin data.
Thanks in advance for your help.
Mubashir
Rating: 0%, 0 votes
This is something that I do all of the time, so I think you should be
able to accomplish what you want. There are AS/400 binary data formats
that are not compatible with anything I've seen on a PC. This includes
zoned and packed formats. An int on the AS/400 is 4 bytes which is
probably not the length of an int on the PC. But you should be able to
create C short and long numeric data and have that readable on the PC.
HTH,
Patrick
--
IBM AS/400 communications, FTP automation, and network security
software and consulting services.
http://www.patownsend.com
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
as/400 can be read by PC C programs?
Thanks again.
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
For the int formats you do of course need to make sure that the same
length is being used on both ends.
In <36867F20.58C31 @ibm.net>, Mubashir Kazia <k @ibm.net> writes:
Dan Hicks
Hey!! My advice is free -- take it for what it's worth!
http://www.millcomm.com/~danhi cks
---== http://www.newsfeeds.com - Largest Usenet Server In The World! ==---
---== http://www.newsfeeds.com - Largest Usenet Server In The World! ==---
Was this solution helpful? Show your Appreciation by rating it:
Post a New problem for IBM C400 Multimedia Projector
Email this problem
