none
display journal in iseries RRS feed

  • Question

  • hello

    Can i use HostFileCommand  class to generate one journal display file from a db2 table?

    Some like

    myCommand.ExecuteScalar(" EXEC 'DSPJRN ...'");

    and then how can i access the file from my .net application?

    Monday, January 28, 2013 9:01 PM

Answers

  • Some additional information. Even though you can execute interactive commands through this method, it isn't a real good idea. There is no way to access the 5250 data stream with the AS/400 response, and there’s no good way to exit your job once it’s started.

    For DSPJRN, you can specify an output parameter, so your output can go to the screen (not really what you want in this scenario), to a print spool, or to an output file (probably the best option).. So you would execute it something like this:

                   Mycommand.ExecuteScalar(“EXEC ‘DSPJRN …more parameters…  OUTPUT(*OUTFILE) OUTFILE(MYLIB/FOO)’ “);

    The following blog post describes how to access AS/400 journal files using the BizTalk Adapter for Host Files. It may yield some useful information for your scenario as well.

    http://blogs.msdn.com/b/ricardom/archive/2009/05/26/accessing-system-i-journal-files.aspx

    Thanks...


    Stephen Jackson - MSFT

    Thursday, February 7, 2013 8:11 PM

All replies

  • You can use the Managed Provider for Host Files in HIS to execute CL commands on an iSeries (AS/400) like the one you describe.

    Accessing the file after it is generated will depend on the format of the generated journal file. You should be able to access the file from the .NET application via the Managed Provider for Host Files, for example.


    Stephen Jackson - MSFT

    Thursday, February 7, 2013 3:13 PM
  • Some additional information. Even though you can execute interactive commands through this method, it isn't a real good idea. There is no way to access the 5250 data stream with the AS/400 response, and there’s no good way to exit your job once it’s started.

    For DSPJRN, you can specify an output parameter, so your output can go to the screen (not really what you want in this scenario), to a print spool, or to an output file (probably the best option).. So you would execute it something like this:

                   Mycommand.ExecuteScalar(“EXEC ‘DSPJRN …more parameters…  OUTPUT(*OUTFILE) OUTFILE(MYLIB/FOO)’ “);

    The following blog post describes how to access AS/400 journal files using the BizTalk Adapter for Host Files. It may yield some useful information for your scenario as well.

    http://blogs.msdn.com/b/ricardom/archive/2009/05/26/accessing-system-i-journal-files.aspx

    Thanks...


    Stephen Jackson - MSFT

    Thursday, February 7, 2013 8:11 PM