Archive journal receivers for selected journals

Archive journal receivers for selected journals

I wrote an application that archives journal receivers for selected journals. Associating receivers with a particular journal proved to be somewhat difficult until I ran across an IBM API that accomplished this task. The code below demonstrates the use of the API. The application uses the iSeries version of PKZIP to create the archives, which are then user restorable. Our programmers are constantly reviewing journal data and needed this capability.

 
  
100       *  Associate Journal with Journal receiver                                                                04/12/04
    200       *  written by James H Greene on 2004/03/06
    300       *             TRIPLEJ, INC
    400       *             TRIPLEJ46@hotmail.com
    500       *             801-673-2233                                                                                04/13/05
    600       * Send this program a receiver name and receiver library and it                                           06/11/04
    700       * will return the journal name, journal library, attach and                                               06/11/04
    800       * detach dates.                                                                                           06/11/04
    900       * compile this pgm using the below command
   1000       * CRTBNDRPG PGM(pgmlib/TJ4005R) SRCFILE(srclib/QSOURCE1)                                                  04/13/05
   1100       * DFTACTGRP(*NO) BNDDIR(QUSAPIBD)
   1200

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

* 04/13/05 1300 * A list of receivers can be obtained using the following command 04/13/05 1400 * DSPOBJD OBJ(*ALLUSR/*ALL) OBJTYPE(*JRNRCV) OUTPUT(*OUTFILE) 04/13/05 1500 * OUTFILE(filelib/file) 04/13/05 1600 * 04/13/05 1700 d******************************************************************** 1800 dqjov0100 ds 512 Qjo RRCV0100 1900 d rcvrname 9 18 Jrn Rcv Name 04/12/04 2000 d rcvrlib 19 28 Jrn Rcv Lib Name 04/12/04 2100 d jrnlname 29 38 Jrn Name 04/12/04 2200 d jrnllib 39 48 Jrn Lib Name 04/12/04 2300 d attachdate 96 108 Jrn Lib Name 04/12/04 2400 d detachdate 109 121 Jrn Lib Name 04/12/04 2500 d ibmapi c 'QjoRtvJrnReceiverInformation' 2600 d format s 8 2700 d errcode s 10 2800 d rcvrinfo s 20 04/12/04 2900 d rtnvarlen s 4b 0 inz(%size(qjov0100)) 3000 d prcvrname s 10 Jrn Rcv Name 04/12/04 3100 d prcvrlib s 10 Jrn Rcv Lib Name 04/12/04 3200 d pjrnlname s 10 Jrn Name 04/12/04 3300 d pjrnllib s 10 Jrn Lib Name 04/12/04 3400 d pattachdate s 13 Jrn Lib Name 04/12/04 3500 d pdetachdate s 13 Jrn Lib Name 04/12/04 3600 c eval rcvrname = prcvrname 04/12/04 3700 c eval rcvrlib = prcvrlib 04/12/04 3800 c eval rcvrinfo = rcvrname 04/12/04 3900 c eval %subst(rcvrinfo:11:10) = rcvrlib 04/12/04 4000 c eval format = 'RRCV0100' 4100 C callb ibmapi 4200 C parm qjov0100 4300 C parm rtnvarlen 4400 C parm rcvrinfo 04/12/04 4500 C parm format 4600 C parm errcode 4700 c eval pjrnlname = jrnlname 04/12/04 4800 c eval pjrnllib = jrnllib 04/12/04 4900 c eval pattachdate = attachdate 04/12/04 5000 c eval pdetachdate = detachdate 04/12/04 5100 c eval *inlr = *on 5200 c *inzsr begsr 5300 c *entry plist 04/12/04 5400 c parm prcvrname 04/12/04 5500 c parm prcvrlib 04/12/04 5600 c parm pjrnlname 04/12/04 5700 c parm pjrnllib 04/12/04 5800 c parm pattachdate 04/12/04 5900 c parm pdetachdate 04/12/04 6000 c endsr

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your systems management questions fast.

Read this Search400.com Featured Topic: Take control of your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


This was first published in April 2005

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.