+ Reply to Thread
Results 1 to 8 of 8

Thread: How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

  1. #1
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    Is there any cmd to check that a particular printer file exists in a specific library. RTVMBRD cmd works only on database files. Any such cmd for PRTF.
    If you can assume that the file in question would have to be a printer file, never a file of some other type, you can use CHKOBJ. CHKOBJ OBJ(QSYSPRT) OBJTYPE(*FILE) If it's possible that the file might exist, but be a database file, display file, or whatever, you could use the CHGPRTF command and monitor for CPF7304. CHGPRTF FILE(PRINTFILE) MONMSG MSGID(CPF7304) EXEC(DO) /* it's not a printer file, or it doesn't exist */ ENDDO DB

  2. #2
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    CHKOBJ and CHPPRTF works on Object not on Source. I have conditions in which i have to make check specifically on source. It might be possible that Object is present but source is not avaliable; then in that case how i can check whether PRTF source is present in a particular library or not.

  3. #3
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    Then CHKOBJ is still the command, but with additional options for the specific member. CHKOBJ OBJ(sourcelib/sourcefile) OBJTYPE(*FILE) MBR(sourcembr) HTH - Lee.

  4. #4
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    DSPOBJD OBJ(PRTF) OBJTYPE(*FILE) DETAIL(*SERVICE) Assuming that the object exists, this command will identify the source from which the object was created. Note that this does not mean that the source still exists or, if it does exist, that it is really the source used to create the object. Look at the various dates to determine that.

  5. #5

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    See Source below. Something like it should work for you.
    Code

  6. #6

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    If library name and source file are defined, try: PGM DCL &RECN *DEC (10 0) RTVMBRD FILE(yourLIB/yourSRC) MBR(yourFile)NBRCURRCD(&RECN) MONMSG CPF9815 EXEC(..........) EOJ: ENDPGM

  7. #7
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    Is there any cmd to check that a particular printer file exists in a specific library. RTVMBRD cmd works only on database files. Any such cmd for PRTF.

  8. #8
    Guest.Visitor Guest

    Default How to check that Source Of a Printer File exists in a Library (Any Cmd like RTVMBRD)?

    Thanks Lee The command u suggested works fine. CHKOBJ OBJ(sourcelib/sourcefile) OBJTYPE(*FILE) MBR(sourcembr) It's the best option suited according to my requirements. Alakh

+ Reply to Thread

Similar Threads

  1. How can I check if a document already exists in a folder?
    By Guest.Visitor in forum Web Languages
    Replies: 6
    Last Post: 05-25-2006, 02:14 AM
  2. Changing source library and file in object
    By Guest.Visitor in forum General
    Replies: 6
    Last Post: 08-16-2005, 04:59 AM
  3. Copy a source member that already exists.
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 11-08-2001, 10:23 AM
  4. How do I check document X in folder Y exists?
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 03-09-2001, 04:29 AM
  5. Check library existence on other AS/400
    By Guest.Visitor in forum Programming
    Replies: 5
    Last Post: 05-10-1999, 12:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts