Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10231
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 VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us