Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Hi,
I am trying to execute below command through SQLRPGLE I get below error
Data mapping error on member SRC1.
C EVAL W0STAMT = 'CREATE ALIAS QTEMP/TEMPFILE1 FOR ' C + %TRIM(MLLIBN) + '/' + %TRIM(MLSFIL) C + ' (' + %TRIM(MLNAME) + ')'
In Debug mode once the above command is executed, I go to STRSQL and do a Runqry in TEMPFILE1 I see above error message.
What I notice is for other source SRCDAT has some value while for the source in error the value of SRCDAT = ++++++ as seen above.
Can some one help to know why I am getting Data Mapping Error for this source(SRC1)? For other sources it is working file.
You have crap in your Source Change Date. The SEQNBR and CHGDATE fields (SRCDTA and SRCDAT) are Zoned(6,0) and depending on how they were created, might contains blanks instead of zeros or other numeric data. I would open/save/close the file in SEU once to fix the program by resequencing that source member.
Thanks Bob, But the sources are locked as those are production sources which we cannot change. Is there any way we can change the source temporary? We are reading this source in batch so cannot do it manually.
You might be able to do a CASE/WHEN statement and insert zeros if the field contains X'40'.
How is it being read? RPG, CL, Embedded SQL?
Embedded SQL
If you change the value to zeros through SQL, it changes the source change date as I am using Alias in Qtemp. We dont have access to production source so the date will not change.