Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1026485
  • 博文数量: 125
  • 博客积分: 10490
  • 博客等级: 上将
  • 技术积分: 2386
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-03 18:26
文章分类

全部博文(125)

文章存档

2011年(1)

2010年(9)

2009年(17)

2008年(98)

分类:

2008-06-06 09:17:20

H*
H* \
H* MODULE: ERRCODE \
H* \
H* LANGUAGE: RPG \
H* \
H* FUNCTION: THIS APPLICATION DEMONSTRATES THE USE OF THE \
H* ERROR CODE PARAMETER. \
H* \
H* APIs USED: QHFRTVAT, QHFCRTDR \
H* \
ISUCCES DS
I   B 1  4 0 RETCOD
IPLENG DS
I   B 1  4 0 PATHLN
IBINS DS
I   B 1  4 0 RETDTA
I   B 5  8 0 ATTRLN
IERROR DS
I   B 1  4 0 BYTPRV
I   B 5  8 0 BYTAVA
I     9 15 ERRID
I     16 16 ERR###
I     17 272 INSDTA

C *ENTRY PLIST
C PARM PATHNM 8ð
C PARM PLENG
C PARM SUCCES
C*
C* INITIALIZE BYTES PROVIDED AND THE ATTRIBUTE LENGTH VARIABLE
C*
C Z-ADD 272  BYTPRV
C Z-ADD 0    ATTRLN
C*
C* RETRIEVE DIRECTORY ENTRY ATTRIBUTES
C*
C CALL 'QHFRTVAT'
C PARM PATHNM
C PARM PATHLN
C PARM ATTR 1
C PARM ATTRLN
C PARM ATTR
C PARM ATTRLN
C PARM RETDTA
C PARM ERROR
C*
C* CHECK FOR DIRECTORY NOT FOUND OR FILE NOT FOUND ERRORS.
C* IF WE RECEIVE ONE OF THESE THIS IS THE INDICATION THAT
C* WE CAN TRY TO CREATE THE DIRECTORY.
C*
C BYTAVA IFEQ *ZERO
C       Z-ADD 0 RETCOD
C        ELSE
C 'CPF1F02' IFEQ ERRID
C 'CPF1F22' OREQ ERRID
C*
C* THERE IS NO NEED TO REINITIALIZE THE ERROR CODE PARAMETER.
C* ONLY BYTES PROVIDED IS INPUT TO THE API; IT WILL RESET THE
C* ERROR CODE PARAMETER FOR US. AFTER THE CALL TO QHFCRTDR,
C* BYTES AVAILABLE WILL EITHER BE ð IF SUCCESSFUL OR NONZERO
C* IF THE CREATE FAILS. WE DO NOT HAVE TO WORRY ABOUT THE
C* PREVIOUS ERROR CODE BEING LEFT IN THE ERROR CODE PARAMETER.
C*
C CALL 'QHFCRTDR'
C PARM PATHNM
C PARM 20 PATHLN
C PARM ATTR 1
C PARM 0 ATTRLN
C PARM ERROR
C BYTAVA IFEQ *ZERO
C Z-ADD 0 RETCOD
C ELSE
C Z-ADD1 RETCOD
C END
C*
C ELSE
C Z-ADD1 RETCOD
C END
C END
C*
C* PROGRAM END
C*
C SETON LR
阅读(1320) | 评论(0) | 转发(0) |
0

上一篇:job_list

下一篇:USER_JOB_INFO

给主人留下些什么吧!~~