本页目录:
- 1、需求
- 2、编写程序
- 3、测试
需求
- 制作aimq102程序能查到的料件对应的在制量清单
编写程序
- p_zz查看aimq102程序相关的程序
- 下拉程序
# win系统cmd进入本地文件架
sftp tiptop@10.1.2.205
get /u1/topprod/topcust/cim/4gl/aimq102.4gl
get /u1/topprod/topcust/cim/4gl/saimq102.4gl
get /u1/topprod/topcust/cim/4fd/aimq102.4fd
get /u1/topprod/tiptop/aim/4gl/s_aimq102_q1.4gl
get /u1/topprod/tiptop/aim/4gl/saimq134.4gl
get /u1/topprod/tiptop/aim/4gl/saimq140.4gl
get /u1/topprod/tiptop/aim/4gl/saimq841.4gl
get /u1/topprod/tiptop/axm/4gl/saxmi405_imx_slk.4gl
# 获取对应的查询使用的sql
- 在 p_query 新建程序,写sql
SELECT ima01,t
FROM (
SELECT ima.ima01,
NVL(SUM((sfb.sfb08-sfb.sfb09-sfb.sfb10-sfb.sfb11-sfb.sfb12)*ima55_fac),0)-
NVL((
SELECT SUM(shb.shb114)
FROM shb_file shb
INNER JOIN sfb_file sfb ON sfb.sfb01=shb.shb05 AND sfb.sfb05=shb.shb10
WHERE shb.shb10=ima.ima01
AND sfb.sfb04 < '8' AND sfb.sfb87 != 'X'
AND ( sfb.sfb02 !='7' AND sfb.sfb02 !='8' AND sfb.sfb02 !='11' AND sfb.sfb02 != '15' )
AND sfb.sfb82='NFL00'
),0) AS t
FROM sfb_file sfb
INNER JOIN ima_file ima ON ima.ima01 =sfb.sfb05
WHERE sfb.sfb04 <'8'
AND ( sfb.sfb02 !='7' AND sfb.sfb02 !='8' AND sfb.sfb02 !='11' AND sfb.sfb02 != '15' )
AND sfb.sfb08 > (sfb.sfb09+sfb.sfb10+sfb.sfb11+sfb.sfb12)
AND sfb.sfb87!='X'
AND sfb.sfbacti='Y'
AND sfb.sfb82='NFL00'
GROUP BY ima.ima01,sfb.sfb82
) t
开窗代码的可以到p_qry进行新增
- 开放权限
$FGLRUN $AZZi/p_query "cimr102"
p_zxw给用户权限
测试
执行:cimr102程序查看效果
- 在:p_zm 给程序添加到目录上