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
 
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: 8646
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 Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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