免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6432 | 回复: 13
打印 上一主题 下一主题

如何修改在CLP中Query产生的报表名称? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-11 15:52 |只看该作者 |倒序浏览
如果在CLP中直接RUNQRY,产生出来的报表名称都是QPQUPRFIL,如果我需要修改它,应该怎么做??

我测试过OVRPRTF,都是不成功,可能是我什么参数不对,还是方法错误??

论坛徽章:
0
2 [报告]
发表于 2008-07-11 20:58 |只看该作者
RUNQRY QRY(LIB/QRY) OUTTYPE(*PRINTER)默认是调用QSYS/QPQUPRFIL的打印文件来产生报表,所以报表名称都为QPQUPRFIL。要修改系统的东西,你可尝试自定义CL命令,然后将文件PRTF指定到自己的文件下。



  1.                           Change Printer File (CHGPRTF)                        
  2.                                                                                 
  3. Type choices, press Enter.                                                     
  4.                                                                                 
  5. File . . . . . . . . . . . . . . > QPQUPRFIL     Name, generic*, *ALL         
  6.    Library  . . . . . . . . . . . >   QSYS        Name, *LIBL, *ALL, *ALLUSR...
  7. Device:                                                                        
  8.    Printer  . . . . . . . . . . .   *JOB          Name, *SAME, *JOB, *SYSVAL   
  9. Printer device type  . . . . . .   *SCS          *SAME, *SCS, *IPDS, *LINE...  
  10. Page size:                                                                     
  11.    Length--lines per page . . . .   66            .001-255.000, *SAME           
  12.    Width--positions per line  . .   220           .001-378.000, *SAME           
  13.    Measurement method . . . . . .   *ROWCOL       *SAME, *ROWCOL, *UOM         
  14. Lines per inch . . . . . . . . .   6             *SAME, 6, 3, 4, 7.5, 7,5...   
  15. Characters per inch  . . . . . .   10            *SAME, 10, 5, 12, 13.3, 13...
  16. Overflow line number . . . . . .   60            1-255, *SAME                  
  17. Record format level check  . . .   *NO           *SAME, *YES, *NO              
  18. Text 'description' . . . . . . . > '                                          
  19.        '                                                                        
  20.                                                                                 
  21.                                                                         More...
  22. F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
  23. F24=More keys                                                                  
  24.                                                                                 
复制代码

论坛徽章:
0
3 [报告]
发表于 2008-07-12 11:25 |只看该作者
ovrprtf 可以做到, 看看参数 -  Secure from other overrides

论坛徽章:
0
4 [报告]
发表于 2008-07-17 08:54 |只看该作者
原帖由 txf.chan 于 2008-7-12 11:25 发表
ovrprtf 可以做到, 看看参数 -  Secure from other overrides


我测试了一下,但是没有成功。能不能给个例子看看??

论坛徽章:
0
5 [报告]
发表于 2008-07-23 13:42 |只看该作者
原帖由 HAPPY潜龙 于 2008-7-17 08:54 发表


我测试了一下,但是没有成功。能不能给个例子看看??


期待哪位能够指点一下迷津呀。。。。

论坛徽章:
0
6 [报告]
发表于 2008-07-23 20:52 |只看该作者
你怎么测试的?

论坛徽章:
0
7 [报告]
发表于 2008-07-24 09:11 |只看该作者
原帖由 hsiang_wang 于 2008-7-23 20:52 发表
你怎么测试的?



PGM                                                                     
    /*----------------------------------------------------------*/        
          OVRPRTF    FILE(BOM001R) TOFILE(QPQUPRFIL) PAGESIZE(*N +        
                       200) CPI(5) IGCDTA(*YES) SECURE(*YES) +            
                       OVRSCOPE(*JOB)                                    
          RUNQRY     QRY(BOM001QB) RCDSLT(*YES)                           
    /*----------------------------------------------------------*/        
   END:        ENDPGM                                                     

执行程序出现错误:

                         Additional Message Information                        
                                                                                
Message ID . . . . . . :   CPA0701                                             
Date sent  . . . . . . :   07/24/08      Time sent  . . . . . . :   09:10:08   
                                                                                
Message . . . . :   QRY1622 received by INV040CB at 600. (C D I R)            
                                                                                
Cause . . . . . :   Control language (CL) program INV040CB in library PCEDP03  
   detected an error at statement number 600. Message text for QRY1622 is:      
   Error opening printer file QPQUPRFIL in *LIBL.                              
Recovery  . . . :   This inquiry message can be avoided by changing the        
   program. Monitor for the error (MONMSG command) and perform error recovery   
   within the program. To continue, choose a reply value.                       
Possible choices for replying to message . . . . . . . . . . . . . . . :      
   C -- Cancel the CL program.                                                  
   D -- Dump the CL program variables and cancel the CL program.               
   I -- Ignore the failing command.                                             
   R -- Try the failing command again.                                          
                                                                         Bottom
Press Enter to continue.

论坛徽章:
0
8 [报告]
发表于 2008-07-24 10:06 |只看该作者
FILE和TOFILE反了

论坛徽章:
0
9 [报告]
发表于 2008-07-24 10:25 |只看该作者
原帖由 roden 于 2008-7-24 10:06 发表
FILE和TOFILE反了


已经修改

PGM                                                              
   /*----------------------------------------------------------*/
         OVRPRTF    FILE(QPQUPRFIL) TOFILE(BOM001R) PAGESIZE(*N +
                      200) CPI(5) IGCDTA(*YES) SECURE(*YES) +   
                      OVRSCOPE(*JOB)                             
         RUNQRY     QRY(BOM001QB) RCDSLT(*YES)                  
   /*----------------------------------------------------------*/
  END:        ENDPGM                                             

但是执行还是提醒MSG:

                         Additional Message Information                        
                                                                                
Message ID . . . . . . :   CPA0701                                             
Date sent  . . . . . . :   07/24/08      Time sent  . . . . . . :   10:24:16   
                                                                                
Message . . . . :   QRY1622 received by INV040CB at 600. (C D I R)            
                                                                                
Cause . . . . . :   Control language (CL) program INV040CB in library PCEDP03  
   detected an error at statement number 600. Message text for QRY1622 is:      
   Error opening printer file QPQUPRFIL in *LIBL.                              
Recovery  . . . :   This inquiry message can be avoided by changing the        
   program. Monitor for the error (MONMSG command) and perform error recovery   
   within the program. To continue, choose a reply value.                       
Possible choices for replying to message . . . . . . . . . . . . . . . :      
   C -- Cancel the CL program.                                                  
   D -- Dump the CL program variables and cancel the CL program.               
   I -- Ignore the failing command.                                             
   R -- Try the failing command again.                                          
                                                                         Bottom
Press Enter to continue.

论坛徽章:
0
10 [报告]
发表于 2008-07-24 17:28 |只看该作者
明天实际测试一下去.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP