Page 1 of 1

Need Automation for repeated tasks

PostPosted: Tue Sep 05, 2017 8:22 pm
by ndashore20
Hi, I need some automated processing for stripping records from the files which contains thousands of records.

I will give you brief what i do to strip a particular type of record from the rack of records

1. Open the startool utility through the ISPF command and provide the dataset name into it.
2. Select the Pedit option by providing 4 on command line.
3. Set some options which appears on the screen like Set YES in front of PEDIT option and BACKUP in front of dataset access.
4. Finally select those records which need to remove from the respective file by providing in record selection criteria and hit enter.
5. It displays all those records which fits in above criteria and put DD block command to delete those records and hit SAVE.

In this way we strip the record from any of the file. I want to create JCL or any utility in which i will provide the file name and selection criteria . The utility or JCl do the above all tasks or steps for me and Final output should have the desired result. Is it possible to create such type of JCl or utility or any indirect way to reduce this routine task or I m expecting more than enough from the mainframe tech?

Thanks in advance

Re: Need Automation for repeated tasks

PostPosted: Tue Sep 05, 2017 8:39 pm
by enrico-sorichetti
the description of the requirement was clear as mud :twisted:

anyhow it looks like You have to delete some records according to some criteria.

You can use Your sort product to copy Your dataset to a new one omitting/including records

there are gazillions of examples in the dfsort/syncsort sections

post an example of Your input and of Your expected output with a description of the EXACT logic to be used for the selection
look at the messages issued by Your sort product and post to the proper section
DFSORT/ICETOOL/ICEGENER for messages starting with ICE...
Syncsort/Synctool for messages starting with WER...

Re: Need Automation for repeated tasks

PostPosted: Tue Sep 05, 2017 8:42 pm
by NicC
I have never heard of the Startool utility. It should have a manual and you shou should be able to find from that if there is a way to run it in batch. Check that out first. there may even be a screen option to run your selection as batch rather than foreground. Select that and then save the generated JCL and control statements so that you can tailor them to your next requirement.

JCL alone will not do what you want - it only tells the operating system what program(s) you want run and the resources (e.g. data sets - not files) required.

Re: Need Automation for repeated tasks

PostPosted: Tue Sep 05, 2017 8:44 pm
by enrico-sorichetti
I have never heard of the Startool utility.

the last time I heard of it it was called SERENA/STARTOOL[S]

but right now the situation seems more complicated
there is a startool by microfocus
and a startool endorsed by IBM

both of them refer to serena

Re: Need Automation for repeated tasks

PostPosted: Tue Sep 05, 2017 9:16 pm
by steve-myers
There are several issues with this concept. You appear to be describing some sort of batch process; some sort of program that selects and deletes records from a data set based on some criteria you have not described, and a process that runs this on a schedule.

Now one idea you have wrong here is this process runs continuously, but spends much of its life doing nothing waiting for a time interval to expire. There is nothing wrong with the concept, but ... mainframe designs limit the idea of a process that waits for a time interval to expire. The reason for this goes back to when mainframes were much more limited than today's mainframes and could run just a few programs at a time mainly because of limited storage availability. Programs that do nothing for extended periods of time were not tolerated then, are are still not tolerated now even though the original reason is no longer really applicable. Mainframes did devise the concept of scheduler programs that would wait for a time interval to expire then submit a batch job that would execute real work, but these scheduler programs are separate from programs that do real work.

As NicC states: the purpose of JCL is to direct the system to run a program and specify the resources - storage and data sets - required for the program to run. JCL, by itself, cannot perform this task.

Re: Need Automation for repeated tasks

PostPosted: Wed Sep 06, 2017 1:59 pm
by ndashore20
I carefully observed my startool utility to see if there is any batch job creation type of thing but I found nothing. I realized that instead of finding the way to automate my routine task I can also work on the technique which I used to perform deletion of specific record from the file. Let it be more specific about my requirement.

We have some utility named as STARTOOL which handles processing of large files include browsing,editing and various other tasks. We have different kind of policy files that stores different policy related data, During oncall when any of our job abends, sometime or we can say most of the time we found the culprit policy somehow and need to remove that culprit policy from one the policy file. In order to do so normally we open that file through startool utility in PEDIT option, find the records that are associated to culprit policy by simple searching the policy number in the file and removes the records/lines by simply putting DD block command. Now what I want, as soon as I found the culprit policy, I could give that policy number and the file as input to some utility/JCL/anything and it should do all that deletion task for me so that in mean time I can work somewhere else. I thought this could be done through COBOL code too. If this is possible please guide me how should i proceed?

Thanks all for your previous suggestions

Re: Need Automation for repeated tasks

PostPosted: Wed Sep 06, 2017 2:57 pm
by enrico-sorichetti
You are wasting everybody' s time

did You care to read and understand my first reply ?
looks like not :evil:

we do not care about the info You gave us, it was of no help at all,
You simply told us
- the was some process which failed because of wrong data
- some tool WE DO NOT CARE ABOUT was used to delete the wrong records
- the process was run again

so reread my first reply and come back ONLY and IF You can post the info I told You about
if You cannot do that, the topic will be locked and after a while deleted

Re: Need Automation for repeated tasks

PostPosted: Wed Sep 06, 2017 6:53 pm
by ndashore20
Sorry for wasting your valuable time at all. I will try to solve my issue by my own. Its bit complicated to describe you that thing. Extremely sorry for wasting your extremely valuable time. Thanks a lot for everything you provided to me. I will look into it and try to understand. Thanks

Re: Need Automation for repeated tasks

PostPosted: Wed Sep 06, 2017 7:02 pm
by enrico-sorichetti
wasting our time was a figure of speech.
it is very distressing to try to help somebody who refuse as You are doing to provide the information useful to provide help

if You can do it with a sequence of actions on a screen You should be able to explain it NOT in term of keystrokes
but in terms of record layout and logical processing of the data fields ( in this case they look just like simple comparisons )

if you cannot or You are not able to do it You are in much bigger troubles than You think