Customized TAB sequence

From 2EWiki

Jump to: navigation, search

Customized TAB sequence - K.MD Bashirudeen

Contents

Introduction:

All Fusion 2E Screens are sets the default display sequence in all 2E screens. But we can also customize the TAB sequence based on our requirement, i.e., like from top to bottom or wherever user wants to move the cursor from one field to another. In some cases the TAB sequence will not work as developer mentioned the TAB sequence as expected. This will be a very interesting topic for any one to try out. The following scenario can be foreseen in any applications. The scenario is explained with a very clear example. The solution is also provided to overcome the problem.

Problem:

User wants to customize the TAB sequence for the fields in the below mentioned screen as from the fields (Top to bottom and Top to bottom) 1, 2, 3 etc as mentioned in the below EDTRCD screen Fig 1. The TAB sequence is given in the order as user wants but the cursor is not moved from field 1 to field 2 as expected. Instead TAB sequence is moved from right to left in the screen and continues the same in the entire screen.

In the screen (Fig 1), there are some constants are defined between the fields since these are all different headings they need. That will change the order of display sequence. For example let us consider a constant is added between the field 1 and field 2.The DSP Sequence for field is 1.00 and field 2 is 3.00.Here DSP sequence 2.00 will not be displayed since the added field is a constant.

TAB sequence will not work as we expect or as we have mentioned in the below case:

Let us consider the Display Sequence is given in ascending order for the screen fields and the next DSP sequence is missed(skipped) due to Constant fields ,Then other fields continues with increment with last Skipped DSP sequence number .And the TAB sequence is also in descending order for the skipped scenario fields mentioned in the Example 1 given below. In this case All Fusion 2E provides a facility to skip the DSP sequence and TAB sequence with descending order only 5 times .If exceeded by the 5 times, the TAB sequence won’t work as we expected/customized. Example 1: EDIT SCREEN FORMAT DETAILS: Field Func Typ Usg Ovr Display seq Tab seq

Column3 Row1 (21) DTA REF I I 14.00 15.00 Column1 Row2 (2) DTA REF I I 17.00 14.00

Column3 Row2 (23) DTA REF I I 18.00 16.00 Column1 Row3 (3) DTA REF I I 24.00 5.00

The fields in the below screen (Fig 1) are displayed based on the different conditions. For example if Header Type is ‘A’ then certain fields will display on the screen, if Type is ‘B’ some of the fields will display on the screen. If Type is ‘C’ some of other fields will display on the screen. Rests of other fields are hidden when those specific fields are getting displayed based on the Header Type condition. In this case the cursor should move correctly between the fields based on the developer designed the order. But it is not.

Fig1: EDTRCD screen:

  • PROGRAM *PGMMOD OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO DD/MM/YY
USER             			TAB Sequence                        HH:MM:SS 
                             OOOOOOOOOOOOOOOOOOOO                              
Header OOOOOOOOOO Header Type O  HeadDescription                                 
Head Type Table number, press Enter. -     
                                         
                    Column1       column2         Column3       Column4     
Row1 		        1. - 	                        21. -                       
Row2 			 2. -                          23. -                        
			  Head1	Head2		    Head3		Head4
Row3			 3. -          10.-            22. -          30.-            
			  Head5	Head6		    Head7		Head8	
Row4		        4. -          11.-            24. -          31. -       
   
  Row5	    	 5. -          12.-            25. -          32. -           
  Row6		 6. -          13.-            26. -          33. -           
  Row7		 7. -          14.-            27. -          34. -           
Row8                OOOOOOOOOOOOOOOOOOOOOOOOO                          
Constant Text 
Row10               OOOOOOOOOOOOOOOOOOOOOOOOO                             
Row11		        OOOOOOOOOOOOOOOOOOOO 			Value	-----           
       Date1 66/66/66    Date2 66/66/66    User OOOOOOOOOO           O 
F3=Exit   F12=Previous                                                         
                                                                               

