Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To Replace one field with Other

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Jun 15, 2009 5:18 pm    Post subject: To Replace one field with Other
Reply with quote

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
View user's profile Send private message

ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Jun 15, 2009 5:21 pm    Post subject: Reply to: To Replace one field with Other
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10457
Location: italy

PostPosted: Mon Jun 15, 2009 5:33 pm    Post subject: Reply to: To Replace one field with Other
Reply with quote

and who is the <smart> guy who put that constraint ??
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Mon Jun 15, 2009 5:56 pm    Post subject: Reply to: To Replace one field with Other
Reply with quote

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. icon_confused.gif
I did the requirement with complex sort control card instead of simple icetool and it was gladly accepted. icon_eek.gif
sometimes these kind of requirement really irritate.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8657
Location: Back in jolly old England

PostPosted: Mon Jun 15, 2009 6:08 pm    Post subject:
Reply with quote

But ICETOOL is a part of DFSORT, so in effect by using ICETOOL you are using DFSORT.
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Mon Jun 15, 2009 7:28 pm    Post subject: Reply to: To Replace one field with Other
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us