For every version of Lotus Notes, keyboard shortcuts are listed in the Lotus Notes Administration and User Help databases.
E.g.
In Lotus Notes Documents
--------------------------------
CTRL+DOWN ARROW = Move to next highlighted search word in document appearing in preview pane
CTRL+E = Edit document
CTRL+END = Move to bottom of document
CTRL+F = Find text and replace
CTRL+G = Find next occurrence of text
CTRL+HOME = Move to top of document
CTRL+P = Print selected document
CTRL+PAGE DOWN = Move to next tab in tabbed table
CTRL+PAGE UP = Move to previous tab in tabbed table
CTRL+UP ARROW = Move to previous highlighted search word in document appearing in preview pane
ESC = Move to previous linked document
F4 or TAB = Move to next unread document
LEFT ARROW = Move to previous link or object
RIGHT ARROW = Move to next link or object
SPACEBAR = Activate selected object
SPACEBAR = Expand or collapse selected section
SPACEBAR = Open selected link to document, view, or database
CTRL+LEFT ARROW = Beginning of current word
CTRL+RIGHT ARROW = Beginning of next word
END = End of line
HOME = Beginning of line
SHIFT+TAB = Previous field in a form
SHIFT+TAB = Previous row in table
TAB = Next field in a form
TAB = Next row in table
In Lotus Notes Databases
--------------------------------
You can use the following keyboard shortcuts for opening and closing a database, and for using database features including navigating within views, folders, and panes.
ARROW keys = Move through embedded element
CTRL+N = Create new database
CTRL+O = Open database
ENTER = Select item in embedded outline
ESCExit embedded element
ESC or CTRL+W = Close current database
F9 = Refresh current document (in Edit mode), view or workspace
MINUS (-) key = Collapse folder in embedded outline
PAGE DOWN = Move to bottom of active page
PAGE UP = Move to top of active page
PLUS (+) key = Expand folder in embedded outline
SHIFT+CTRL+F9 = Update all views in current database
SHIFT+F9 = Rebuild current document, view, workspace (must have Manager access)
SPACEBAR = Give focus to embedded element
UP and DOWN ARROW = Move through embedded outline
Thursday, July 31, 2008
Wednesday, July 30, 2008
Little Known feature of CPYFRMIMPF:
When we are importing delimited data to the iSeries, such as a comma-delimited spreadsheet or data from a Unix or Windows NT system, the CPYFRMIMPF command is a huge timesaver. But even with this command, we face problems about null data, errors or formatting problems. Many are not aware that the CPYFRMIMPF command is also capable of helping with some of those types of problems.
By default when the command is invoked, it shows only few of the options. But by taking more keys and show all parameters options, we can view all the available parameters for the command.
These are few options that are more useful.
Copy From Import File (CPYFRMIMPF)
Type choices, press Enter.
Decimal point . . . . . . . . . *PERIOD *PERIOD, *COMMA
Date format . . . . . . . . . . *ISO *ISO, *USA, *EUR, *JIS...
Time format . . . . . . . . . . *ISO *ISO, *USA, *EUR, *JIS, *HMS
Copy from record number:
Copy from record number . . . *FIRST Number, *FIRST
Number of records to copy . . *END Number, *END
Errors allowed . . . . . . . . . *NOMAX Number, *NOMAX
Error record file:
File . . . . . . . . . . . . . *NONE Name, *NONE
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Member . . . . . . . . . . . . Name, *FIRST
Replace or add records . . . . . *ADD *ADD, *REPLACE
Replace null values . . . . . . *NO *NO, *FLDDFT
Replace null values prompt at the bottom of the screen can have the value *FLDDFT. If this is changed to *FLDDFT, then when it encounters a null field, it will replace the values in the TOFILE with something acceptable to the 400 (blanks for alphanumeric fields and zeros for numeric fields).
The date and time format fields can be used to format the TOFILE date and time fields, we tell this command the format of those fields and it will do a validity check to ensure that we are importing valid dates and times.
The error record file parameter can hold a file name. If a file name is specified in these fields, any error on the import will be copied to this file. If a file were to be specified with the defaults as shown in this example, the CPYFRMIMPF will import all the records it can but copy off the errors to a separate file for later analysis.
By default when the command is invoked, it shows only few of the options. But by taking more keys and show all parameters options, we can view all the available parameters for the command.
These are few options that are more useful.
Copy From Import File (CPYFRMIMPF)
Type choices, press Enter.
Decimal point . . . . . . . . . *PERIOD *PERIOD, *COMMA
Date format . . . . . . . . . . *ISO *ISO, *USA, *EUR, *JIS...
Time format . . . . . . . . . . *ISO *ISO, *USA, *EUR, *JIS, *HMS
Copy from record number:
Copy from record number . . . *FIRST Number, *FIRST
Number of records to copy . . *END Number, *END
Errors allowed . . . . . . . . . *NOMAX Number, *NOMAX
Error record file:
File . . . . . . . . . . . . . *NONE Name, *NONE
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Member . . . . . . . . . . . . Name, *FIRST
Replace or add records . . . . . *ADD *ADD, *REPLACE
Replace null values . . . . . . *NO *NO, *FLDDFT
Replace null values prompt at the bottom of the screen can have the value *FLDDFT. If this is changed to *FLDDFT, then when it encounters a null field, it will replace the values in the TOFILE with something acceptable to the 400 (blanks for alphanumeric fields and zeros for numeric fields).
The date and time format fields can be used to format the TOFILE date and time fields, we tell this command the format of those fields and it will do a validity check to ensure that we are importing valid dates and times.
The error record file parameter can hold a file name. If a file name is specified in these fields, any error on the import will be copied to this file. If a file were to be specified with the defaults as shown in this example, the CPYFRMIMPF will import all the records it can but copy off the errors to a separate file for later analysis.
Tuesday, July 29, 2008
Move items in Lotus Notes:
To Move items in a List (Bulleted or Numbered List) or individual cells in a table or entire selected row, Press [Ctrl][Up-Arrow] or [Ctrl][Down-Arrow].
On pressing it the selection will move up or down.
On pressing it the selection will move up or down.
Hawthorne Effect:
The Hawthorne effect describes a temporary change to behavior or performance in response to a change in the environmental conditions, with the response being typically an improvement.
The Hawthorne studies have had a dramatic effect on management in organizations and how people react to different situations.
Although illumination research of workplace lighting formed the basis of the Hawthorne effect, other changes such as maintaining clean work stations, clearing floors of obstacles, and even relocating workstations resulted in increased productivity for short periods of time. Thus the term is used to identify any type of short-lived increase in productivity. In short, people will be more productive when appreciated or when watched.
The Hawthorne studies have had a dramatic effect on management in organizations and how people react to different situations.
Although illumination research of workplace lighting formed the basis of the Hawthorne effect, other changes such as maintaining clean work stations, clearing floors of obstacles, and even relocating workstations resulted in increased productivity for short periods of time. Thus the term is used to identify any type of short-lived increase in productivity. In short, people will be more productive when appreciated or when watched.
Friday, July 18, 2008
Find iSeries Command Menus:
The iSeries has over 500 "command menus" that can be displayed by entering "GO CMDxxx" on a command line where xxx is the command verb you are interested in, i.e. to list all of the configuration commands you would enter GO CMDCFG, to list all of the print commands you would enter GO CMDPRT. GO CMD* will get you the complete list.
Thursday, July 17, 2008
Matrix Diagram:
The matrix diagram shows the relationship between two, three or four groups of information. It also can give information about the relationship, such as its strength, the roles played by various individuals or measurements.
Six differently shaped matrices are possible: L, T, Y, X, C and roof-shaped, depending on how many groups must be compared.
• An L-shaped matrix relates two groups of items to each other (or one group to itself).
• A T-shaped matrix relates three groups of items: groups B and C are each related to A. Groups B and C are not related to each other.
• A Y-shaped matrix relates three groups of items. Each group is related to the other two in a circular fashion.
• A C-shaped matrix relates three groups of items all together simultaneously, in 3-D.
• An X-shaped matrix relates four groups of items. Each group is related to two others in a circular fashion.
• A roof-shaped matrix relates one group of items to itself. It is usually used along with an L- or T-shaped matrix.
L-shaped 2 groups A B (or A A)
T-shaped 3 groups B A C but not B C
Y-shaped 3 groups A B C A
C-shaped 3 groups All three simultaneously (3-D)
X-shaped 4 groups A B C D A but not A C or B D
Roof-shaped 1 group A A when also A B in L or T
Six differently shaped matrices are possible: L, T, Y, X, C and roof-shaped, depending on how many groups must be compared.
• An L-shaped matrix relates two groups of items to each other (or one group to itself).
• A T-shaped matrix relates three groups of items: groups B and C are each related to A. Groups B and C are not related to each other.
• A Y-shaped matrix relates three groups of items. Each group is related to the other two in a circular fashion.
• A C-shaped matrix relates three groups of items all together simultaneously, in 3-D.
• An X-shaped matrix relates four groups of items. Each group is related to two others in a circular fashion.
• A roof-shaped matrix relates one group of items to itself. It is usually used along with an L- or T-shaped matrix.
L-shaped 2 groups A B (or A A)
T-shaped 3 groups B A C but not B C
Y-shaped 3 groups A B C A
C-shaped 3 groups All three simultaneously (3-D)
X-shaped 4 groups A B C D A but not A C or B D
Roof-shaped 1 group A A when also A B in L or T
Wednesday, July 16, 2008
Global Variables with IMPORT and EXPORT:
There are many ways to share the information between two programs such as passing parameters, data area, data queues etc., but there is another way to effectively and efficiently share the information -- use EXPORT and IMPORT keywords. In this example, we are going to share the variable "Wk_Global".
PGM1
-------
DAddNum PR 3 0
D Num1 2 0
D Num2 2 0
*
D Wk_Global S 3S 0 EXPORT
*
C Z-Add 10 A 2 0
C Z-Add 11 B 2 0
C Z-Add 0 C 3 0
C Eval C = AddNum(A:B)
C Z-Add C Wk_Global
C CallB 'PGM2'
*
C Seton Lr
*
*
PAddNum B
D PI 3 0
D NumX 2 0
D NumY 2 0
*
C Z-Add 0 Answer 3 0
C Eval Answer = NumX + NumY
C Return Answer
P E
PGM2
-------
D Wk_Global S 3S 0 IMPORT
C Wk_Global Dsply
C Return
This Wk_Global value will be passed to the next program.
PGM1
-------
DAddNum PR 3 0
D Num1 2 0
D Num2 2 0
*
D Wk_Global S 3S 0 EXPORT
*
C Z-Add 10 A 2 0
C Z-Add 11 B 2 0
C Z-Add 0 C 3 0
C Eval C = AddNum(A:B)
C Z-Add C Wk_Global
C CallB 'PGM2'
*
C Seton Lr
*
*
PAddNum B
D PI 3 0
D NumX 2 0
D NumY 2 0
*
C Z-Add 0 Answer 3 0
C Eval Answer = NumX + NumY
C Return Answer
P E
PGM2
-------
D Wk_Global S 3S 0 IMPORT
C Wk_Global Dsply
C Return
This Wk_Global value will be passed to the next program.
Monday, July 14, 2008
Likert Scale:
A Likert scale is a psychometric response scale often used in questionnaires, and is the most widely used scale in survey research. When responding to a Likert questionnaire item, respondents specify their level of agreement to a statement. The scale is named after Rensis Likert, who published a report describing its use.
A Likert item is simply a statement which the respondent is asked to evaluate according to any kind of subjective or objective criteria; generally the level of agreement or disagreement is measured. Often five ordered response levels are used.
The format of a typical five-level Likert item is:
1. Strongly disagree
2. Disagree
3. Neither agree nor disagree
4. Agree
5. Strongly agree
After the questionnaire is completed, each item may be analyzed separately or in some cases item responses may be summed to create a score for a group of items. Hence, Likert scales are often called summative scales.
A Likert item is simply a statement which the respondent is asked to evaluate according to any kind of subjective or objective criteria; generally the level of agreement or disagreement is measured. Often five ordered response levels are used.
The format of a typical five-level Likert item is:
1. Strongly disagree
2. Disagree
3. Neither agree nor disagree
4. Agree
5. Strongly agree
After the questionnaire is completed, each item may be analyzed separately or in some cases item responses may be summed to create a score for a group of items. Hence, Likert scales are often called summative scales.
Sunday, July 13, 2008
UDS Vs LDA:
When you define a data area using UDS, the RPG program will read it automatically when the program starts, lock it, and update/unlock it only when the program ends. That's what UDS is for.
If you want to read a data area without doing that, use the IN & OUT RPG op-codes instead of UDS.
Here's an example of that:
D LDA DS DTAARA(*LDA)
D RptDate 1 8A
D RptType 105 106A
D MyDtaAra DS 200 DTAARA('QGPL/MYDTAARA')
D LastRun 1 8A
D LastRptType 105 106A
** Load the LDA. This does not lock it.
c in LDA
c dsply RptDate
c dsply RptType
** Load My Data Area. This does not lock it.
c in MyDtaAra
c dsply LastRun
c dsply LastRptType
** Load My Data Area again, this time lock it and update it.
c *lock in MyDtaAra
c eval LastRun = RptDate
c eval LastRptType = RptType
c out MyDtaAra
c eval *inlr = *on
If you want to read a data area without doing that, use the IN & OUT RPG op-codes instead of UDS.
Here's an example of that:
D LDA DS DTAARA(*LDA)
D RptDate 1 8A
D RptType 105 106A
D MyDtaAra DS 200 DTAARA('QGPL/MYDTAARA')
D LastRun 1 8A
D LastRptType 105 106A
** Load the LDA. This does not lock it.
c in LDA
c dsply RptDate
c dsply RptType
** Load My Data Area. This does not lock it.
c in MyDtaAra
c dsply LastRun
c dsply LastRptType
** Load My Data Area again, this time lock it and update it.
c *lock in MyDtaAra
c eval LastRun = RptDate
c eval LastRptType = RptType
c out MyDtaAra
c eval *inlr = *on
Friday, July 11, 2008
Kappa:
The Kappa is the ratio of the proportion of times the appraisers did agree to the proportion of times the appraisers could agree.
Kappa Statistics: If you have a known standard for each rating, you can assess the correctness of all appraisers' ratings compared to the known standard. If Kappa = 1, then there is perfect agreement. If Kappa = 0, then there is no agreement. The higher the value of Kappa, the stronger the agreement. Negative values occur when agreement is weaker than expected by chance, but this rarely happens. Depending on the application, Kappa less than 0.7 indicates that your measurement system needs improvement. Kappa values greater than 0.9 are considered excellent.
Kappa Statistics: If you have a known standard for each rating, you can assess the correctness of all appraisers' ratings compared to the known standard. If Kappa = 1, then there is perfect agreement. If Kappa = 0, then there is no agreement. The higher the value of Kappa, the stronger the agreement. Negative values occur when agreement is weaker than expected by chance, but this rarely happens. Depending on the application, Kappa less than 0.7 indicates that your measurement system needs improvement. Kappa values greater than 0.9 are considered excellent.
Wednesday, July 9, 2008
Qualified Parameters in Custom Commands:
If you have created a custom command, and you want the prompt to appear similar to the below mentioned format. That is, you need the file and the library as input. Instead of defining two different parameters we can create a qualified parameter which will take care of multiple inputs. The qualified parameter automatically stores the two values in a single variable and it can be easily used for further manipulation.
FILE _____________
*LIBL________
The command source is
CMD PROMPT('PRINT DDS SOURCE')
PARM KWD(FILE) TYPE(QUAL1) PROMPT('DDS Source +
File with Msg.s')
QUAL1: QUAL TYPE(*NAME) LEN(10)
QUAL TYPE(*CHAR) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL *LIBL)) PROMPT('Library')
FILE _____________
*LIBL________
The command source is
CMD PROMPT('PRINT DDS SOURCE')
PARM KWD(FILE) TYPE(QUAL1) PROMPT('DDS Source +
File with Msg.s')
QUAL1: QUAL TYPE(*NAME) LEN(10)
QUAL TYPE(*CHAR) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL *LIBL)) PROMPT('Library')
Tuesday, July 8, 2008
Kaplan-Meier Estimator:
The Kaplan-Meier estimator (also known as the product limit estimator) estimates the survival function from life-time data. In medical research, it might be used to measure the fraction of patients living for a certain amount of time after treatment. An economist might measure the length of time people remain unemployed after a job loss. An engineer might measure the time until failure of machine parts.
A plot of the Kaplan-Meier estimate of the survival function is a series of horizontal steps of declining magnitude which, when a large enough sample is taken, approaches the true survival function for that population. The value of the survival function between successive distinct sampled observations ("clicks") is assumed to be constant.
A plot of the Kaplan-Meier estimate of the survival function is a series of horizontal steps of declining magnitude which, when a large enough sample is taken, approaches the true survival function for that population. The value of the survival function between successive distinct sampled observations ("clicks") is assumed to be constant.
Monday, July 7, 2008
INHWRT (Inhibit Write) during OVRDBF:
INHWRT (inhibit write) parameter in the OVRDBF is extremely useful when testing a program without wanting to update any data. This OVRDBF command helps to create a program that updates files without really updating.
When set to *YES, the processed records are prevented from being written to the database, however the records WILL be written to any output device specified. This is perfect when you need a list of those records that will be modified before the database is actually changed. Once the list is verified, you can rerun the program without program changes or recompiling.
The “Inhibit Write” parameter allows you to test a program without storing the processed records in the database.
When set to *YES, the processed records are prevented from being written to the database, however the records WILL be written to any output device specified. This is perfect when you need a list of those records that will be modified before the database is actually changed. Once the list is verified, you can rerun the program without program changes or recompiling.
The “Inhibit Write” parameter allows you to test a program without storing the processed records in the database.
Kano Analysis:
Kano analysis is a quality measurement tool used to prioritize customer requirements based on their impact to customer satisfaction. It is used to determine which requirements are important. All identified requirements may not be of equal importance to all customers. Kano analysis can help you rank requirements for different customers to determine which have the highest priority.
Kano model can be used to help identify customer segments, based on the relative priority of each segment's requirements. Once segments have been defined, using both needs analysis and more tradition criteria such as gender, company size, etc., the Kano model can be re-applied to each segment to further defined the segment's priorities.
Briefly, Kano (a Japanese researcher), stated that there are four types of customer needs, or reactions to product characteristics / attributes:
1. The 'Surprise & Delight' factors. These really make your product stand out from the others.
E.g. A passenger jet that could take off vertically.
2. The 'More is Better'.
E.g. A jet airliner that uses a little less fuel than the competition.
3. The 'must be' things. Without this, you'll never sell the product.
E.g. A jet airliner that cannot meet airport noise regulations.
4. Finally, there are the 'dissatisfiers', the things that cause your customers not to like your product.
E.g. A jet airliner that is uncomfortable to ride in.
Kano model can be used to help identify customer segments, based on the relative priority of each segment's requirements. Once segments have been defined, using both needs analysis and more tradition criteria such as gender, company size, etc., the Kano model can be re-applied to each segment to further defined the segment's priorities.
Briefly, Kano (a Japanese researcher), stated that there are four types of customer needs, or reactions to product characteristics / attributes:
1. The 'Surprise & Delight' factors. These really make your product stand out from the others.
E.g. A passenger jet that could take off vertically.
2. The 'More is Better'.
E.g. A jet airliner that uses a little less fuel than the competition.
3. The 'must be' things. Without this, you'll never sell the product.
E.g. A jet airliner that cannot meet airport noise regulations.
4. Finally, there are the 'dissatisfiers', the things that cause your customers not to like your product.
E.g. A jet airliner that is uncomfortable to ride in.
Thursday, July 3, 2008
Understanding User Spaces:
Because quite a few of IBM's system-supplied APIs use a user space to store information, it is important to understand what they are and how they work.
Information is stored in a user space as a "stream," similar to a stream file in the IFS. This is different than the physical files we are used to dealing with in our everyday applications. Instead of each set of data being stored in a physical record, each record is a subsection of a stream of data.
When using a user space with an IBM-supplied API, data is normally sectioned by using a data structure. This data structure defines a record of data in the stream in the user space. For example, let's assume that our user space contains information about a customer. The first nine characters contain the customer number, the next 10 contain the last name, and the last 10 contain the customer's first name. The data may appear in a user space as such:
000012457Stone Brad
001248945Johnson Jerry
045542144Anderson Louis
In order to separate out each record from this stream of data, we will use a data structure. The data structure would appear as shown in the following RPG snippet:
D CustomerInfo DS
D CstNumber 9
D CstLName 10
D CstFName 10
In order to parse the data from the user space, we need to move the data structure to the beginning of each record. The data structure then "overlays" the data so we are able to easily access the information. In RPG, this is done with a pointer. The CustomerInfo data structure as shown above would be defined based on a pointer. We then move the position of that pointer to the beginning of each set of data in order to populate the subfields of the data structure with each customer's information.
When doing this, we will also have to know the size of each structure of data. We know that IBM APIs return a "header" that defines, among other things, the start of the data and the length of each entry in the set of data contained within the user space.
The following piece of RPG code defines a standard header that deal with IBM APIs that store information in a user space:
D GenHeader DS
BASED (HeaderPtr)
D OffsetHdr 117 120B 0
D OffsetLst 125 128B 0
D NumLstEnt 133 136B 0
D EntrySize 137 140B 0
As we can see, there are four subfields defined in this data structure. The first, OffsetHdr, is used to define the offset to the header information. Next is the field OffsetLst. This defines the offset to the start of the list information. The list information is the data that we are interested in parsing from the user space.
Next, the NumLstEnt field is used to define the number of entries in the list. This is an important number to know so that as we parse through the list we know when to stop. Finally, the EntrySize field is used to define the size of each entry. This is used so that we know where to reposition our pointer on the next "record" of data in the user space.
We start reading by setting our basing pointer to the OffsetLst value, entering a loop that executes NumLstEnt times, and, for each subsequent iteration of the loop, repositioning our pointer by adding the value stored in EntrySize to our current pointer position.
Information is stored in a user space as a "stream," similar to a stream file in the IFS. This is different than the physical files we are used to dealing with in our everyday applications. Instead of each set of data being stored in a physical record, each record is a subsection of a stream of data.
When using a user space with an IBM-supplied API, data is normally sectioned by using a data structure. This data structure defines a record of data in the stream in the user space. For example, let's assume that our user space contains information about a customer. The first nine characters contain the customer number, the next 10 contain the last name, and the last 10 contain the customer's first name. The data may appear in a user space as such:
000012457Stone Brad
001248945Johnson Jerry
045542144Anderson Louis
In order to separate out each record from this stream of data, we will use a data structure. The data structure would appear as shown in the following RPG snippet:
D CustomerInfo DS
D CstNumber 9
D CstLName 10
D CstFName 10
In order to parse the data from the user space, we need to move the data structure to the beginning of each record. The data structure then "overlays" the data so we are able to easily access the information. In RPG, this is done with a pointer. The CustomerInfo data structure as shown above would be defined based on a pointer. We then move the position of that pointer to the beginning of each set of data in order to populate the subfields of the data structure with each customer's information.
When doing this, we will also have to know the size of each structure of data. We know that IBM APIs return a "header" that defines, among other things, the start of the data and the length of each entry in the set of data contained within the user space.
The following piece of RPG code defines a standard header that deal with IBM APIs that store information in a user space:
D GenHeader DS
BASED (HeaderPtr)
D OffsetHdr 117 120B 0
D OffsetLst 125 128B 0
D NumLstEnt 133 136B 0
D EntrySize 137 140B 0
As we can see, there are four subfields defined in this data structure. The first, OffsetHdr, is used to define the offset to the header information. Next is the field OffsetLst. This defines the offset to the start of the list information. The list information is the data that we are interested in parsing from the user space.
Next, the NumLstEnt field is used to define the number of entries in the list. This is an important number to know so that as we parse through the list we know when to stop. Finally, the EntrySize field is used to define the size of each entry. This is used so that we know where to reposition our pointer on the next "record" of data in the user space.
We start reading by setting our basing pointer to the OffsetLst value, entering a loop that executes NumLstEnt times, and, for each subsequent iteration of the loop, repositioning our pointer by adding the value stored in EntrySize to our current pointer position.
Wednesday, July 2, 2008
Kanban:
Kanban: A Japanese term. The actual term means "signal". It is one of the primary tools of a Just in Time (JIT) manufacturing system. It signals a cycle of replenishment for production and materials. This can be considered as a “demand” for product from on step in the manufacturing or delivery process to the next. It maintains an orderly and efficient flow of materials throughout the entire manufacturing process with low inventory and work in process. It is usually a printed card that contains specific information such as part name, description, quantity, etc.
In a Kanban manufacturing environment, nothing is manufactured unless there is a “signal” to manufacture. This is in contrast to a push-manufacturing environment where production is continuous.
In a Kanban manufacturing environment, nothing is manufactured unless there is a “signal” to manufacture. This is in contrast to a push-manufacturing environment where production is continuous.
Use function Keys without Response Indicators:
A lot of programmers standardize on indicator usage for function keys within display file programs, e.g. *IN01 for F1, *IN03 for F3, etc, which is fine and readable if weare aware of the convention being used.
However, if we want to cut down on the number of indicators used in the program and make it easier to read and maintain then weshould code the display files not to use response indicators and make use of the device dependent I/O feedback area of the File Information Data Structure instead.
Position 369 of the File Information Data Structure for display files contains a hex byte that represents the function key (or other grey key) pressed by the user.
By coding field @FNKEY in this position of the INFDS and then defining text constants for the appropriate function key value, we can test for the use of function keys within the programs by using:
@FNKEY IFEQ $F5
...
...
ENDIF
as opposed to:
*IN05 IFEQ *ON
...
...
ENDIF
The source snippets below show the coding needed within the RPG/400 program to use this technique.
Code
RPG SOURCE SNIPPET
==================
FWORKSTN CF E WORKSTN KINFDS INFDS
F* Display File
F*----------------------------------------------------------------
IINFDS DS
I 369 369 @FNKEY
I* Function key values
I X'31' C $F1
I X'32' C $F2
I X'33' C $F3
I X'34' C $F4
I X'35' C $F5
I X'36' C $F6
I X'37' C $F7
I X'38' C $F8
I X'39' C $F9
I X'3A' C $F10
I X'3B' C $F11
I X'3C' C $F12
I X'B1' C $F13
I X'B2' C $F14
I X'B3' C $F15
I X'B4' C $F16
I X'B5' C $F17
I X'B6' C $F18
I X'B7' C $F19
I X'B8' C $F20
I X'B9' C $F21
I X'BA' C $F22
I X'BB' C $F23
I X'BC' C $F24
I X'BD' C $CLEAR
I X'F1' C $ENTER
I X'F3' C $HELP
I X'F4' C $RLLDN
I X'F5' C $RLLUP
I X'F4' C $PAGUP
I X'F5' C $PAGDN
I X'F6' C $PRINT
I X'F8' C $BCKSP
I X'3F' C $AUTO
I*----------------------------------------------------------------
C ...
C ...
C EXFMTxxxxxxxx
C*
C* Process function keys...
C*
C SELEC
C @FNKEY WHEQ $F1
C EXSR HELP
C @FNKEY WHEQ $F3
C ..
C ...
C @FNKEY WHEQ $ENTER
C ...
C ENDSL
C*----------------------------------------------------------------
DDS SOURCE SNIPPET
==================
A R DSPFMAT
A CF01
A CF03
A PAGEDOWN
A etc...
However, if we want to cut down on the number of indicators used in the program and make it easier to read and maintain then weshould code the display files not to use response indicators and make use of the device dependent I/O feedback area of the File Information Data Structure instead.
Position 369 of the File Information Data Structure for display files contains a hex byte that represents the function key (or other grey key) pressed by the user.
By coding field @FNKEY in this position of the INFDS and then defining text constants for the appropriate function key value, we can test for the use of function keys within the programs by using:
@FNKEY IFEQ $F5
...
...
ENDIF
as opposed to:
*IN05 IFEQ *ON
...
...
ENDIF
The source snippets below show the coding needed within the RPG/400 program to use this technique.
Code
RPG SOURCE SNIPPET
==================
FWORKSTN CF E WORKSTN KINFDS INFDS
F* Display File
F*----------------------------------------------------------------
IINFDS DS
I 369 369 @FNKEY
I* Function key values
I X'31' C $F1
I X'32' C $F2
I X'33' C $F3
I X'34' C $F4
I X'35' C $F5
I X'36' C $F6
I X'37' C $F7
I X'38' C $F8
I X'39' C $F9
I X'3A' C $F10
I X'3B' C $F11
I X'3C' C $F12
I X'B1' C $F13
I X'B2' C $F14
I X'B3' C $F15
I X'B4' C $F16
I X'B5' C $F17
I X'B6' C $F18
I X'B7' C $F19
I X'B8' C $F20
I X'B9' C $F21
I X'BA' C $F22
I X'BB' C $F23
I X'BC' C $F24
I X'BD' C $CLEAR
I X'F1' C $ENTER
I X'F3' C $HELP
I X'F4' C $RLLDN
I X'F5' C $RLLUP
I X'F4' C $PAGUP
I X'F5' C $PAGDN
I X'F6' C $PRINT
I X'F8' C $BCKSP
I X'3F' C $AUTO
I*----------------------------------------------------------------
C ...
C ...
C EXFMTxxxxxxxx
C*
C* Process function keys...
C*
C SELEC
C @FNKEY WHEQ $F1
C EXSR HELP
C @FNKEY WHEQ $F3
C ..
C ...
C @FNKEY WHEQ $ENTER
C ...
C ENDSL
C*----------------------------------------------------------------
DDS SOURCE SNIPPET
==================
A R DSPFMAT
A CF01
A CF03
A PAGEDOWN
A etc...
Subscribe to:
Posts (Atom)