Note: 1. Arrow mark shows how the TAB sequence needs to move as per the Requirement. 2. Highlighted Blue color fields are constants defined to display in different conditions. DSP Sequence and TAB sequence are given for the screen as below: EDIT SCREEN FORMAT DETAILS Field Func Typ Usg Ovr Display seq Tab seq

Column3 ROW1 (21)      		DTA  REF  I   I       14.00      15.00
Column1 Row2 (2) 			DTA  REF  I   I       17.00      14.00
Column3 Row2 (23)	       	DTA  REF  I   I       18.00      16.00
Column1 Row3  (3) 			DTA  REF  I   I       24.00       5.00
Column4 Row3	 (30)		       DTA  REF  I   I       27.00      18.00   
Column1 Row4	(4)	   		DTA  REF  I   I       33.00       7.00   
Column4 Row4 (31)		       DTA   REF  I   I      36.00      20.00
Column1 Row5	 (5)	   		DTA   REF  I   I       40.00       9.00
Column4 Row5	 (32)	 	       DTA  REF  I   I       43.00      22.00 
Column1 Row6	 (6)	    		DTA  REF  I   I       45.00      11.00
Column2 Row6	 (13)		       DTA  REF  I   I       46.00      23.00
Column3 Row6	 (26)	   		DTA  REF  I   I       48.00      12.00
Column4 Row6	 (33)	       	DTA  REF  I   I       49.00      24.00  
Column1 Row7	  (7)	    		DTA  REF  I   I       51.00      13.00  

What will happen while compiling?

In this case in DDS source of this screen the FLDCSRPRG command won’t be written for any of the fields. Due to this reason the TAB sequence will not work as we given in the screen.

How the code will be in DDS?

Example for one field: In this case FLDCSRPRG is not written for the fields. The following code will be generated without FLDCSRPRG.

Sample Code keywords for a field:

DSPATR(MDT) CHECK(AB) OVRDTA DSPATR(PR) DSPATR(RI PC) DSPATR(ND) DSPATR(UL HI) COLOR(PNK) OVRATR

The FLDCSRPRG is not coded in DDS for this display file.

Reason:

The DSP sequence number is not continued in the order (i.e. some of the DSP sequence number is skipped and TAB sequence number is in descending order for these fields. And it occurs more than 5 times.)

Solution:

To solve this problem we need to define a dummy field between the skipped DSP sequence fields in the screen and give the Display Sequence as continuous from the previous filed DSP sequence number without skipping the DSP Sequence (i.e. the number is continuous and not missed out the next number) and give the TAB sequence for the added field is same as the previous one or add + 1 with the previous TAB sequence.

If the TAB sequence is not working in any of your screen do the following:

1. Identify the number of count is greater than 5 for the descending order TAB sequence with DSP sequence skipping the next field case.

2. Add the Dummy fields between the DSP sequence skipped fields. And set the attribute as Non display for the added dummy fields. Give the DSP sequence number as continuation from the previous one.

Example2 : The number of count is 7 in Fig 1 and allowed combination(Skipped DSP sequence number and descending order TAB sequence ) is 5 .The remaining combination is 2. Now we need to add two dummy fields between any of the two set of combinations.

Add two fields like TEXT1 between any of the above combination and TEXT 2 between another above combination mentioned as below Fig 2. TEXT1 & TEXT2 fields are should be input and give the field attribute is Non display for the added fields and Non Display to text of the field as mentioned in the Fig 3 ,so that the field will not be displayed in the screen.(Note: we should not give those fields are as Output or Hidden . If we do this it will not solve our purpose)

Find the sample screen while insert the fields TEXT 1 and Text 2 Fig 2:

  • PROGRAM *PGMMOD OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO DD/MM/YY
USER             			TAB Sequence                        HH:MM:SS 
                             OOOOOOOOOOOOOOOOOOOO                              
Header OOOOOOOOOO Header Type O  HeadDescription                                 
Head Type Table number, press Enter. -     
                                         
                    Column1       column2         Column3       Column4     
