Appendix C: Reference of Relevant Commands

Integrating WebDocs with your own applications can streamline document check-in and searching. You can integrate over 100 WebDocs commands into your own applications. Because these are the same commands that RJS Software applications use, you retain all the benefits of WebDocs, such as keeping the same logging. This appendix gives you basic information about some of the most common WebDocs commands you can use in your programs.

There are many ways that you can integrate WebDocs with your applications. Consider how you can use your existing data and applications together with WebDocs.

For example: After a document has been added to WebDocs, you can use the DOCLINKCRT command to add a link to that document so that you can find it using different search criteria. You can derive those values from your corporate business data.

For more information and examples, go to the RJS Software support site - http://support.rjssoftware.com/ - and search for articles that contain words like integrating, API, application, and so on.

If you have questions or want to discuss specific coding situations, contact RJS Software. RJS Software also provides consulting services for both planning and coding sophisticated integration models in iSeries and PC languages, including VB, VBScript, Javascript, ASP, JSP, Java, RPG, COBOL, and more.

Commands are divided into the following categories:

 

Checking In and Out Documents

Command Description Sample Syntax

DOCCHKI

Check in an edited document to WebDocs. Specify:

  • The unique WebDocs document ID number.
  • The file name of the checked-out document to check back in.
  • A comment for the checked-in document.
  • A WebDocs user ID.
  • Whether to delete the IFS work file after check-in.
  • What type of completion message to report:
    • *COMP - Report a completion status message.
    • *ESCAPE - Return to the process calling DOCCKHI.

DOCHKI DOCID(Document ID)  

IFSFILE(IFS File Name)

COMMENT(Comment)

USERID(WebDocs User | *CURRENT)

DLTIFSFILE(*NO | *YES)

COMPMSGTYP(*COMP | *ESCAPE)

DOCCHKIN

Check in a new document to WebDocs.

For example: Call an exit program that updates index keys with information from iSeries databases.

Specify:

  • The file name of the document to check in.
  • The title, Document Type, folder levels, and search keys.
  • The attributes of the spool file to check in.

    Note:
    • For the date, use the format CYYMMDD (century, year, month, day). For century, use 0 for 1900 and 1 for 2000.
    • For the time, use the format HHMMSS (hours, minutes, seconds).
  • Whether to delete the IFS work file after check-in.
  • What type of completion message to report:
    • *COMP - Report a completion status message.
    • *ESCAPE - Return to the process calling DOCCKHIN.
  • A WebDocs user ID.
  • The IFS directory for physical document storage. Use *FOLDERSETTING for the default for the folder.
  • The original file size of the new document. If specified, DOCCHKIN ensures that the IFS file matches the size.
  • The name and library of a pre-check-in exit program.
  • The name and library of a post-check-in exit program.
  • Whether to create an audit-log entry.

Warning: Do not use the SKIPCOPY parameter unless you have discussed it with RJS Software technical support.

DOCCHKIN IFSFILE(IFS File Name)

DOCTITLE(Title)

DOCTYPE(Document Type)

FOLDERLVL1(Folder Level 1) ... FOLDERLVL5(Folder Level 5)

