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
 

 

Use Overlay for 2 different fields.

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

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Tue Jul 07, 2009 9:09 pm    Post subject: Use Overlay for 2 different fields.
Reply with quote

Hi,

I have the following file

Code:

----+----1----+----2----+----3-
*******************************
3040650901999-09-100001-01-01EE
7843304161999-08-020001-01-01EE
9586873901997-04-011998-07-15EE
3039913041998-12-030001-01-01EE
9302545841997-11-180001-01-01EE
0651718242001-06-010001-01-01EE
7009131401999-11-220001-01-01EE
9220380522000-05-012009-06-30RT
9220380522000-05-010001-01-01RT
9220380522000-05-010001-01-01RT


The o/p needs to be as follows

Code:

----+----1----+----2----+----3-
*******************************
3040650901999-09-10          N
7843304161999-08-02          N
9586873901997-04-011998-07-15N
3039913041998-12-03          N
9302545841997-11-18          N
0651718242001-06-01          N
7009131401999-11-22          N
9220380522000-05-012009-06-30Y
9220380522000-05-01          Y
9220380522000-05-01          Y



Basically need to change the '0001-01-01' to spaces and
'RT' to Y and anything other than RT to N.

Please can someone help me on this. I tried using overlay but seems that it doesn't work for two fields on the same record.

Thnx
M
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jul 07, 2009 9:16 pm    Post subject:
Reply with quote

muffirulz,

The following DFSORT/ICETOOL JCl will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                                 
3040650901999-09-100001-01-01EE                                 
7843304161999-08-020001-01-01EE                                 
9586873901997-04-011998-07-15EE                                 
3039913041998-12-030001-01-01EE                                 
9302545841997-11-180001-01-01EE                                 
0651718242001-06-010001-01-01EE                                 
7009131401999-11-220001-01-01EE                                 
9220380522000-05-012009-06-30RT                                 
9220380522000-05-010001-01-01RT                                 
9220380522000-05-010001-01-01RT                                 
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                             
  INREC IFTHEN=(WHEN=(20,10,CH,EQ,C'0001-01-01'),               
  OVERLAY=(20:10X),HIT=NEXT),                                   
  IFTHEN=(WHEN=(30,02,CH,NE,C'RT'),OVERLAY=(30:C'N '),HIT=NEXT),
  IFTHEN=(WHEN=(30,02,CH,EQ,C'RT'),OVERLAY=(30:C'Y '))         
/*
Back to top
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Tue Jul 07, 2009 9:27 pm    Post subject: Reply to: Use Overlay for 2 different fields.
Reply with quote

Thanks a lot Skolusu for quick reply..
HIT=NEXT is a new one for me.

thnx once again

regards
Muffazel
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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 0 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am


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