% =SYS(3101,1256) olddate=SET("Date") oldmark=SET("Mark") crlf=CHR(13)+CHR(10) SET PROCEDURE TO [d:\shahprjs\recruiting\oep\json_new] ADDITIVE *oJSON=NEWOBJECT('json','json.prg') SET DATe YMD SET MARK TO [-] SET CENTURY ON therecord=VAL(TRANSFORM(NVL(orequest.querystring('record'),0))) tsql=[SELECT * FROM (']+dbclocation+[details') WHERE recno()=]+allt(transform(therecord))+[ INTO CURSOR xdetails] &tsql thereffid=allt(xdetails.reffid) tsql=[SELECT * FROM (']+dbclocation+[fileref') WHERE allt(reffid)==']+thereffid+[' INTO CURSOR xfileref] &tsql LEMBASSY=ICASE(embassy='ISL','210',embassy='210','210','231') LVISANUMBER=Alltrim(visaid) LSPONSORID=Alltrim(sponid) LSPONname=json_encode(Alltrim(chrtran(sponname,'-',' '))) select [xdetails] *RETURN xdetails.nationalit *RETURN [File: ]+TRANSFORM(therecord) IF NOT EMPTY(photoname) AND FILE(ADDBS(oprop.appstartpath)+'photos\'+ALLTRIM(photoname)+[.jpeg]) imagefilepath='photos/'+ALLTRIM(photoname)+[.jpeg] else imagefilepath='' endif SELECT code as c_code, name FROM (ADDBS(oprop.appstartpath)+[countries]) ORDER BY name INTO CURSOR xcursor *place of issue of passport passportissue=[] *nationality nationality=[] STRTOFILE(nationality,'d:\temp\tmp.txt') pnationality=[] SELECT distinct city FROM (addbs(oprop.appstartpath)+'pakcities') ORDER BY city INTO CURSOR cities thecities=[] THEDOMICILE=[] SELECT number, english,val(number) as vnum FROM (addbs(oprop.appstartpath)+'visatypes') ORDER BY vnum INTO CURSOR vtypes thevtypes=[] select [xdetails] %>