KEYWORD1(Search Key 1) ... KEYWORD10(Search Key 10

SPOOL(Spool-File Name)

SPOOLUSER(User ID)

SPOOLJOB(Job Name)

SPOOLJOBN(Job Number)

SPOOLSPLN(Spool-File Number)

SPOOLUDATA(User Data)

SPOOLFORM(Form Type)

SPOOLUDEF(User-Defined Data)

SPOOLOUTQ(Output Queue)

SPOOLOLIB(Library)

SPOOLPAGES(Pages)

SPOOLDATE(Date)

SPOOLTIME(Time)

DLTIFSFILE(*YES | *NO)

COMPMSGTYP(*COMP | *ESCAPE)

USERID(WebDocs User | *CURRENT | *AS400USER)

IFSDIR(IFS Output Directory | *FOLDERSETTING)

ORIGFILSIZ(File Size | 0)

PREEXITPGM(Program Name | *NONE)

EXITPGM(Program Name | *NONE)

CRTAUDIT(*YES | *NO)

DOCCHKO

Check out a document from WebDocs to edit. Specify:

  • The unique WebDocs document ID number.
  • A WebDocs user ID.
  • What type of completion message to report:
    • *COMP - Report a completion status message.
    • *ESCAPE - Return to the process calling DOCCKHO.

DOCCHKO DOCID(Document ID)

USERID(WebDocs User | *CURRENT)

COMPMSGTYP(*COMP | *ESCAPE)

DOCCHKU

Undo a document check-out. Specify:

  • Unique WebDocs document ID number.
  • A WebDocs user ID. This user must be the user who has checked out the document or an administrator.
  • What type of completion message to report:
    • *COMP - Report a completion status message.
    • *ESCAPE - Return to the process calling DOCCKHU.

DOCCHKU DOCID(Document ID)

USERID(WebDocs User | *CURRENT)

COMPMSGTYP(*COMP | *ESCAPE)

DOCINFOUPD

Update a document's search keys and information. Specify:

  • The document ID of the document to update.
  • The title, Document Type, and search keys.
  • The spool-file attributes.
  • Whether to create an audit-log entry.
  • Whether to delete existing values in any fields you leave blank or do not pass.
  • The name and library of a pre-check-in exit program.
  • The name and library of a post-check-in exit program.

DOCINFOUPD DOCID(Document ID)

DOCTITLE(Title)

DOCTYPE(Document Type)

KEYWORD1(Search Key 1) ... KEYWORD10(Search Key 10)

SPOOL(Spool-File Name)

USERDATA(User Data)

USERID(User ID)

FORM(Form Type)

JOB(Job Name)

OUTQ(Output Queue)

USRDFNDTA(User-Defined Data)

CRTAUDIT(*NO | *YES)

BLANKUPD(*NO | *YES)

PREEXITPGM(Program Name | *NONE)

EXITPGM(Program Name | *NONE)

 

Emailing

See also:

Command Description Sample Syntax

DOCSEND2

Send an email.

Best Practice: Use this command instead of the old DOCSEND command. DOCSEND works the same way, but does not have the CC and BCC parameters.

Specify:

  • 1 to 30 email addresses to send to.
  • 1 to 30 email addresses to send carbon copies (CC) to and 1 to 30 email addresses to send blind carbon copies (BCC) to.
  • The From email address and name.
  • The email subject.
  • The body text of the email.
  • The IFS paths for up to 30 attachments. Use the DOCIMG01R prototype to get these paths; do not get them directly from the database.
  • An SMTP host name.
  • Whether to compress attachments and, if so, the compression password.
  • The MIME content type. The default value is 'text/plain'.
  • Whether to request delivery confirmation.
  • Whether to request that recipients reply that they read the message.
  • Whether to send the email with high priority.
  • Whether to create an audit-log entry.
  • Whether to delete temporary IFS work files.

DOCSEND2 TOADDR(To Address)

CCADDR(CC Address)

BCCADDR(BCC Address)

FROMADDR(From Address | *DEFAULT)

FROMNAME(From Name)

SUBJECT(Subject | *NONE)

MESSAGE(Email Text | *NONE)

ATTACHMENT(IFS Attachment | *NONE)

SMTPHOST(SMTP Host | *DEFAULT)

COMPRESS(*NO | *YES)

PASSWORD(Compression Password)

CONTYPE(MIME Content Type)

DCONFIRM(*NO | *YES)

RCONFIRM(*NO | *YES)

HPRIORITY(*NO | *YES)

LOG(*NO | *YES)

RMVTEMP(*NO | *YES)

DOCSENDLNK

Send an email with a link to a document. Specify:

  • The document ID.
  • The email address to send to.
  • The From email address.
  • The email subject.

DOCSENDLNK DOCID(Document ID)

TOADDR(To Address)

FROMADDR(From Address | *DEFAULT)

SUBJECT(Subject | *NONE)

 

Links

See also:

Command Description Sample Syntax

DOCLINKCRT

Create a document link. Specify:

  • The document ID.
  • The title, Document Type, and search keys.

DOCLINKCRT DOCID(Document ID)

DOCTITLE(Title)

DOCTYPE(Document Type)

KEYWORD1(Search Key 1) ... KEYWORD10(Search Key 10)

 

Managing Documents

See also Managing Documents.

Command Description Sample Syntax

DOCCLEAR

Remove all documents and IFS files.

Warning: This command will permanently purge all documents and index entries from the entire system. Use with extreme caution.

DOCCLEAR CONFIRM1(*NO | *YES) CONFIRM2(*NO | *YES)

DOCINFODEL

Delete or purge a document and its information. Specify:

  • The document ID.
  • Whether to create an audit-log entry.
  • Whether to purge the document (*YES) or only move it to the DELETED folder (*NO). For more information, see Managing Documents

DOCINFODEL DOCID(Document ID)

CRTAUDIT(*NO | *YES)

PERMDELETE(*NO | *YES) PERMDELET2(*NO | *YES)

DOCVFY

Verify that all document entries in the database point to an actual file on the IFS. This command generates a list of any errors it finds.

DOCVFY

 

Moving Documents

Command Description Sample Syntax

DOCINFOMOV

Move a document and its information to another WebDocs folder. Specify:

  • The document ID.
  • The folder to move the document to.
  • Whether to create an audit-log entry.

DOCINFOMOV DOCID(Document ID)

DOCFLR1(Folder Level 1) ... DOCFLR5(Folder Level 5)

CRTAUDIT(*NO | *YES)

DOCMOVSEL

Select documents for moving. Specify:

  • The folder levels.
  • The starting and ending date of which documents to select in the folder. Use the format 'MM/DD/YYYY'.

DOCMOVSEL FOLDERLVL1(Folder Level 1) ... FOLDERLVL5(Folder Level 5)

BEGINDATE(Beginning Date)

ENDDATE(Ending Date)

CONFIRM1(*NO | *YES) CONFIRM2(*NO | *YES)

DOCMOVRST

De-select any documents selected for moving.

DOCMOVRST

DOCMOVLOC

Move the documents selected with DOCMOVSEL. Specify the IFS directory to move the documents to.

DOCMOVLOC IFSDIR(IFS Directory | '/RJSIMAGEDOCNFS')

CONFIRM1(*NO | *YES) CONFIRM2(*NO | *YES)

 

Routing

See also:

Command Description Sample Syntax

DOCEVMON

Monitor WebDocs and send users notifications when certain events occur.

For example: Notify users when documents arrive in their inboxes.

Start this monitor either when you IPL or use the job scheduler to submit it to the QSYSNOMAX job queue to run once every few minutes and check for new events.

Specify:

  • Whether to run the monitor once (*ONCE) or regularly (*DELAY).
  • The number of seconds between the end of one monitoring cycle and the beginning of the next. Valid values are 1 - 999999.
  • The time of day each day that the monitor stops running. Use the format HHMMSS where the hours are in 24-hour time. Valid values are 000000 - 235900

DOCEVMON DELAY(*ONCE | *DELAY)

DLYTIM(Delay Time)

ENDTIME(End Time)

DOCFLOWCRT

Add a document to a route or create a list of inboxes for it.

Contact RJS Software technical support before using this command.

DOCFLOWCRT DOCID(Document ID | *MOSTRECENT)

USERID(WebDocs User)

FLOWTYPE(*SEQUENTIALREVIEW | *ALL REVIEW)

FLOWLIMIT(*NOTIMELIMIT | *MOVETONEXT | *SENDREMINDERS)

FLOWDAYS(Time limit)

FLOWNOTIFY(*FINALREVIEWER | *EACHREVIEWER)

FLOWPROC(Routing Definition | *NONE)

FLOWUSERS(Inboxes)

FLOWNOTE(Note)

FLOWTITLE(Route Description)

 

Running SQL Queries

Command Description Sample Syntax

DOCSQL

Run an SQL query statement. Specify:

  • The SQL statement to be executed. Use *SOURCE to read the SQL statement from a source member that you specify in SCRF and SCRMBR.
  • Where to output the query results: to the screen (*), to the printer (*PRINT), or to the file (*OUTFILE) that you specify in OUTFILE and OUTMBR.

    Note: In OUTMBR, you can also choose whether to replace records (*REPLACE) or add records after the existing records (*ADD).
  • Whether to edit the statement before executing it in the member SEU (Source Edit Utility).

    Note: If the SEU member doesn't exist, a new member opens.
  • The naming convention, sort sequence, and language ID.

DOCSQL SQLSTM(SQL Statement | *SOURCE)

OUTPUT(* | *PRINT | *OUTFILE)

SCRF(Query Source File)

SCRMBR(Query Source Member)

EDIT(*NO | *YES)

OUTFILE(File To Receive Output)

OUTMBR(Output Member Options)

NAMING(*SYS | *SQL)

SRTSEQ(*JOB | *JOBRUN | *HEX | *LANGIDSHR | *LANGIDUNQ)

LANGID(*JOB | *JOBRUN | Language)

 

Searching

See also:

Command Description Sample Syntax

DOCSRCH

Search and retrieve a list of documents. Specify:

  • The title, Document Type, and search keys.
  • A WebDocs user ID as part of the search criteria.
  • The maximum number of documents to include in the search results.
  • Whether to place the results in a temporary file (*NO) or display the results on the screen (*YES).
  • A program to display document-search results in the format Library Name/Program Name. WebDocs includes a default display program DOC310.
  • Whether to delete the session after the search is complete.

DOCSRCH DOCTITLE(Title)

DOCTYPE(Document Type)

KEYWORD1(Search Key 1) ... KEYWORD10(Search Key 10)

USERID(*CURRENT | WebDocs User)

MAXHITS(Maximum Documents)

DISPLAY(*YES | *NO)

DISPLAYPGM(*NONE | Display Program)

DLTNEWSESS(*YES | *NO)

DOCSRCHID

Retrieve a document ID from search results. Specify:

  • The hit number to return the document ID for.

Return values:

  • The document ID.
  • The document's title.
  • The number of documents available within the search results.
  • Whether the hit was found: 1for yes, and0for no.

DOCSRCHID HITNUMBER(Hit Number)

DOCID(Document ID)

DOCTITLE(Title)

RTNHITS(Number of Hits Available)

HITFOUND(1 | 0)

 

Sessions

See also:

Command Description Sample Syntax

DOCSESCHK

Check if a WebDocs web session is still active.

DOCSESCHK SESSION(Session ID)

DOCSESCLR

Clear all web sessions.

DOCSESCLR

DOCSESCRT

Create a new session ID on the iSeries to use in a URL to bypass the log-in process. Specify:

  • The WebDocs user ID and password to create the new session for.
  • Whether to clear existing sessions.

DOCSESCRT WEBUSER(WebDocs User)

WEBPASS(WebDocs Password)

CLRSESSION(*NO | *YES)

DOCSESEND

End the current document session.

DOCSESEND SESSION(Session ID)

DOCSESRTV

Retrieve a new document session. Specify:

  • Whether to use an iSeries user ID (*AS400USER) or a WebDocs user ID (*IMGUSER).
  • The WebDocs user ID and password to retrieve a new session for.
  • Whether to clear existing sessions.

Return values:

  • The new session ID that was generated. This value has a length of 255 characters.

DOCSESRTV USERTYPE(*AS400USER | *IMGUSER)

WEBUSER(WebDocs User | *CURRENT)

WEBPASS(WebDocs Password)

CHECKSESS(*NO | *YES)

RTNSESSION(Return Session)

 

Viewing a Document from the iSeries

Command Description Sample Syntax

DOCLAUNCH

From an iSeries, open a WebDocs document on a PC, using the default application associated with the document's file extension. This command requires iSeries Office Integrator. Specify:

  • The PC to open the document on. Use *CURRENT to open the document that the iSeries emulator is running on, or an IP address to open the document on another PC.
  • The document ID.
  • Whether to delete the temporary document after viewing it (1) or not (0).
  • Whether to wait for the program that views the document to close (0) or continue without waiting (1).
  • Which version of the document to view.
  • The iSeries Office Integrator user and password for the remote system.

DOCLAUNCH RMTSYS(Remote IP Address| *CURRENT)

DOCID(Document ID)

DELETEDOC(0 | 1)

WAIT(0 | 1)

VERSION(Version Number | *FIRST | *LAST)

USR(Remote User Profile)

PWD(Remote Password)

 

Copyright © HelpSystems, LLC.
All trademarks and registered trademarks are the property of their respective owners.
4.0 | 201802260747 | February, 2018