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

Rec count for multiple flat files - PS


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

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Sat May 14, 2011 2:09 am
Reply with quote

Hello Bill,

yes you are right ... its option B ...

Also, since we need to run the jobs automatically through CA7 so suppose we submitted 5 dynamic JCLS each of them creating a different file with counts. I have a challenge to merge and then use it in another Job.
Say there are 5000 file names . Hence the main job creates 5 dynamic JCLS and submits them - each of which in turn creates one output file of file counts .
Now since these dynamic JCLs are not defined in CA7, i need a way to put
dependancy of all these jobs/output files on another final job which merges the 5 output file and then uses the data... I cannot put the dependency of Main job on final job because the final job might abend
due to file not found if the dynamic jcls are still running.

Also, is there a possibility that it might take previous version of the file
into consideration?

I am sorry if this isnt the right place to ask this query.


Please guide ...
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat May 14, 2011 2:41 am
Reply with quote

kitchu84 wrote:
I have a challenge to merge and then use it in another Job.


Well I am not bill but since I was the one who provided you with the dynamic JCL solution , I am gonna answer it . You don't have a challenge. It is quite simple. change my job to have the same jobcard on all the dynamically created JCL's and no matter how many jobs you create they will simply be queued up one after another. They will run sequentially and you can use just 1 output file. You don't need another job to merge them. Before you ask, I am not going to help you with that. It is a simple change and you should be able to do that now that you have the necessary frame work.

kitchu84 wrote:
Also, is there a possibility that it might take previous version of the file into consideration?


You need to atleast read the comments in the generated JCL. The 7th line of the generated JCL will have this comment

Code:

//**********************************************************
//* DELETE THE OUTPUT COUNT DATASET IF EXISTED             *
//**********************************************************
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat May 14, 2011 7:06 am
Reply with quote

Skolusu wrote:

[...]
Well I am not bill
[...]


I don't think the whole thing was directed at me.

[...]

kitchu84 wrote:

We will run this job periodically every 30 mins with the last 30 mins SAR unload and we will populate the data in DB2 tables for a particular JOB ran with that particular JOB ID.

For example: if a job name = ABCXXXXX ran with job id : JOB27909,
I will take unloads from SAR for the last 30 mins (time will be controlled by parm parameter in a COBOL module) and then I will filter out the file names for all the jobs alongwith their Job ids.

This will tell me specifically which run of the job had those files and what was the count.

[...]


B)
1) You check on SAR for all jobs complete in last 30 minutes
2) Create extract file-of-files for the mega-file-counter from the complete jobs in SAR
3) Run the DFSORT mega-file-counter
4) You load everything into DB2 so that you know which file relates to which job that ran at a particular time

There is something I'm not getting.

Why I want to know more exactly how you are doing it is because there are different problems for either route. Are you running the full mega-file-counter? If so, how many times a day? Do you run it once and the SAR extract multiple times?

Some problems are the same, whichever route. Like, how do you deal with a re-run from a previous day? Are your timestamps "logical" or actual - "logical" being so that you can identify files from the same batch runs, assuming that you will be running over midnight? Etc.

Do you have something of the actual design that you can share with us?
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Sun May 15, 2011 12:03 pm
Reply with quote

Hi Skolusu,

With due respect to you - the next part in my post was intended for you. I apologise for not mentioning your name specifically.

I am getting syntax errors in this line:
INREC IFTHEN=(WHEN=GROUP,RECORDS=1000,
*

WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

I searched in the forum and found a similar kind of issue: : ibmmainframes.com/viewtopic.php?t=51832&postdays=0&postorder=asc&start=0

This type of error suggests that its because WHEN=GROUP is not available in the current release we are using icon_sad.gif ... Could you please suggest an alternative.

Hi Bill : we will run the file counter every time after we run the SAR unloads. The SAR unloads run every 30 mins (for entire 24 hrs). Regarding the rerun, the timestamp are actual ... we are planning to load the data at that particular instant of time. So say a job runs at 12:30 pm, the SAR unload running at 1 pm will pick up that job details and we will run file counter for the job. If the job again runs at say 2:50 pm with different job id , the next SAR unload will pick up the details of the job and file counter will count the records at that instant of time which will be loaded with that particular timestamp.

Sorry if I am not clear. Please let me know ...
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Sun May 15, 2011 12:07 pm
Reply with quote

Just to add, this release of sort is invoked when i submit the job :

SYNCSORT FOR Z/OS 1.3.0.2R
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun May 15, 2011 12:10 pm
Reply with quote

Code:
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


the messages show that You are using SYNCSORT, not IBM/DFSORT

Kolusu is a IBM/DFSORT developer, You cannot expect Him to provide free consultancy on a competitor' s product icon_biggrin.gif

topic moved to the JCL forum where SYNCSORT issues are housed
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Sun May 15, 2011 12:32 pm
Reply with quote

:'( ... will miss Skolusu's solutions ...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun May 15, 2011 1:22 pm
Reply with quote

kitchu84 wrote:
[...]

Hi Bill : we will run the file counter every time after we run the SAR unloads. The SAR unloads run every 30 mins (for entire 24 hrs). Regarding the rerun, the timestamp are actual ... we are planning to load the data at that particular instant of time. So say a job runs at 12:30 pm, the SAR unload running at 1 pm will pick up that job details and we will run file counter for the job. If the job again runs at say 2:50 pm with different job id , the next SAR unload will pick up the details of the job and file counter will count the records at that instant of time which will be loaded with that particular timestamp.

Sorry if I am not clear. Please let me know ...


Hi Kitchu84,

Sorry, but again, is this the full file counter that you are talking about? No, I'm not clear.

How long is the file counter going to take to run, every 30 minutes.

If the full run is running 48 times a day (theoretically), then 47 times for each dataset it is not needed (roughly speaking).

Are you using a SAR time loaded on the Job time finished for your selection? If the latter, is there any "latency" between a Job finishing and appearing in SAR? If so, you will miss Jobs occasionally.

What DISP are your production jobs running with for output files, generally speaking? I get to this sort of point, and I think yet again I must be missing something crucial.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun May 15, 2011 1:34 pm
Reply with quote

Bill, looks like we are just wasting time here, as does the TS organization by counting things every half an hour

they made up their mind/bed let them sleep in it icon_biggrin.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun May 15, 2011 2:01 pm
Reply with quote

enrico-sorichetti wrote:
Bill, looks like we are just wasting time here, as does the TS organization by counting things every half an hour

they made up their mind/bed let them sleep in it icon_biggrin.gif


enrico, I get that feeling as well. Extracting job/file information from one source, but not using that to trigger the counts? So, mistmatched timings for sure. Won't run inside 24 hours, won't get all the jobs updated, will lock production jobs, doesn't know about business days, mixes re-runs with current data. Etc. And uses the wrong sort package...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun May 15, 2011 2:52 pm
Reply with quote

enrico, are you going to move this one, for completeness? 54401 in DFSORT.
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Mon May 16, 2011 2:50 am
Reply with quote

hi Bill,

We are not running SAR full unload. As i mentioned earlier,
we will extract only last 30 mins SAR unloads for every 30 mins SAR unload run.

This is our process:

1. Unload from SAR every 30 minutes using SARBCH utility
2. Extract last 30 minutes data(jobs completed in last 30 mins)
3.Unload the “JESYSMSG” log from SAR (using SARBCH with PRINT command)for all the jobs present in the output file of step 2
4.Using SORT step, extract all the records from JESYSMSG with Jobname, Jobid and filenames(retained, rolled in and deleted) for all the jobs and exclude all library names
5.Using Easytrieve, format the file from step 4. The output file will contain jobname, jobid, filenames and keyword(retained,rolled in,deleted).

6. Using Easytrive, filter out the deleted files(based on keyword ‘deleted’) and write only the existing files into output. If the first instance of the file is retained/rolled in and second instance is deleted, then ignore them. The output file will contain jobname, jobid and filenames(only existing)

7. Using SORT job suggested by Skolusu - it will create N dynamic JCLs depending upon the no of files for which we need to determine the counts . No of files that each dynamic job will handle is 1000.

After the dynamic jobs are submitted, as Skolusu suggested if the
we keep the job card same the dynamic jobs will be submitted sequentially and each time the file counts will be added to same output file.


8. In the next step /next job I need to format the file from dynamic jcls.
since I need to create another file in the loadable format for loading in DB2 table.



Hi Skolusu - Please advise on how to achieve this. I am sorry if I am missing something.


Thanks for your suggestions.


Thanks,
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 16, 2011 4:21 am
Reply with quote

You are using Syncsort, which is why, as enrico has said, the topic has been moved to JCL from the DFSORT forum. Read enrico's message.

I got the SAR bit OK. Are you using a SAR date/time for your extract? You should, if it is possible.

The file from step 6 goes into step 7? 5000/16 = approx 312 datasets (16 = 8 hours of "peak" batch, x2 for the 30minutes). I don't think you'll often even go over 1000 datasets in 30 minutes? That's why I couldn't understand the big-big sort counter.

If you are already in Easytrieve, you could even generate the Syncsort JCL/cards (if necessary) and ship them off to the INTRDR. Easytrieve can again pick up the file you produce with the counts and match the counts to the formatted extract from SAR.

You've still got problems waiting for you to walk into them. Really think hard about how to make your DB2 flexible. Reruns. Business dates. Timings if no SAR date. "Static" files. Tapes. VSAM shareoptions. Online system coming up. Is all your work going to fit in 30 minutes, if not what happens as the next one kicks in?

Maybe you could have had all the programs changed by now...
Back to top
View user's profile Send private message
pullaiah.cts

New User


Joined: 02 Sep 2010
Posts: 50
Location: Pune

PostPosted: Tue Jun 07, 2011 9:24 am
Reply with quote

Hi Kolusuko,

Thanks for the solution you have provided,it's working good.I have one more requirement.My job is getting abended if any of the file in the input DSN is not cataloged but I want to skip the files if they are not exists and continue to the next file name.Can you please tell me where should I put this condition in the given code?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 07, 2011 10:04 am
Reply with quote

Hello,

You need to start a new topic for your question - this topic is a Syncsort topic and Kolusu does not support / answer Syncsort questions (Kolusu - DFSORT Development Team (IBM) ).

You cannot do what you want by modifying the sort control statements. One way to do what you want is to build the jcl for only those datasets that exist and then run your process using that jcl.
Back to top
View user's profile Send private message
ridgewalker58

New User


Joined: 26 Sep 2008
Posts: 51
Location: New York

PostPosted: Tue Jun 07, 2011 9:05 pm
Reply with quote

Someone please STOP me from getting kicked off of this FORUM.

I do understand that these forums are to help people who have questions about the technical tasks that they have been given.

BUT I also understand, from reading many of your responses, that there is some requirement for the TS to take the task as far as they can take it. They should have "investigated a solution", "performed some work to test their solution", and AFTER they have shown that they are still having issues, they should pose their questions.

I have been working in IT for over 40 years and still have questions and have relied on the expertise of others.

BUT, you folks have ANALYZED, DESIGNED, and CODED and DEBUGGED a solution to this person's problem. In this case you have given his company a system that they are going be able to charge the client for.

I hope this person appreciates that the solution that has been arrived at
has been GIVEN freely by people who have invested many years developing their skills and put forth their own efforts in solving problems.

I don't see here that the T.S. has done anything more than USED this forum to do the work that has been assigned to the T.S.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 07, 2011 11:24 pm
Reply with quote

Hello,

Yup, in spirit many of us completely agree. . .

Not only do many of the requestors not appreciate what they are given but are quite willing to accept credit for this within their organizations.

Many (one must consider how some people were treated as children) expect others to do their bidding.

On the other hand we have many who truly appreciate the effort made because of their request(s). Something else that i find quite encouraging is the number of views registered on many of our topics. I just have to believe that of the many who read these, some take away something useful even if they do not participate in the dialog.

Also, in the little-box world it is quite common for entire solutions to be provided (even before the requirement is clearly understood icon_wink.gif ). And quite often the "solution" has no chance of working. . .

Fortunately, we have people who post Whoa when a "solution" is not. . .
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 09, 2011 12:34 am
Reply with quote

ridgewalker58 wrote:


[...]
BUT, you folks have ANALYZED, DESIGNED, and CODED and DEBUGGED a solution to this person's problem. In this case you have given his company a system that they are going be able to charge the client for.

[...]


As a co-culprit on this topic, I don't think the whole thing went as well as you make out for the TS.

Right from the start up to the finish we mostly warned against such a solution as the TS sought, because it was basically nuts and destined to, at best, cause a whole heap of meaningless "problems" and at worst just not work.

Kolusu did valiant work to deliver a part of the requirement. That is, actually, part of his job. Unfortunately, the TS was all the time using SYNCSORT. A TI (Topic Interloper) later found Kolusu's solution useful. Such is life.

The TS was last seen reviewing solutions against doing the counts in the code for the programs which produced the files. Whether they/their management have learned anything through this process, I don't know.

Why did we (or I, as the only one I can speak for) expend so much on this? I think of someone running towards the clifftop because they want to get to the beach. You stop them, and show them the little, windy, steep, path down to the beach and that you can't see the bottom of the path and there are lots of potential daners, but also explain that there are lots of much better beaches with much better access. Having done that once, what do you do when they start running again? And again? And then get a motorbike? A sportscar?

If they come back again, rocket-propelled, I'm getting out of the way, finally.

Just finally, I didn't get the impression that the client would be buying the system (if it existed). I think the client is looking for a way to manage how the system leaks data. Good idea. Poor solution proposed by the client.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 09, 2011 1:11 am
Reply with quote

and the idTENts did not even carry on some basic arithmetics

given a conservative estimate of 2400 jobs a day under SAR control
a conservative estimate of 10 sequential datasets for each job

then every half an hour 500 datasets will be counted
and it might happen that in one interval more than 50 jobs will end
which means more datasets, more records to count,
the bean counting might take more than half an hour, and and and and ...
would be nice to be there when sith overflows icon_biggrin.gif

a non Politically Correct clone of Anuj signature
They have employed some monkey, given them PCs, made them sit in-front of PC for 8-hrs and called this set-up IT departments!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 09, 2011 8:48 pm
Reply with quote

oh Enrico I was thinking to keep me as away as possible from this topic and see what you've done! icon_biggrin.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 09, 2011 8:56 pm
Reply with quote

Bill Woodger wrote:

[...]

Kolusu did valiant work to deliver a part of the requirement. That is, actually, part of his job. (emphasis added)

[...]


I overstated this. If anyone thinks "Bill Woodger says so" will get them some work done for no effort, think again. Start with the manuals, search the DFSORT forum, search the internet. Still stuck? Post all the details, including what you have done and how it failed.
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 Goto page Previous  1, 2, 3  Next

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top