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: 10327
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: 10327
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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