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
 

 

Need help on DFSORT Match

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

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Thu Nov 11, 2010 2:43 pm    Post subject: Need help on DFSORT Match
Reply with quote

Below is my input file KSDS max Record size is 500

Key is first 8 char

Input:-
Code:
123455TX   07012010
123455TX   AD12
123455TX   AB11
123456TX   07012010
123456TX   AD12
123456TX   AB11
123466TX   08012010
123466TX   AD12
123466TX   AB11
123466TX   AB11
123466TX   AB11
123476TX   08112010
123476TX   AD12
123476TX   AB11
123476TX   AB11
123476TX   AB11
123476TX   AB11


I want the count of AB11 per key after 08012010 date

Output:-
Code:

123466TX   3
123476TX   4
Back to top
View user's profile Send private message

shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Thu Nov 11, 2010 7:44 pm    Post subject: Reply to: Need help on DFSORT Match
Reply with quote

Hi Frank,

Can you please assist on this?
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: Thu Nov 11, 2010 7:58 pm    Post subject:
Reply with quote

The DFSORT wizards are in a completely different time zone to you.
Please be patient
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 12, 2010 2:13 am    Post subject:
Reply with quote

shrivatsa,

Here's a DFSORT job that will do what I think you're asking for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (VSAM)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY,VLSCMP
  RECORD TYPE=V
  INCLUDE COND=(21,4,CH,EQ,C'AB11',OR,21,8,FS,EQ,NUM)
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,21:5)),
   IFTHEN=(WHEN=GROUP,BEGIN=(37,8,FS,EQ,NUM),
    PUSH=(5:41,4,9:37,4,13:ID=8))
 OUTFIL REMOVECC,NODETAIL,
    INCLUDE=(5,8,CH,GE,C'20100801'),
    SECTIONS=(13,8,
      TRAILER3=(21,8,X,COUNT-1=(EDIT=(IIIIIIIT))))
/*
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 DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Match records - scdinesh DFSORT/ICETOOL 6 Wed Feb 22, 2017 5:02 am
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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