Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1268054
  • 博文数量: 287
  • 博客积分: 11000
  • 博客等级: 上将
  • 技术积分: 3833
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-16 08:43
文章分类
文章存档

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2009-10-02 13:19:12

RPGIV编程技巧(5)用RPGIV完成每30分钟提交一个作业,codes
 
D sleep           PR            10I 0 ExtProc('sleep')
D                               10U 0 Value
D spawn           PR                  extproc('spawn')  
D   path                          *   value options(*string)          
D   fd_count                    10I 0 value                           
D   fd_map                      10I 0 dim(256) options(*varsize:*omit)
D   inherit                           likeds(inheritance_t)           
D   arguments                     *   dim(SPAWN_MAX_NUM_ARGS)         
D                                     options(*varsize)               
D   envvar                        *   dim(256) options(*varsize)      
/Free
  Dow %Shtdn = *Off;
     // wait 30 minutes
     Sleep(1800); 
     // spawn a new job to run the program that must be called every
     // 30 minutes.  Processing does not wait for the program in the
     // threaded job to end.
     Path = '/QSYS.LIB/MYLIB.LIB/MYPGM.PGM';             
     ThreadedJobID = spawn(path: 0: *OMIT: inherit: arguments: envvar);
  EndDo;
/End-Free
阅读(1547) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-11-10 09:19:13

SLEEP 用 DLYJOB 就可以了。。。。。

chinaunix网友2009-10-11 14:53:15

SLEEP的SRC能不能拿出来看看呀