View previous topic :: View next topic |
Author |
Message |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Mon May 30, 2011 1:46 pm Post subject: IMS DC COBOL Program |
|
|
Hi,
I'm facing a problem in COBOL - IMS DC online coding.
My requirement is, I'm having a menu of choices Add,Delete, and Inquiry. Add is strait forward. But inorder to Delete entry user need to perform Inquiry first and then only he should be permitted to Delete. If he tries to delete directly message should be displayed stating perform Inquiry First.
We are using intertest for debugging.
I've followed two methods to accomplish this requirement. I'll mention only problematic part I'm facing.
Method 1.
I've declared a hidden field in screen(MFS) for function (A,D and I) and after performing Inquiry I'm moving value from function field (I) to hidden field on screen. When user selects Delete function i will check the value in the hidden field and if it is 'I' will perform delete otherwise display message perform Inquiry first for the particular process.
Method 2.
If Inquiry is performed will set the switch in working storage to true for particular process. If delete is selected for the process will check the switch if it is true will delete otherwise display message to do inquiry first.
Both the above methods are working in INTERTEST. But if i run in IMSTEST region with the same load it is not working. After every read of screen..both the working storage in Method 2 and Hidden field in Method one are getting flushed. So not working..always displaying perform Inquiry first as switch and hidden fields are getting cleared when tested in IMSTEST.
Please suggest me the solution. Can I use working storage variable or screen hidden field to storing the data of function I,A, or D.
Thanks & Regards
Nadh |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 31, 2011 10:56 am Post subject: |
|
|
nadh,
You cannot use Working storage variables to store a flag as this will flushed out. Update a flag in a DB2 table or IMS DB when an inquiry is done and check for it when the delete operation is requested.
Kolusu |
|
Back to top |
|
 |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Tue May 31, 2011 11:15 pm Post subject: |
|
|
Hi Kolusu,
Thank you.
I've one doubt...I created one hidden field in screen to store the function value. that is if inquiry is done i will move value 'I' to hidden field. when delete function is performed i will check the value in hidden field if its 'I' then i will perform delete. this is working in when I test in intertest. But not working IMSTEST region. I checked with keeping display statements in program. It looks like hidden value in screen is also getting refreshed when run in IMSTEST. I see the existing programs in shop are using this hidden field concept. PLease give me a clue.
Thanks & Regards
Jagan |
|
Back to top |
|
 |
prino Banned
Joined: 01 Feb 2007 Posts: 45 Topics: 5 Location: Oostende
|
Posted: Wed Jun 01, 2011 12:40 pm Post subject: |
|
|
nadh wrote: | I see the existing programs in shop are using this hidden field concept. |
So why don't you ask the people who wrote those programs how they did it, rather than spending time here waiting for an answer you are not going to get? |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Jun 01, 2011 2:42 pm Post subject: |
|
|
Quote: |
I see the existing programs in shop are using this hidden field concept. PLease give me a clue. | Your clue should be that this is already in existing production code . . .
You need to ask your manager or support people if this "hidden field" is the standard way to code on your system.
We don't know the rules of your system. _________________ All the best,
di |
|
Back to top |
|
 |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Thu Jun 02, 2011 9:34 am Post subject: |
|
|
Hi Folks,
Sorry for not conveying message clearly. What I mean is the existing programs are using hidden field concept. But the application is not in use. I'm developing new application and I've taken copy of the existing program. To be clear...there is no extra data base provided. I'm writing code in IMS DC/DB and I'm novoice in it. one of the requirement I've is if user needs to perform delete function first Inquiry should be done without Inquiry DELETE should not be allowed. I user selects delete without Inquiry message should be thrown as "perform Inquiry first". Please suggest me the way to do it.
Thanks
Nahd |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Jun 02, 2011 3:17 pm Post subject: |
|
|
As you are new suggest you ask someone if the "hidden field" approach is still acceptable to the organization / management. If it is, you're good to go. If not, there should be some existing standard covering how this is to be done. If there is no standard, one needs to be implemented.
If you are writing an IMS program, an IMS database should be avaliable and you might use this for your "hidden field". Suggest you talk with your dba or some project senior. _________________ All the best,
di |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Mon Jun 06, 2011 7:33 am Post subject: |
|
|
Wouldn't another simple option be to check the contents of various fields. If they contain something, then the user has performed a query first. As soon as you delete the item, you clear out the fields, after which they can't do a new delete until they've done a new query (or am I missing something caused by the hot weather we're enjoying at the moment).
Of course, another option would be to use a SPA database to pass the relevant variables between calls _________________ Michael |
|
Back to top |
|
 |
|
|