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
 
A sequential file contains States and districts from that

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: A sequential file contains States and districts from that
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    Post subject:
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    Post subject: Re: A sequential file contains States and districts from tha
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    Post subject:
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    Post subject: Re:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

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