Hi,
I want to write an equivalent SQLRPGLE Program to generate a physical file and logic wise it should have same records generated in file3 after using file1 and file2 like below SQL query.
select * from file1 where fld1='ABCDEF' and fld2= (int(current date) - 19000000) and fld3 in (select fld7 from file2 where fld8='1') and fld4 in ('TYM','IOP')
where fld1,fld2,fld3,fld 4 are from file1 and fld7, fld8 are from file2.
Please Note:- fld2 is that specific numeric field having a numeric type and a length of 7 and which has a date field in it in CYY/MM/DD format ( as in the DDS of the file Edit word with slashes have been defined in it's definition part length 7 with packed data type ) in which we want to have all
the records for current system date.
so I tried to write this SQLRPGLE program ( in which some fields and files name are different but main logic to cover above SQL query criteria is same.) (attached snapshot of program and error when tried to call it)
So Any idea how to resolve this error ("The target for a numeric operation is too small to hold the result (C G D F ) when I am trying to call this SQLRPGLE program?
I tried to debug it as well and when trying to debug after F10 it's coming at statement number 7 'If sqlcod =0 ;
and when in debug mode i am checking it's value is 077952576. and then if i do f10 again then get this error 'receiver value too small to hold result.'
so please advise what corrective action should i take to resolve this error and get desired output from this program.
Thanks..
I want to write an equivalent SQLRPGLE Program to generate a physical file and logic wise it should have same records generated in file3 after using file1 and file2 like below SQL query.
select * from file1 where fld1='ABCDEF' and fld2= (int(current date) - 19000000) and fld3 in (select fld7 from file2 where fld8='1') and fld4 in ('TYM','IOP')
where fld1,fld2,fld3,fld 4 are from file1 and fld7, fld8 are from file2.
Please Note:- fld2 is that specific numeric field having a numeric type and a length of 7 and which has a date field in it in CYY/MM/DD format ( as in the DDS of the file Edit word with slashes have been defined in it's definition part length 7 with packed data type ) in which we want to have all
the records for current system date.
so I tried to write this SQLRPGLE program ( in which some fields and files name are different but main logic to cover above SQL query criteria is same.) (attached snapshot of program and error when tried to call it)
So Any idea how to resolve this error ("The target for a numeric operation is too small to hold the result (C G D F ) when I am trying to call this SQLRPGLE program?
I tried to debug it as well and when trying to debug after F10 it's coming at statement number 7 'If sqlcod =0 ;
and when in debug mode i am checking it's value is 077952576. and then if i do f10 again then get this error 'receiver value too small to hold result.'
so please advise what corrective action should i take to resolve this error and get desired output from this program.
Thanks..
Comment