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
 
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: 10456
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: 10456
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts 3270 Data stream error Benchwarmer CICS 4 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 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

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