Use DOCIMG01R to find the true IFS location for a given WebDocs document. Do not directly use the fields in DOCS00 or DOCVER00 in your own programs.
 
To call DOCIMG01R, use:
ddocImg01R        pr                  extpgm('DOCIMG01R')
d iDocID                       100a   const
d iVersion                       9p 0 
d rtnIFSFile                   255a
d errRtn                         1a

Passing this to iVersion... Returns...
-1 The most recent revision.
-2 or 0 The initial version.
A positive numeric value. The specified version if it exists.
CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq....Comments++++++++++++
C                   eval      theirDocID = ‘the one he is working with’
C                   eval      theirVersion = -1
C                   callp     docimg01r(hisDocID : theirVersion : theirRtnFileVar : theirErrRtn)
 
Note:
  • This example calls DOCIMG01R to get the most recent version. The variable theirVersion is set to the version, so it must be passed a variable, not a literal.
  • If no IFS file is found, then theirRtnFileVar is blank and theirErrRtn is ‘1’. Use the error return value to test whether it was successful.
 
Here is a simple CL example:
       PGM

       DCL        VAR(&DOCID) TYPE(*CHAR) LEN(100)
       DCL        VAR(&VERSION) TYPE(*DEC) LEN(9)
       DCL        VAR(&IFSFILE) TYPE(*CHAR) LEN(255)
       DCL        VAR(&ERROR) TYPE(*CHAR) LEN(1) 

       CHGVAR     VAR(&DOCID) VALUE('AS400DOC-000000000038088')
       CHGVAR     VAR(&VERSION) VALUE(-1)

       CALL       PGM(RJSIMAGE/DOCIMG01R) PARM(&DOCID &VERSION +
                    &IFSFILE &ERROR)

       ENDPGM

 

Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case