|
|
| Author |
Message |
sangeethaji
New User
Joined: 26 Dec 2006 Posts: 7 Location: Chennai
|
|
|
|
Hi Friends,
A cobol program writes a file in which a field's pic is S9(5)V9(4).
So the file has value like 00021945{. I want to convert this using sort so that the sign of the field comes seperately like 000219455-.
I can't change the program. I need to do this in sort.
thanks for all ur help in advance |
|
| Back to top |
|
 |
References
|
Posted: Thu May 08, 2008 11:36 am Post subject: Re: Need to convert S9(5)V9(4) value to signed value in sort |
 |
|
|
 |
sangeethaji
New User
Joined: 26 Dec 2006 Posts: 7 Location: Chennai
|
|
|
|
Hi all,
Found the answer myself.
using outfil outrec with edit and sign field will solve this problem
OUTFIL OUTREC=(1:1,9,ZD,EDIT=(STTTTTTTTT),SIGNS=(+,-,,)) |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 3908 Location: San Jose, CA
|
|
|
|
| Quote: |
| So the file has value like 00021945{. I want to convert this using sort so that the sign of the field comes seperately like 000219455-. |
| Quote: |
| EDIT=(STTTTTTTTT),SIGNS=(+,-,,) |
I'm glad you figured it out yourself. But just for clarification so other people aren't confused:
These two statements don't match up. The first one says you want a trailing sign, but the edit mask you show is for a leading sign. If you really want a trailing sign, then the edit mask would be:
| Code: |
EDIT=(TTTTTTTTTS),SIGNS=(,,+,-)
|
|
|
| Back to top |
|
 |
|
|
|