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
 

 

Findout count of data at particular position in ps file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Findout count of data at particular position in ps file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Tue Mar 04, 2014 1:53 pm    Post subject: Reply to: Findout count of data at particular position in ps
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Tue Mar 04, 2014 3:04 pm    Post subject: Reply to: Findout count of data at particular position in ps
Reply with quote

did You search with sort counting records

to get ( for example )

http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am


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