If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > INFORMIX 4GL - How to get ON KEY values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-04-06, 05:38
ycy3 ycy3 is offline
Registered User
 
Join Date: May 2006
Posts: 6
INFORMIX 4GL - How to get ON KEY values

Let me explain the background of my problem before I post any question:

I have a few programs as below:

Program id: onkey.4gh
....
....
on key (F8) let g_onkey = 8
....


Program id: hotkeys.h
....
#define F8_KEY 8 /* F8 Key */
.....


Program id: Prog.4gl
#include hotkeys.h

Function input_scr
display form

input array arr1 without defaults from sa_arr1
......

#include "onkey.4gh"
case
when (g_hotkey = F8_KEY)

call generate_rpt()

End Function

Problem:
1. How to pass in the F8 key values from the unix script written in korn shell to the Prog.4gl program?
2. How to pass in the array values arr1 (with 2 fields - ac and ac_name)

The possible input array to be pass in are as below:
2.1 Input array for 2 fields
e.g
account1 account name 1
account2 account name 2
account3 account name 3
and so on
2.2 Blank - do not pass in anything

My unix script (korn shell) will be something as below:

Assuming the sequence of my program input will be as below:
1. enter array value - account1, account name 1
2. press F8 ctrl-key to generate the report

ksh -c "echo <array input value><F8 ctrl-key> |/proj/prog.exe " << ^M
!

What is the value of
1. How to pass in a set of <array input value> from the scripts?
2. what to pass in for <F8 ctrl-key>, so that the 4gl program can recognize it?
3. What if the 4GL program allow the input array to be blank, and user can just enter nothing and press F8-to process all records?

I will be glad if anyone can help me on this issue.
Thanks in advacne.
Reply With Quote
  #2 (permalink)  
Old 05-04-06, 11:11
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

Look for family of functions fgl_keyval(), fgl_getkey(), etc.

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 05-04-06, 22:04
ycy3 ycy3 is offline
Registered User
 
Join Date: May 2006
Posts: 6
Hi,

Thanks for your prompt reply.

What about the following issues, can anyone provide any clue:
1. How to pass in a set of <array input value> from the scripts to an informix 4GL program?

2. What if the in the 4GL program, the input array are optional, user can enter value in the array or just leave the entry empty and press F8 to proceed with the process. In this case, how to pass in an empty array values from a script to an 4GL program? I am facing this problem and need resolution urgently, please.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On