Free software training Videos

Free software training Videos
https://www.youtube.com/user/VLRTraining

List Of Best WebSites

Sunday 30 December 2012

unique keyword physical file as400

Use this file-level keyword to specify that records with duplicate key values are not allowed within a member of this physical or logical file.
ref:
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.langref2.doc/rzakbmsttduniqu.htm


example:
create one physical file
----------------------------
 Columns . . . :    1  71            Edit                      CHVRAMESH2/MYDDS
 SEU==>                                                                STUDENT1
 FMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++
        *************** Beginning of data *************************************
0001.00      A                                      UNIQUE                     
0002.00      A          R STUDENTR                                             
0003.00                   NAME          22A                                    
0004.00                   BRANCH        10A                                    
0005.00                   CARDNO        10A                                    
0006.00                   PHONE         10S 0                                  
0007.00                 K PHONE                                                
        ****************** End of data ****************************************

in this
phone is our key field.
so we are try to insert duplicate value for phone what happned?
---------------------
 WORK WITH DATA IN A FILE                       Mode . . . . :   ENTRY       
 Format . . . . :   STUDENTR                    File . . . . :   STUDENT1    
                                                                             
 PHONE:  9999999999                                                          
 NAME:   ramesh                                                              
 BRANCH: it                                                                  
 CARDNO: 54321                                                               
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
 F3=Exit                 F5=Refresh               F6=Select format           
 F9=Insert               F10=Entry                F11=Change                 
 File STUDENT1 cannot have a duplicate key.                                  

No comments:

Post a Comment