View previous topic :: View next topic
|
Author |
Message |
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Hi All,
How do i define a PFKIN for insertion operation using functional keys? i have a screen where i have EMPID,EMPNAME,EMPDESIGNATION. i have to insert these values into database. If i press F1, it has to perform insertion operation. how do define this in my MFS?
Regards,
Anirudh |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
My guess is not in MFS but in your application dealing with the message containing 'PF1'. BTW I wonder why you pick PF1 since this is usually the function key for HELP. |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Thanks for that input!
I will use F4 for insertion operation.
how would i do it using COBOL code?????
please guide me... |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Read the message sent to your program and if it contains the pressed PF-key perform the insert actions into your database. |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Thanks for that .George!
should i define PF keys in MFS as well as in Program??? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
In your program will do. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
According to this topic PF-definition in MSF allows you to execute /-commands like sending a screen. In your case you want database updates. |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Thanks a lot George! |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Hi George,
I just followed as you told, but i got an error when i press the functional key. it says "conversation in progress"
please guide me reg this... |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Follow he rules for a conversational program:
1: GU SPA
2: GN message
3: process the message(part)
4: loop 2 and 3 for any more message segments
5: store intermediate results in SPA and insert SPA and message to user.
The books might help you out like here
Did your program recognize the PF-key you pressed, acted to update the database, filled the SPA with data for the next stept in conversation to follow, insert the SPA and the message to the user and finally finished? |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
George,
I am not using SPA but i am using linkage section to pass parameters from one program to another...
In this case how do i do it ???? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Is your program conversational? Meaning if there's a question and answer game between your program and the user at the screen? BTW: your original question was about the handling of PF-keys in order to update your database. First make clear how your processflow should run. |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
George,
I am not sure whether my program is conversational or not...
i will explain my application...
i have a main screen which has two options: F1-INSERT F2-RETREIVE
the user navigates to the respective screens using F1 and F2...
In Insert screen, the user enters EMP ID,EMP NAME and EMP SALARY and preses F4 then it has to insert the keyed in values to the database..
I hope this would make sense...
can you guide me reg this???? |
|
Back to top |
|
|
Saroj Tripathy
New User
Joined: 05 Mar 2007 Posts: 23 Location: India
|
|
|
|
Does the insertion happen in the MPP program that is invoked by the screen where u enter emp id, name etc ? if yes then spa is not needed i think. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Quote: |
i got an error when i press the functional key. it says "conversation in progress"
please guide me reg this...
|
Your program is processing the message and didn't finish. Did you hit ENTER first and then the F1? |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Saroj Tripathy wrote: |
Does the insertion happen in the MPP program that is invoked by the screen where u enter emp id, name etc ? if yes then spa is not needed i think. |
yes, the insertion happens in the MPP program that is invoked by the screen where i enter EMPID,EMPNAME etc... can you please guide??? |
|
Back to top |
|
|
anirudh1985 Currently Banned New User
Joined: 22 Aug 2007 Posts: 66 Location: bangalore
|
|
|
|
Bitneuker wrote: |
Quote: |
i got an error when i press the functional key. it says "conversation in progress"
please guide me reg this...
|
Your program is processing the message and didn't finish. Did you hit ENTER first and then the F1? |
No, i did not press ENTER. i just pressed F1 after keying in values. |
|
Back to top |
|
|
Saroj Tripathy
New User
Joined: 05 Mar 2007 Posts: 23 Location: India
|
|
|
|
plz paste the code of ur mfs block where pfkey options u have coded and also the cobol code part where u r handling the pfkey press situation. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
And don't forget the part where you handle the messages. |
|
Back to top |
|
|
|