Assign field edits to the fields on the BLDRCU screen. 
	 
  
 
	 Restriction:  This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms. 
	  
 
	 In this tutorial, you assign field edits to entry fields on the Parts Update screen, and then set up a PF key that enables the end user to bypass screen edits. Screen field edits enable you to define the type of and format for data that a field can accept or output. The following table describes the edits you will assign in this tutorial: 
	 
 
	 
 
		   
			  
				| Field 
				 | 
 
				Type 
				 | 
 
				Edit(s) 
				 | 
 
			 
 
		   
			  
				| Function 
				 | 
 
				Character 
				 | 
 
				 
				   
					 - Require data entry. 
					 
 
 
					 - Do not allow embedded spaces or punctuation. 
					 
 
 
				   
 
				 | 
 
			 
 
			  
				| Part Number 
				 | 
 
				Character 
				 | 
 
				 
				   
					 - Store data as an 8-byte alphanumeric number. 
					 
 
 
					 - Require data entry. 
					 
 
 
					 - Define input picture as 
						NNNNNNN9. 
					 
 
 
					 - Define output picture as 
						XXXXXXX9. 
					 
 
 
				   
 
				 | 
 
			 
 
			  
				| Units 
				 | 
 
				Numeric 
				 | 
 
				 
				   
					 - Allow data between 
						0 and 
						50. 
					 
 
 
					 - Move zeros to field if data not entered. 
					 
 
 
					 - Remove special characters. 
					 
 
 
					 - Specify an error message that says VALID VALUES FOR UNITS ARE 0 THROUGH 50. 
					 
 
 
					 - Define output picture as 
						Z9. 
					 
 
 
				   
 
				 | 
 
			 
 
			  
				| Base Price 
				 | 
 
				Numeric 
				 | 
 
				 
				   
					 - Store data as a 4-digit number with 2 decimal places. 
					 
 
 
					 - Move zeros to field if data not entered. 
					 
 
 
					 - Remove special characters. 
					 
 
 
					 - Define output picture as 
						ZZZ9.99. 
					 
 
 
				   
 
				 | 
 
			 
 
			  
				| Inventory Value 
				 | 
 
				Numeric 
				 | 
 
				 
				   
					 - Store data as a 12-digit number with 2 decimal places and a $ to represent monetary value. 
					 
 
 
					 - Computational field. 
					 
 
 
					 - Move zeros to field if data not entered. 
					 
 
 
					 - Define output picture as 
						$$$$$$$$9.99 
					 
 
 
				   
 
				 | 
 
			 
 
		  
 
		
 
 
	 Requirements
 
		 
		Before attempting this tutorial, you must complete: 
		
 
		
 
		If you have closed 
		  Enterprise Developer, start it; then open the AppMaster Builder perspective. 
		
 
	  
 
	 Assign Screen Edits to BLDRCU Fields
 
		 
		Complete the following procedures to assign screen edits to the BLDRCU fields you painted in 
		  Tutorial: Paint a Screen. 
		
 
		 
		   
			 - Function 
			 
 
 
			 - In this procedure, you assign field edits to the 
				FUNCTION field on the Parts Update screen. The edits you assign here set the field to require input from the end user. 
				
 
				  - Click on the 
					 Function entry field to select it. 
				  
 
 
				  - Click 
					 Edit > Field Edits. The Field Edit Data Type dialog box appears. 
				  
 
 
				  - To accept the default 
					 Character Local Data Class and 
					 Character String (Fixed) Local Data Type, click 
					 OK. These selections define the internal representation for the field. The Field Edits window appears, showing default edits for the field. 
				  
 
 
				  - Click 
					 Input. The Input Representation dialog box appears. Here, you specify format and data requirements that the end user must adhere to when entering data into the field. 
				  
 
 
				  - Check 
					 Input Required. When checked, this option requires the end user to enter data for the field. 
				  
 
 
				  - Uncheck 
					 Embedded Spaces. 
				  
 
 
				  - Click 
					 OK. This returns you to the Field Edits window. 
				  
 
 
				  - Click 
					 OK. This returns you to your painted screen. 
				  
 
 
				
 
			  
 
		   
		   
			 - Part Number 
			 
 
 
			 - In this procedure, you assign field edits to the 
				Part Number entry field on the Parts Update screen. 
				
 
				   
					 - Accept default class and type 
					 
 
 
					 -  
						
 
						  - Click the 
							 Part Number entry field to select it. 
						  
 
 
						  - Click 
							 Edit > Field Edits. The Field Edit Data Type dialog box appears. 
						  
 
 
						  - To accept the default 
							 Character Local Data Class and 
							 Character String (Fixed) Local Data Type, click 
							 OK. The Field Edits summary dialog box appears, showing default edits for the field. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define user inputs 
					 
 
 
					 -  
						
 
						  - Click 
							 Input. The Input Representation window appears. 
						  
 
 
						  - Check 
							 Input Required. 
						  
 
 
						  - Click 
							 Use Input Mask. 
						  
 
 
						  - In the 
							 Input Mask field, type 
							 nnnnnnn9 (7 n's). 
						  
 
 
						  - Click 
							 OK. The Field Edits window reappears. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define outputs 
					 
 
 
					 -  
						
 
						  - Click 
							 Output. The Output Representation dialog box appears. Here, you can specify format requirements for displaying the data. 
						  
 
 
						  - Click 
							 Use Output Mask. 
						  
 
 
						  - In the 
							 Output Mask entry field (located below the 
							 Type drop-down list), enter 
							 xxxxxxx9 (7 x's). 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						  - Click 
							 OK. This returns you to your painted screen. 
						  
 
 
						
 
					  
 
				   
				
 
			  
 
		   
		   
			 - Units 
			 
 
 
			 - In this procedure, you assign field edits to the Units field on the Parts Update screen. 
				
 
				  - Click on the 
					 Units entry field to select it. 
				  
 
 
				  - From the 
					 Edit menu select 
					 Field Edits. The Field Edit Data Type dialog box appears. 
				  
 
 
				
 
				 
				   
					 - Set local data 
					 
 
 
					 -  
						
 
						  - On the 
							 Local Data Class list, click 
							 Numeric. 
						  
 
 
						  - On the 
							 Local Data Type list, click 
							 COBOL Display. 
						  
 
 
						  - Click 
							 OK. The Field Edits dialog box appears. 
						  
 
 
						
 
					  
 
				   
				   
					 - Assign input edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Input. The Input Representation window appears. The 
							 Use Characteristics radio button is selected by default. 
						  
 
 
						  - Check 
							 Zero When Blank. Checking this option moves zeroes to the field if the end user does not enter data. 
						  
 
 
						  - Check 
							 Ensure Computational. Checking this option prevents premature termination of the program if a user enters non-numeric data into the field. 
						  
 
 
						
 
					  
 
				   
				   
					 - Assign an error message 
					 
 
 
					 -  
						
 
						  - Click 
							 Message. The Input Messages and Attributes dialog box appears. Here you can specify error messages to display if the field fails input edits or if data for a required field is not entered. 
						  
 
 
						  - In the 
							 Error field, type 
							 Valid values are 0 through 50. 
						  
 
 
						  - In the 
							 Attributes field, type 
							 pos+brt. This positions the cursor at the beginning of the field when invalid data is entered, and assigns a bright intensity to the error message. 
						  
 
 
						  - Click 
							 OK. This returns you to the Input Representation window. 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - View default output edits (optional) 
					 
 
 
					 -  
						
 
						  - Click 
							 Output. The Output Representation dialog box appears. 
						  
 
 
						  - After viewing the information on this window, click 
							 Cancel. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - Specify values and conversions 
					 
 
 
					 -  
						
 
						  - Click 
							 Values. The Values and Conversions dialog box appears. Here you can specify that only certain values, ranges of values, or conversion values can be entered. 
						  
 
 
						  - To assign a range of acceptable input values, type 
							 0 to 50 on the first value entry line. 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						  - Click 
							 OK. This returns you to your painted screen. 
						  
 
 
						
 
					  
 
				   
				
 
			  
 
		   
		   
			 - Base Price 
			 
 
 
			 - In this procedure, you assign field edits to the 
				Base Price field on the Parts Update screen. 
				
 
				  - Click on the 
					 Base Price entry field to select it. 
				  
 
 
				  - Click 
					 Edit > 
					 Field Edits. The Field Edit Data Type dialog box appears. 
				  
 
 
				
 
				 
				   
					 - Set local data 
					 
 
 
					 -  
						
 
						  - On the Local Data Class list, click 
							 Numeric. 
						  
 
 
						  - On the Local Data Type list, click 
							 COBOL Display. 
						  
 
 
						  - Click 
							 OK. The Field Edits dialog box appears. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define internal edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Internal. The Internal Representation dialog box appears. Here, you can define storage requirements for the field. 
						  
 
 
						  - You originally painted this field as 7 bytes. To account for the decimal point in this field, in the 
							 Total field, type 
							 6. 
						  
 
 
						  - In the 
							 Right of Decimal field, type 
							 2. This specifies that this field has 2 decimal places. 
						  
 
 
						  - Click 
							 OK. An internal Pic message appears. 
						  
 
 
						  - Click 
							 OK to clear the message. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define input edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Input. The Input Representation dialog box appears. 
						  
 
 
						  - In the 
							 Max column of the 
							 Left Input Digits field, type 
							 4. 
						  
 
 
						  - In the 
							 Max column of the 
							 Decimal Digits field, type 
							 2. 
						  
 
 
						  - Check 
							 Zero When Blank. 
						  
 
 
						  - Check 
							 Ensure Computational. 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define output edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Output. The Output Representation dialog box appears. 
						  
 
 
						  - In the 
							 Output Mask field, change 
							 ZZZZZZ9 to 
							 zzz9.99. 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						  - Click 
							 OK. This returns you to your painted screen. 
						  
 
 
						
 
					  
 
				   
				
 
			  
 
		   
		   
			 - Inventory Value 
			 
 
 
			 - In this procedure, you assign field edits to the 
				Inventory Value field on the Parts Update screen. 
				
 
				  - Click on the 
					 Inventory Value entry field to select it. 
				  
 
 
				  - Click 
					 Edit > 
					 Field Edits. The Field Edit Data Type dialog box appears. 
				  
 
 
				
 
				 
				   
					 - Set local data 
					 
 
 
					 -  
						
 
						  - On the Local Data Class list, click 
							 Numeric. 
						  
 
 
						  - On the Local Data Type list, click 
							 COBOL Display. 
						  
 
 
						  - Click 
							 OK. The Field Edits dialog box appears. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define internal edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Internal. The Internal Representation dialog box appears. Here, you can define storage requirements for the field. 
						  
 
 
						  - You originally painted this field as 12 bytes. To account for the decimal point in this field, in the 
							 Total field, type 
							 11. 
						  
 
 
						  - In the 
							 Right of Decimal field, type 
							 2. This specifies that this field has 2 decimal places. 
						  
 
 
						  - Click 
							 OK. An internal Pic message appears. 
						  
 
 
						  - Click 
							 OK to clear the message. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define input edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Input. The Input Representation dialog box appears. 
						  
 
 
						  - Check 
							 Ensure Computational. 
						  
 
 
						  - Check 
							 Zero When Blank. 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						
 
					  
 
				   
				   
					 - Define output edits 
					 
 
 
					 -  
						
 
						  - Click 
							 Output. The Output Representation dialog box appears. 
						  
 
 
						  - In the 
							 Output Mask field, change 
							 ZZZZZZZZZZZ9 to 
							 $$$$$$$$9.99 (8 $s). 
						  
 
 
						  - Click 
							 OK. This returns you to the Field Edits window. 
						  
 
 
						  - Click 
							 OK. This returns you to your painted screen. 
						  
 
 
						
 
					  
 
				   
				
 
				Now is a good time to save your work. Click 
				  File > Save. 
				
 
			  
 
		   
		
 
	  
 
	 Bypass Assigned Field Edits
 
		 
		You might wonder why you would want to bypass field edits. If, for example, a user accesses the BLDRCU screen by mistake, escaping the screen is impossible until he enters valid data into the 
		  Function field, because you assigned the 
		  Required field edit to the 
		  Function field. 
		
 
		For the BLDRCU screen, you set up the PF3 key to bypass all input edits on the screen. Then, in the Online Express tutorial, you assign it a termination function that enables an end user to escape from the screen without affecting the database. When you bypass edits, you bypass all the field edits and all the screen edit routines. 
		
 
		 
		  - Double-click on any empty portion of the painted screen. The Screen Parameters dialog box appears. 
		  
 
 
		  - On the tool bar, click 
			 EDITS. The Field Edit Messages and Attributes dialog box appears. 
		  
 
 
		  - On the tool bar, click 
			 Bypass. The Field Edit Bypass Criteria dialog box appears. 
		  
 
 
		  - Check 
			 PF03. 
		  
 
 
		  - Click 
			 OK. This returns you to the Field Edit Messages and Attributes window. 
		  
 
 
		  - Click 
			 OK. This returns you to the Screen Parameters window. 
		  
 
 
		  - Click 
			 OK. This returns you to the Screen Painter. 
		  
 
 
		
 
	  
 
	 Exit the Screen Painter
 
		 
		You have now completed your work in the Screen Painter and can exit back to the AppMaster Builder perspective. 
		
 
		 
		  - In the Screen Painter, click 
			 File > Exit. 
		  
 
 
		  - Click 
			 Yes on the prompt to save all of your work. 
		  
 
 
		
 
	  
 
	 This completes the tutorial. Next, please complete 
		Tutorial: Code a User Rule.