Re: Cobol format conversion

2004-01-10 Thread R. Joseph Newton
Daniel Staal wrote: > That's a signed number, with 9 digits before the decimal point and 4 > after. Thanks. That is useful background. Unfortunately it does not explain the what was shown in the OP, since there were only twelve digits in the sample COBOL strings, not the thirteen that would be

Re: Cobol format conversion

2004-01-10 Thread Jeff Westman
John McKown <[EMAIL PROTECTED]> wrote: > FWIW - the best thing, IMO, is to change the generating program's > PIC > clause to: > > PIC S9(09)V.9(04) SIGN IS LEADING SEPARATE. > > This will take up two more characters in the output line. It will > insert > an actual decimal point and prefi

Re: Cobol format conversion

2004-01-10 Thread Daniel Staal
--As off Saturday, January 10, 2004 11:53 AM -0800, R. Joseph Newton is alleged to have said: Olivier Wirz wrote: Hello, What is the best way to convert a numeric cobol format S9(09)V9(04) in a more readable way. How would we know? This is a Perl list. To some people here, the string above ma

Re: Cobol format conversion

2004-01-10 Thread John McKown
FWIW - the best thing, IMO, is to change the generating program's PIC clause to: PIC S9(09)V.9(04) SIGN IS LEADING SEPARATE. This will take up two more characters in the output line. It will insert an actual decimal point and prefix the number with a + or a - sign. Much easier to proce

Re: Cobol format conversion

2004-01-10 Thread R. Joseph Newton
Olivier Wirz wrote: > Hello, > > What is the best way to convert a numeric cobol format S9(09)V9(04) in a > more readable way. How would we know? This is a Perl list. To some people here, the string above may be meaningful. To most, it is line noise. Try: I am working with formats in COBOL.

Re: Cobol format conversion

2004-01-10 Thread Daniel Staal
--As off Saturday, January 10, 2004 3:40 PM +0100, Olivier Wirz is alleged to have said: Hello, What is the best way to convert a numeric cobol format S9(09)V9(04) in a more readable way. For example: 0100} will be -1000. 0100{ will be 1000. It works with substr and =

Cobol format conversion

2004-01-10 Thread Olivier Wirz
Hello, What is the best way to convert a numeric cobol format S9(09)V9(04) in a more readable way. For example: 0100} will be -1000. 0100{ will be 1000. It works with substr and =~, but may be there is a module or another better way. Thank you. Olivier -- +++ GM