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
 

 

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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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