ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Data Mapping Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data Mapping Error

    Hi Friends,
    I need some explanation to when/scenario and how "Data Mapping Error" is encountered. If possible can someone help me with few lines of code so as to re-create the error. Does it have anything to do with VARLEN fields of a Physical File or VARCHAR fields of a table..?
    Regards
    SC

  • #2
    Re: Data Mapping Error

    A "Data Mapping" error can occur anytime you try to place an invalid value into a field. For example, putting a char value field into decimal, where the field contains alpha or special chars. In SQL statements, arithmetic or aggregate functions can cause this. Example x = Y * Z If field Z is null, it can cause an error. Or even min(Z) where Z is null can cause this.

    Comment


    • #3
      Re: Data Mapping Error

      Hello fellow earthling,
      The error can occur many ways. If you give an example we can work through it.

      My example is a file that has a numeric field that got loaded from a program that had the file internaly difined.

      PHP Code:
       Base PFITREXT     LibraryMYLIB   MemberDAY6       RRN000001426     
                                                                                     
       Field Name Field Description         Field Value                              
       ILRCID     Record ID 
      (I)             I                                        
       ILEDAT     Date entered 
      (mmddcyy)     616106                                  
       ILTDAT     Transaction date 
      (mmddcyy  616106                                  
       ILITEM     Item                      X75
      -84N                                  
       ILFSHP     From location             
      ----                                     
       
      ILTSHP     To location               587                                      
       ILQTY      Quantity                     01                                    
       ILTYPE     Transaction type          Q                                        
       ILDESC     Transaction description   
      Ã?ìÃ?Ã?"ì"                             
       
      ILUCST     Unit cost                  58.07                                   
       ILMAJC     Major category            08                                  
      +    
        
      F3=Exit   F5=Refresh   F8=Hex Mode   F10=Allow Lowercase   F13=Immed Exit    
       
      INFOInvalid data in field "ILDESC".  Use Hex mode to change
      If a program that uses this file as externaly defined reads this record, the error will occur.
      Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

      Comment

      Working...
      X