1. iliyan iliev
  2. SnapDevelop
  3. Thursday, 21 May 2020 13:06 PM UTC

private function long load_adres_dok (string asidf_dok, ref str_adrms adres);str_adrms ladr, empty_adr

adres = empty_adr

select first 1 trim(cod_ime_osi('eknm_d',eknm))||' ОБЩ.'||trim(cod_ime_obs(eknm))||' ОБЛ.'||trim(cod_ime_obl(eknm))||' '||cod_ime_ul(kod_ul)||' '||nvl(nomer,'')||' '||nvl(vhod,''),
fa.sid_f, fa.fact , (select eknm_5 from eknm_d where cod_z=adres.eknm and valid='0'), (select obstina from eknm_d where cod_z=adres.eknm and valid='0') obs,
(select oblast from eknm_d where cod_z=adres.eknm and valid='0') obl, cod_bulul(adres.kod_ul) bul_ul,
trim(cod_ime_osi('eknm_d',eknm)), trim(cod_ime_obs(eknm)), trim(cod_ime_obl(eknm)), cod_ime_ul(kod_ul),
nomer, vhod, fd.etaj, fd.apart, get_podel_eknm(eknm), trim(cod_ime_osi('podl_d',get_podel_eknm(eknm))), fa.sid_f
into :ladr.text, :ladr.faddop.sid_f, :ladr.faddop.vid_adr, :ladr.adr.eknm, :ladr.adr.obs, :ladr.adr.obl, :ladr.adr.kod_ul,:ladr.adr.eknm_text, :ladr.adr.obs_text, :ladr.adr.obl_text, :ladr.adr.ul_text,
:ladr.adr.nomer, :ladr.adr.vhod, :ladr.faddop.etaj, :ladr.faddop.apart, :ladr.faddop.cel_preb, :ladr.faddop.cel_text, :ladr.faddop.sid_f
from fbdk fa, adres, outer (fact_pr pr, outer fad_dop fd)
where fa.sid_f = :asidf_dok and fa.cod_t=17 and fa.rol_o=29 and
adres.sid_o=fa.sid_o and adres.pnr_o=fa.pnr_o and
pr.sid_f=fa.sid_f and pr.cod_t=64 and fd.sid_f = pr.sid_o and fd.mrk_akt='Y'
using shsqlca;
if shsqlca.sqlcode < 0 then
is_errmess='Error in n_ezvl::load_act_data Select from adres ['+string(shsqlca.sqldbcode)+']-'+shsqlca.sqlerrtext
_onerror(shsqlca.sqldbcode);
return -1
end if
if shsqlca.sqlcode = 100 then return 100

adres = ladr


return 0
end function

when i try this function translate to c# give me error - 'capacity' must greater than zero. Parameter name : capacity !

armando herrera @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 26 May 2020 19:02 PM UTC
  2. SnapDevelop
  3. # 1

This issue has rise ticket:

 Bug 4696 Cannot translate embedded SQL statement

On Appeon Support System as an Enhancement Requests. 

Regards! 

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 26 June 2020 16:01 PM UTC
  1. Helpful
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Sunday, 24 May 2020 13:23 PM UTC
  2. SnapDevelop
  3. # 2
Hi Iliyan,

I think this Informix embedded SQL statement hasn't been supported in PowerScript Migrator. 

Kindly please report this enhancement requirement via our support ticketing system to ensure it is being properly received by our tech support and tracked at https://www.appeon.com/standardsupport/.

Regards,

Logan

 

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 22 May 2020 13:53 PM UTC
  2. SnapDevelop
  3. # 3

Informix database is not supported.  Currently, supported databases are: SQL Server, Oracle, SQL Anywhere, PostgreSQL, MySQL, SQLite.

Comment
  1. iliyan iliev
  2. Friday, 22 May 2020 19:50 PM UTC
This is standart sql script nothing specific for informix. When translate business logic PB migrator use database ?!
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 22 May 2020 19:54 PM UTC
The code generated by PowerScript Migrator uses the SnapObjects open-source framework. Informix is not supported right now.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 21 May 2020 20:54 PM UTC
  2. SnapDevelop
  3. # 4

I assume PB Migrator has issue either in the embedded SELECT (more probable) or outside that SELECT (less probable). You may have hid some barriere for the PB Migrator but you should investigate further.

How does PB Migrator respond to below attempts?

ATTEMPT #1 You comment-away your SELECT statement - and replace it with this:

long i
SELECT data.value
INTO :i 
FROM (SELECT 1 value) data
USING shsqlca;​

Does code migration succeed? 

ATTEMPT #2 You keep your SELECT - however all your INTO host variables are individual local string variables - code like this:

...
string s1, s2, ...
SELECT FIRST 1 trim ...
INTO :s1, :s2, ...
FROM ... WHERE ... USING shsqlca;
ladr.Text = s1
ladr.faddop.sid_f = s2
...
​

 

HTH /Michael

Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Thursday, 21 May 2020 19:36 PM UTC
  2. SnapDevelop
  3. # 5

Hi Iliyan,

 

What Database are you using? This seems to be related to your DBMS. Is there a column named "Capacity" in any of your tables?

 

 

Regards,

Comment
  1. iliyan iliev
  2. Friday, 22 May 2020 05:43 AM UTC
Database is informix , but i dont have column with name capacity in tables of select
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 22 May 2020 10:51 AM UTC
Maybe I'm wrong, but I don't think Informix is supported !
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.