View previous topic :: View next topic
|
Author |
Message |
yadagiri.p
New User
Joined: 01 Sep 2005 Posts: 10 Location: Bangalore
|
|
|
|
Hi
I have one input file which is like this
ACC NO NAME SAL
-100 AAAA 2000
-200 BBBB 5000
-300 CCCC 3000
OutpuT layout
ACC NO NAME SAL
100 AAAA 2000
200 BBBB 5000
300 CCCC 300
I don't want - in output layout
]how can i do this |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
yadagiri.p,
Your input filecopybook is probably something like:
Code: |
05 ACC-NO PIC S9(3).
05 NAME PIC X(5).
05 SAL PIC 9(5).
|
Change the output to:
Code: |
05 ACC-NO PIC 9(3).
05 NAME PIC X(5).
05 SAL PIC 9(5).
|
(remove the sign from ACC-NO)
Dave |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
But remember, you can't do a group move (i.e. input to output). You have to move the ACC-NO separately to realize the sign conversion. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
just a thought
perhaps it's not a sign, but the ANSI triple space carriage control character.
SORT copy OUTREC can be used to strip it if not needed. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Just another thought,
I noticed that the sign is shown as leading. Is it separate? If so, you can use something like this:
Code: |
FD IP-FILE.
01 IP-REC.
05 IR-SIGN PIC X(001).
05 IR-DATA PIC X(013).
FD OP-FILE.
01 OP-REC PIC X(013).
READ IP-FILE
WRITE OP-REC FROM IP-DATA |
This poses an interesting ques. Can you WRITE FROM a field that's not an 01 level. The manual seems to say "not". I've never tried it. Has anybody?
If not, you'll have to do the move to OP-REC yourself. |
|
Back to top |
|
|
|