Installing the sample files

To use the iSeries scenario application you need to work with the following files:

The .savf files contain iSeries data and RPG programs, and the .zip files contain the Web applications that interact with the iSeries programs to manipulate iSeries data. First, you need to restore the .savf files to your iSeries server, and then you can import the .zip files into Development Studio Client and run the application in the workbench.

Restoring the .savf files

To work with the samples in this guide, you need to restore the WHOLESALE and RETAILSTOR libraries to your iSeries server. You should do this even if you have already restored the libraries for a previous release of the product, because their contents are different.

Note:
The .savf files used to install the sample library are for use with a V5R1 or later iSeries server. For the purposes of this scenario, both libraries are restored to the same iSeries server, but if you were developing this application for a real business, you would restore the two libraries to two different iSeries servers. You would restore the WHOLESALE library to the iSeries server that is providing the Web services, and you would restore the RETAILSTOR library to the iSeries server that belongs to the retail store.
To restore the Wholesale.savf file:
  1. Log on to your iSeries server through a green-screen emulator.
    1. Create a library to contain the save files. To create a new library in the emulator, enter CRTLIB.
    2. Name your library SCENARIO.
    3. Tab to the next line; specify *TEST as the library type and press Enter to save your changes.
    4. Create two save files using the CRTSAVF command, pressing enter between the two lines:
      CRTSAVF FILE(SCENARIO/WHOLESALE)
      CRTSAVF FILE(SCENARIO/RETAILSTOR)
      

      These lines specifically that you want to create save files in your Scenario library.

  2. On your workstation, open a Command Prompt window.
    1. You need to change to the directory where the .savf files exist. By default, you should entercd c:\wdsc\wdscsampl. If you installed the product to a different drive, or you chose not to use "wdsc" as the home directory for Development Studio Client, then change to the wdscsampl directory in the correct place where you installed the product.
    2. On the command line, enter: ftp hostname, where hostname is the name of your iSeries server, for example, PROD400.
    3. Enter your user ID and password for the iSeries server.
    4. On the command line, enter cd /qsys.lib/scenario.lib to switch to your Scenario library.
    5. Enter the following lines:
      bin
      put WHOLESALE.savf WHOLESALE.savf
      put RETAILSTOR.savf RETAILSTOR.savf
      quit
      

      These lines (before you quit) specify that you want to take the save files file from your local system and put them onto the iSeries server.

  3. Back in the iSeries console, restore your Wholesale library:
    1. Enter RSTLIB and press F4 to define how you want to restore the library.
    2. In the Saved Library field, enter WHOLESALE and press the Tab key.
    3. In the Device field, enter *savf and press the Tab key
    4. Press Enter in the next field to display additional values and tab to the Save file field.
    5. Enter WHOLESALE in the Save file field and press the Tab key.
    6. In the Library field, delete the existing value and enter scenario.
    7. Press Enter to restore the WHOLESALE library to your iSeries server.
  4. Repeat this procedure for the Retailstor.savf file:
    1. Enter RSTLIB and press F4 to define how you want to restore the library.
    2. In the Saved Library field, enter RETAILSTOR and press the Tab key.
    3. In the Device field, enter *savf and press the Tab key
    4. Press Enter in the next field to display additional values and tab to the Save file field.
    5. Enter RETAILSTOR in the Save file field and press the Tab key.
    6. In the Library field, delete the existing value and enter scenario.
    7. Press Enter to save your action and restore the RETAILSTOR library to your iSeries server.

Modifying your library list

Although you have restored the RETAILSTOR and WHOLESALE libraries to your iSeries server, you need to ensure that they are in your library list that you use when you sign on. Otherwise, your Web applications might not be able to find the libraries and you could encounter problems when running or building the applications. You also need to make sure that the QGPL library is in your library list.

To do this, you need to update your job description and user profile so that the changes to your library list are permanent.

Different users have different ways of modifying their library list, but if you do not know how, here is an example:

  1. On your iSeries server, type dsplibl and press Enter to display your library list.
  2. Check to see if both the RETAILSTOR, WHOLESALE, and QGPL libraries are in your library list. If they are there, you can exit and shut down your emulator window. If they are not there, then:
    1. Press F12 to cancel out of your current screen.
    2. Locate the name of your job description. To do so, type dspusrprf username and press Enter to display your user profile, where username is the ID you use to sign on to the iSeries server. Your job description is on one of the pages of your user profile (use Page Down). When you find your job description, make a note of it and press F12 to exit from the screen.
    3. At the command line, type chgjobd and press F4.
    4. In the Job Description field, type in your job description name and press F10 to see additional parameters.
    5. Page down to Initial library list.
    6. In the field below Initial library list, you will see "+ for more values". Type a plus sign and press Enter.
    7. On the Specify more values page, delete any entry that exists, and type RETAILSTOR, WHOLESALE, and QGPL, tabbing between each value. It is mandatory that you enter the libraries in this order, because the applications need to find the RETAILSTOR library first. Press Enter.
    8. Press Enter again to save your changes.
    9. At the command line, type: chgusrprf and press Enter.
    10. Type your username and press Enter.
    11. Press F10 to see additional parameters.
    12. Page down to Job description.
    13. If the name of your job description does not match the job description you found with the dspusrprf command, type the name of the job description you found with that command and press Enter to save your changes.


[ Top of Page | Previous Page | Next Page | Table of Contents ]