Row1 		        1. - 	                        21. -     TEXT1                  
Row2 			 2. -                          23. -                        
			  Head1	Head2		    Head3		Head4
Row3			 3. -          10.-            22. -          30.-            
			  Head5	Head6		    Head7		Head8	
Row4		        4. -          11.-            24. -          31. -       
   
  Row5	    	 5. -          12.-            25. -          32. -  TEXT2         
  Row6		 6. -          13.-            26. -          33. -           
  Row7		 7. -          14.-            27. -          34. -           
Row8                OOOOOOOOOOOOOOOOOOOOOOOOO                          
Constant Text 
Row10               OOOOOOOOOOOOOOOOOOOOOOOOO                             
Row11		        OOOOOOOOOOOOOOOOOOOO 			Value	-----           
       Date1 66/66/66    Date2 66/66/66    User OOOOOOOOOO           O 

F3=Exit F12-Previous

Note: In Fig 2 Text 1 and Text 2 fields are added and it will not be displayed in the screen while running the program. These are hidden fields

Field set up for TEXT 1 & Text 2: Fig 3:

EDIT SCREEN FIELD ATTRIBUTES     
Field . : Text 1                                                               
Field display attributes:                                                      
                    HI  UL  RI  CS  BL  ND Colour                              
*----->-Output......                     Y                                     
*-(1)-<-Input.......                     Y                                     
        Error.......         Y                                                 
        Entry.......                                                           
                                                                               
1. Convert Input field to Output field if the following                        
   condition is true:                                                          
                                                                               
   Ctx Field                     Condition                                     
                                                                               
                                                                               
2. Apply to field text also  . . . . . : Y                                     
                                                                               
                                                                              
                                                                               
                                                                                             
F3=Exit  F9=Field details                                                      
                                                                              


After do the set up the display sequence will be as follows:

Field Func Typ Usg Ovr Display seq Tab seq Column3 ROW1 (21) DTA REF I I 14.00 15.00 Text 1 USR TXT I I 16.00 16.00 Column1 Row2 (2) DTA REF I I 17.00 14.00

Column4 Row4 (31) DTA REF I I 36.00 20.00 Text 2 USR TXT I I 39.00 21.00 Column1 Row5 (5) DTA REF I I 40.00 9.00

In the above case, the display sequence skips but the TAB sequence is in ascending order. So we have only 5 cases will be the descending order TAB sequence with no continuation number in the Display Sequence

If we compile the code and the DDS source will be as follows.

DSPATR(MDT) CHECK(AB) FLDCSRPRG(Z1J3AT) OVRDTA DSPATR(PR) DSPATR(RI PC) DSPATR(ND) DSPATR(UL HI) COLOR(PNK) OVRATR

In this case FLDCSRPRG is generated for the field and also it will be generated for the rest of the fields. So the TAB sequence will be working as we expected.

Not a problem for the following cases:

The following case will not be a problem since the TAB sequence is in ascending order even though Display Sequence not continued for the input field.(Note Here DSP sequence 60.00 is continued after the DSP sequence number 59.00 for out put field.)

Case 1: Field Func Typ Usg Ovr Display seq Tab seq Row10 DTA STS I I 59.00 30.00 TEXTFLD USR TXT I O 60.00 Row11 DTA STS I I 61.00 31.00

Case 2: Field Func Typ Usg Ovr Display seq Tab seq ROW10 DTA STS I I 59.00 32.00 TEXTFLD USR TXT I O 60.00 ROW11 DTA STS I I 61.00 31.00

Conclusion:

Conclusion is either the Display sequence should continue for the input fields without skipping the sequence number OR the TAB sequence should be in the ascending order. In either of the cases are missed and if the TAB sequence is not working we can use the above mentioned technology to solve this issue. If we avoid using the constant we will not face this problem. But in some cases we have to use the constant for heading etc. In this case we can go for the above solution.

Personal tools