Fixed width Binary File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
nchincholikar
Participant
Posts: 21
Joined: Sun Jul 18, 2004 11:32 pm

Fixed width Binary File

Post by nchincholikar »

Hi All,

Does anybody knows how to create Fixed width Binary file.
For eg.Input Column has Datatype Long Int which is of size 4 bytes and the output has to be stored using 4 Bytes memory space only.Similar to Fwrite() function in C.

Similary a short int should be stored in 2 Bytes Memory space and a char Array [N] should be stored in N bytes of memory space.

Regards,
Narendra.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Fixed width is done by using CHAR and appropriate lengths, the contents of the data fields, at least when writing, is irrelevant. Numbers are written to sequential files as display formats, but if you wish the binary values to be stored then you can use the conversion for COMP-3.
Post Reply