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

A sequential file contains States and districts from that


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sxv8193

New User


Joined: 25 Jun 2007
Posts: 5
Location: pune

PostPosted: Tue Jun 26, 2007 11:54 am
Reply with quote

how to find out only the number distrcits.

Thanks
sunny
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Tue Jun 26, 2007 12:33 pm
Reply with quote

Hi

As i understood from ur requirement u need to find out the number of distinct districts from a sequestional file. U can use sort to eliminate the duplicates and then feed this(out put of sort utility) file into cobol program to do further processing.

Please put more details if i went wrong on the your requirement

Sandeep
Back to top
View user's profile Send private message
sxv8193

New User


Joined: 25 Jun 2007
Posts: 5
Location: pune

PostPosted: Tue Jun 26, 2007 12:38 pm
Reply with quote

Hi,

By doing sort we can arrange the districts in sorted way only but i want number of districts are there in the sequential file.i hope you understand my requirement

Thanks
sunny
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Tue Jun 26, 2007 12:51 pm
Reply with quote

Hi

We can also eliminate the duplicates using sort by using

//SORTIN dd dsn=input file
SORTOUT DD DSN=
SORTXSUM dd dsn=

insysin
please provide below
SORT FIELDS=(ur district filed length) like (1,10,CH,A)
(i considered it from 1 of length 10)
SUM FIELDS=NONE,XSUM

so the file SORTXSUM will have distinct districts

if u just need the number u can also use file-aid with TALLY option

for more queries u can put search in JCL or SORT forum


thanks
Back to top
View user's profile Send private message
sxv8193

New User


Joined: 25 Jun 2007
Posts: 5
Location: pune

PostPosted: Tue Jun 26, 2007 1:02 pm
Reply with quote

Hi

i hope the answer u provided would work properly.
Thanks for your answer.

Thanks
Suneel
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top