IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Include only expected pairs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Wed Mar 13, 2013 3:29 pm
Reply with quote

A new question relating to the data in this topic.

my i/p pair is
3333
1111
2222
1111
2222
1111
3333
1111
4444
0000
2222
1111
4444
1111
3333
1111
2222
1111
5555

my o/p will be

1111
3333
1111
4444
1111
4444
1111
3333
1111
5555

that means only 1111 pair is needed but not paired with 2222.
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Wed Mar 13, 2013 7:10 pm
Reply with quote

Hi Bill,

I am using the same file i.e. VB,LRECL=2052,
Here what is happening the 1111 and 2222 (i.e. at col 94)are the correct combination.You can say one record is authorisation and the second record is completion. So, they come in pair.
some time 1111 is combined with 3333 and I need to find out these wrong pair in my output.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Mar 13, 2013 10:48 pm
Reply with quote

abhijit.nayak01,

As I mentioned in the other topic you need to understand the control cards that bill provided. For the first requirement you pushed the value at position 37 on to the set of records.

Now you need to push the value at 113 and then compare if that pushed value is equal to 2222 and then eliminate them. You will just be coming back here looking for help if you don't understand the control cards you are given.
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Thu Mar 14, 2013 4:14 pm
Reply with quote

Hi Skolusu,

Not sure on what to put the criteria. and tried the below one but all the records are being copied to the output file.

Code:
OPTION COPY                                         
INREC  IFTHEN=(WHEN=INIT,                           
       BUILD=(1,4,10X,5)),                           
       IFTHEN=(WHEN=GROUP,BEGIN=(15,2,CH,EQ,C'01'), 
                          END=(15,2,CH,EQ,C'10',     
                           AND,31,2,CH,EQ,C'<?'),   
           PUSH=(5:37,10)),                         
      IFTHEN=(WHEN=GROUP,BEGIN=(109,4,CH,EQ,C'1111',
                         AND,15,2,CH,EQ,C'01'),     
                         END=(32,2,CH,EQ,C'91',     
                         AND,109,4,CH,NE,C'2222'),   
          PUSH=(20:109,4))                           
 OUTFIL OMIT=(15,2,SS,EQ,C'01,10',                   
          AND,20,4,CH,NE,C'2222'),                   
        BUILD=(1,4,15)     


Not sure much about the push for the second ifthen.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Mar 14, 2013 10:09 pm
Reply with quote

abhijit.nayak01,

I keep repeating "understand the control cards' given to you rather than just copying and pasting them. You don't even pay attention to that.

With the control cards you have shown you simply ruined your file by overlaying the from position 109 on to byte 20. You need to understand the importance of 10X on IFTHEN=(WHEN=INIT statement and see how the values are pushed.

Why are you still pushing the date value? You have no reason to push it when your requirement is to pick the pairs based on a different criteria?

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Search file for records that don't fo... SYNCSORT 8
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts Expected data is not coming up on Fir... CICS 2
No new posts MORE REGS THAT EXPECTED USING JOINKEYS SYNCSORT 9
Search our Forums:

Back to Top