View previous topic :: View next topic
|
Author |
Message |
ashok4u_it
New User
Joined: 12 Mar 2008 Posts: 53 Location: Chennai
|
|
|
|
Hi All,
Is it possible to replace one field with other based upon valid condition.
For Example,
F1 F2 F3
01 111 222
02 222 333
01 222 333
I want to replace, F2 field with F3 based upon F1. Suppose, If F1=01, then replace, F2 with F3.
Please reply. I am trying out this with some other. If someone help out with your additional hands, it would be better for me.
Thanks in Advance,
Ashok Kumar.K |
|
Back to top |
|
|
ashok4u_it
New User
Joined: 12 Mar 2008 Posts: 53 Location: Chennai
|
|
|
|
Hi Guys,
Sorry... I missed out the main constraint. I want it to be done in DFSORT not even ICETOOL.
Regards
Ashok Kumar.K |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
and who is the <smart> guy who put that constraint ?? |
|
Back to top |
|
|
senjay
Active User
Joined: 10 May 2007 Posts: 147 Location: India
|
|
|
|
Ashok,
Assuming there are spaces between col1, col2 and col3 and your lrecl is 10, the below sort control card would work.
Code: |
OPTION COPY
OUTREC IFTHEN=(WHEN=(01,02,CH,EQ,Cā01ā),
OVERLAY=(04:08,03))
|
Enrico,
Quote: |
and who is the <smart> guy who put that constraint ??
|
I faced a similar scenario before. When asked, i got the reply that the support guys don't know icetool.
I did the requirement with complex sort control card instead of simple icetool and it was gladly accepted.
sometimes these kind of requirement really irritate. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
But ICETOOL is a part of DFSORT, so in effect by using ICETOOL you are using DFSORT. |
|
Back to top |
|
|
ashok4u_it
New User
Joined: 12 Mar 2008 Posts: 53 Location: Chennai
|
|
|
|
Thanks a lot senjay. Your code works fine. I thought of handling it in COBOL. But ur 2 line code made my work so easy.
Thanks Again.
Ashok Kumar.K |
|
Back to top |
|
|
|