Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Wed Jun 25, 2008 12:23 pm Post subject:
JCL won't do it, batch or otherwise. But a program invoked by EXEC PGM= will. The problem is : is there a utility, or do you have to write your own. Utilities? FileAid springs to mind but I am not sure if it will do what you want. I love rolling-my-own so I would go down that route if it were not for the need to perhaps create PSBs etc. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
Posted: Wed Jun 25, 2008 7:24 pm Post subject:
If you go down the route of writing a program your own, think about the following.
What if tomorrow, you want to extract records where
1. field1 > 200?
2. field1 = 100?
3. field1 < 100?
4. Field2> 100? (and all other conditions mentioned above)
To make it more complicated,
5. Field1 = 100 and Field2 = 200.
6. Field1 = 100 or Field2= 200.
and then the all < or > combinations?
Will you write different programs for each of them or keep on changing the existing program?
Ideally you should have the program to work based on a set of parameters, using which you should be able to tell the field name, the relational operator, value to be compared and additionally, if multiple fields are there, conditional parameter as well.
Sounds too complicated? Well, it is worth the effort. You do it and all the followers will admire you. In my company, I have a program that will do all these against IMS database but unfortunately I cannot share the source code because of confidentiality issues. However, if you are interested, I will be able to guide you in design.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum