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: 10326
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: 8593
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm

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