Topic: Leadzero.cus (1 of 2), Read 70 times
Conf: Hex, Binary, EBCDIC
From: Rosa Wiles
Date: Monday, May 06, 2002 09:49 AM

I am using the leadzero custom macro to process an EBCDIC file to ASCII.
it works, only it is adding a left curly brace"{" as the last digit.

I am using the following code in a layout file:

v=Reg_load(#65+12,'leadzero.cus')
c 179,184 :3

I tried asking for only two decimal places with :2 but it replaced the second digit with the curly brace. When I ask for three decimal places with :3 it gives me the two I need but appends the curly brace.

I would greatly appreciate any help anybody can give me.

 


Topic: Leadzero.cus (2 of 2), Read 79 times
Conf: Hex, Binary, EBCDIC
From: George Christman
Date: Monday, May 06, 2002 12:20 PM


If you look at the your EBCDIC data file (input file), and the actual field you are adding leading zeros to, you will find that the "curly left brace" is there. That is because the field is a "zoned" (PIC S9) not an unsigned numeric (PIC 9) that leadzero.cus was designed for.

You will need at least our EBCDIC level 2
package to convert this field, and then
define the field in your .LAY file like this:

z c1,c2 z

The 1st z defines the columns c1-c2 as
a zoned field, the 2nd z specifies that
leading zeroes are to be added to the
ASCII output for this field.