⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 carry_y.ec

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 EC
📖 第 1 页 / 共 2 页
字号:
/*   work_init   */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;void addspace();void mess();char y_n();#include </u/ebcsav/include/begin>struct operator opt;short i,j,l=2,flag=0,flag1=0,p=0;long d;char c;char s[7],st[21];$ short opt_num,cred_type,sum,t;$ long cred_num;$ char ope_num[2];$ double amound,amounc,t_bala,t_bala1,t_bal,t_bal1;$ long uro,urc,t_ur,voud,vouc,urh,uruh,t_urh,urf,uruf,t_urf;$ char sav[2],te[2],cu_type[2],cu_type1[2];short n=-1;FILE *pf,*pf1;sum=0;t=-1;sav[1]='\0';cu_type[1]='\0';cu_type1[1]='\0';te[1]='\0';move(15,20);standout();printw("  是否要做年末结转和利息处理(Y/N):");standend();c=y_n('Y','Y','N');if(c=='N') return;$ database saving;$ begin work;$ declare blot scroll cursor for select sav_type,term,debi_amoun,cred_amoun,  today_bala,open_user,canc_user,today_user,debi_vouch,cred_vouch,hang_up,  lift_hang,today_hang,freeze,unfreeze,today_free into $sav,$te,$amound,  $amounc,$t_bala,$uro,$urc,$t_ur,$voud,$vouc,$urh,$uruh,$t_urh,$urf,$uruf,  $t_urf from r_annual;$ open blot;if(sqlca.sqlcode!=0)      {        printf("** 错误 %d :open r_blot error **",          sqlca.sqlcode);        getch();        p=1;      }while(sqlca.sqlcode==0){ $ fetch blot; if(sqlca.sqlcode!=0) break; if(t_bala<0.01&&amound<0.01&&amounc<0.01&&t_urh==0&&t_urf==0)continue; if(sav[0]==2||sav[0]==5||sav[0]==7) $ update r_annual set debi_amoun=0,cred_amoun=0,yest_bala=$t_bala,today_bala=0,        open_user=0,canc_user=0,yest_user=$t_ur,today_user=0,debi_vouch=0,        cred_vouch=0,hang_up=0,lift_hang=0,yest_hang=$t_urh,today_hang=0,        freeze=0,unfreeze=0,yest_free=$t_urf,today_free=0 where sav_type=$sav; else $ update r_annual set debi_amoun=0,cred_amoun=0,yest_bala=$t_bala,today_bala=0,        open_user=0,canc_user=0,yest_user=$t_ur,today_user=0,debi_vouch=0,        cred_vouch=0,hang_up=0,lift_hang=0,yest_hang=$t_urh,today_hang=0,        freeze=0,unfreeze=0,yest_free=$t_urf,today_free=0        where sav_type=$sav and term=$te; if(sqlca.sqlerrd[2]!=1)      {        printf("** 错误 %d :update r_annual error **",          sqlca.sqlerrd[2]);        getch();        p=1;      }}$ close blot;$ declare blot1 scroll cursor for select sav_type,cur_type,term,debi_amoun,  cred_amoun,  today_bala,open_user,canc_user,today_user,debi_vouch,cred_vouch,hang_up,  lift_hang,today_hang,freeze,unfreeze,today_free into $sav,$cu_type,$te,  $amound,  $amounc,$t_bala,$uro,$urc,$t_ur,$voud,$vouc,$urh,$uruh,$t_urh,$urf,$uruf,  $t_urf from f_annual;$ open blot1;if(sqlca.sqlcode!=0)      {        printf("** 错误 %d :open f_annual error **",          sqlca.sqlcode);        getch();        p=1;      }while(sqlca.sqlcode==0){ $ fetch blot1; if(sqlca.sqlcode!=0) break; if(t_bala<0.01&&amound<0.01&&amounc<0.01&&t_urh==0&&t_urf==0)continue; if(sav[0]==12) $ update f_annual set debi_amoun=0,cred_amoun=0,yest_bala=$t_bala,today_bala=0,        open_user=0,canc_user=0,yest_user=$t_ur,today_user=0,debi_vouch=0,        cred_vouch=0,hang_up=0,lift_hang=0,yest_hang=$t_urh,today_hang=0,        freeze=0,unfreeze=0,yest_free=$t_urf,today_free=0 where sav_type=$sav        and cur_type=$cu_type; else $ update f_annual set debi_amoun=0,cred_amoun=0,yest_bala=$t_bala,today_bala=0,        open_user=0,canc_user=0,yest_user=$t_ur,today_user=0,debi_vouch=0,        cred_vouch=0,hang_up=0,lift_hang=0,yest_hang=$t_urh,today_hang=0,        freeze=0,unfreeze=0,yest_free=$t_urf,today_free=0        where sav_type=$sav and term=$te and cur_type=$cu_type; if(sqlca.sqlerrd[2]!=1)      {        printf("** 错误 %d :update f_annual error **",          sqlca.sqlerrd[2]);        getch();        p=1;      }}$ close blot1;sav[0]=101;te[0]=100;$ select yest_bala into $t_bala from r_dai where sav_type=$sav and term=$te;if(t_bala!=0){ sav[0]=109; te[0]=100; $ select yest_bala into $t_bala1 from r_dai where sav_type=$sav and term=$te; t_bala1+=t_bala; $ update r_dai set yest_bala=$t_bala1 where sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update r_dai set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update r_dai set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update r_dai set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update r_dai set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update r_dai set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=109; te[0]=100; $ update r_month set yest_bala=$t_bala1 where sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update r_month set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update r_month set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update r_month set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update r_month set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update r_month set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=109; te[0]=100; $ update r_quarter set yest_bala=$t_bala1 where sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update r_quarter set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update r_quarter set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update r_quarter set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update r_quarter set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update r_quarter set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=109; te[0]=100; $ update r_annual set yest_bala=$t_bala1 where sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update r_annual set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update r_annual set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update r_annual set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update r_annual set yest_bala=0.0 where sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update r_annual set yest_bala=0.0 where sav_type=$sav and term=$te;}sav[0]=101;te[0]=100;$ select yest_bala into $t_bala from f_dai where cur_type="U" and sav_type=$sav and term=$te;sav[0]=102;te[0]=100;$ select yest_bala into $t_bal from f_dai where cur_type="U" and sav_type=$sav and term=$te;if(t_bala!=0){ sav[0]=109; te[0]=100; $ select yest_bala into $t_bala1 from f_dai where cur_type="U" and sav_type=$sav and term=$te; t_bala1=t_bala1+t_bala+t_bal; $ update f_dai set yest_bala=$t_bala1 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=102; te[0]=100; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=103; te[0]=100; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update f_dai set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=109; te[0]=100; $ update f_month set yest_bala=$t_bala1 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=102; te[0]=100; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=103; te[0]=100; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=1; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=2; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=3; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=4; $ update f_month set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=109; te[0]=100; $ update f_quarter set yest_bala=$t_bala1 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=102; te[0]=100; $ update f_quarter set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=103; te[0]=100; $ update f_quarter set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=100; $ update f_quarter set yest_bala=0.0 where cur_type="U" and sav_type=$sav and term=$te; sav[0]=101; te[0]=1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -