Unable to Convert from Mainframe Binary to ASCII Type
Posted: Wed Jun 20, 2007 12:12 pm
I am connecting to a mainframe file using a ftp stage and reading the
source file as "binary" as below settings
Data Representation Type : Binary
Check data against Metadata : Yes
Line Termination : No
Then I am reading the whole file as varchar(90) which is the total lenght of record in mainframe and then using conversion as below
FOR PIC X (01) :-
DataTypeEbcdicToAscii(FTP_MF_Data.VarRec[2,1])
FOR PIC S9(9) USAGE COMP:-Fmt(DataTypePicComp(FTP_MF_Data.VarRec[35,4]),"9'0'R")
This conversion is not working...any ideas what might be happening wrong?
source file as "binary" as below settings
Data Representation Type : Binary
Check data against Metadata : Yes
Line Termination : No
Then I am reading the whole file as varchar(90) which is the total lenght of record in mainframe and then using conversion as below
FOR PIC X (01) :-
DataTypeEbcdicToAscii(FTP_MF_Data.VarRec[2,1])
FOR PIC S9(9) USAGE COMP:-Fmt(DataTypePicComp(FTP_MF_Data.VarRec[35,4]),"9'0'R")
This conversion is not working...any ideas what might be happening wrong?