Skip to Content
0
Former Member
Sep 20, 2007 at 07:31 AM

Format the fields in a flatfile

23 Views

Hi all,

I have a flatfile which has 7 fields which I need to format.

The requirement is for every row in the flatfile, I have to check

FOR EVERY ROW in <flatfile>

IF NUMERIC Field

Right-justify field value & Pad with leading zeroes to the LEFT.

WRITE FIELD to <flatfile>

ELSE IF ALPHANUMERIC FIELD

Left-justify field value and Pad leading spaces to the RIGHT.

WRITE FIELD to <flatfile>

ENDIF

Please help me with the sample code.

Thanks and regards,

Anishur