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

PFKIN for insertion operation using functional keys


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Thu Aug 30, 2007 1:45 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Sun Sep 02, 2007 9:42 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Sep 03, 2007 10:35 am
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Sep 03, 2007 2:52 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Sep 03, 2007 3:08 pm
Reply with quote

Thanks for that .George!
should i define PF keys in MFS as well as in Program???
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Sep 03, 2007 3:17 pm
Reply with quote

In your program will do.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Sep 03, 2007 3:25 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Sep 03, 2007 3:42 pm
Reply with quote

Thanks a lot George!
Back to top
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Mon Sep 03, 2007 4:03 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Sep 04, 2007 1:14 am
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Sep 04, 2007 9:57 am
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Sep 04, 2007 3:52 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Tue Sep 04, 2007 4:39 pm
Reply with quote

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
View user's profile Send private message
Saroj Tripathy

New User


Joined: 05 Mar 2007
Posts: 23
Location: India

PostPosted: Wed Sep 05, 2007 4:01 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Sep 05, 2007 4:25 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Sep 05, 2007 4:40 pm
Reply with quote

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
View user's profile Send private message
anirudh1985
Currently Banned

New User


Joined: 22 Aug 2007
Posts: 66
Location: bangalore

PostPosted: Wed Sep 05, 2007 5:05 pm
Reply with quote

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
View user's profile Send private message
Saroj Tripathy

New User


Joined: 05 Mar 2007
Posts: 23
Location: India

PostPosted: Thu Sep 06, 2007 2:30 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Sep 06, 2007 3:18 pm
Reply with quote

And don't forget the part where you handle the messages.
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Any JCL or VSAM Utility to get number... JCL & VSAM 1
No new posts An write operation error - ABENDED S0... COBOL Programming 3
No new posts Join the keys via JCL DFSORT/ICETOOL 14
No new posts Date insertion returns -180 CICS 1
Search our Forums:

Back to Top