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

Findout count of data at particular position in ps file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mahi_e

New User


Joined: 10 Dec 2010
Posts: 43
Location: hyderabad

PostPosted: Tue Mar 04, 2014 1:36 pm
Reply with quote

hi folks,

thanks in advance . appreciate your quick response.

i got a new requirement in jcl to automate below scenario

i am having 5 input files as given below

XXX.AAA.A2345,DISP=SHR
XXX.BBB.A2345,DISP=SHR
XXX.CCC.A2345,DISP=SHR
XXX.DDD.A2345,DISP=SHR
XXX.DDD.A2345,DISP=SHR

eg:
XXX.AAA.A2345
----------------------------------------
pos : 10 20 30 34

data: kjjklfddd kjkjkjk lklkll10


now the job has to read inputfile and findout count of digit '10' at 34th coloumn in each input file.since each file has digit '10' at 34th coloumn.

output should be as follows
XXX.AAA.A2345 = count of digit '10'
XXX.BBB.A2345 = count of digit '10'
XXX.CCC.A2345 = count of digit '10'
XXX.DDD.A2345 = count of digit '10'
XXX.DDD.A2345 = count of digit '10'
----------------------
sum total = total count of digit '10'
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Mar 04, 2014 1:53 pm
Reply with quote

Quote:
appreciate your quick response.


if You have time constraints a forum is not the best place to ask for help.

there is no commitment to post a reply
there should be no expectation to receive one.

But why not search the forums, there are quite a few examples of using <sort> to count things
Back to top
View user's profile Send private message
Mahi_e

New User


Joined: 10 Dec 2010
Posts: 43
Location: hyderabad

PostPosted: Tue Mar 04, 2014 2:26 pm
Reply with quote

hi enrico,

i tried but didnot find exactly,

it would be helpful if i get here.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Mar 04, 2014 3:04 pm
Reply with quote

did You search with sort counting records

to get ( for example )

www.ibmmainframes.com/viewtopic.php?t=54169&postdays=0&postorder=asc&start=30

that deals with the problem of printing the dataset name

and the same search will return snippets on counting the occurrences

You cannot expect to find the exact solution to Your problem
but You will find many many hints on how to proceed

for example to count the occurrence of ONE key You might

overlay a 1 for the match a 0 for other keys and sum
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top