Script for Uploading to your LANSA for the Web Folders

Visual LANSA Framework

Script for Uploading to your LANSA for the Web Folders

The Framework needs to copy data from your Visual LANSA workstation to the LANSA for the Web Images folder and to your LANSA for the Web Private Working Folder.

It can perform these copies using FTP or simple DOS COPY commands (providing that you have a mapped drive to the your IFS folders).

It does this by expanding and then executing a small skeleton script that you provide.

You need to create (and sometimes modify) the script that will be used.

If you have a mapped drive and have input the Optional Mapped Drives to your LANSA for the Web Folders details in step 10:

  • Change the Script Type to "DOS File COPY Commands"
  • Click the Generate Example Button.
  • A script example should appear in the script window.
  • The script window is input capable and you can change the script if you need to.
  • Review the script and check that the directory names are correct. Change them as required so that information can be copied from your partition execute directory to your LANSA for the Web images directory and your private folder.

If you do NOT have a mapped drive, or prefer to use FTP file transfers: 

  • Change the Script Type to "FTP File Transfer Commands"
  • Click the Generate Example Button.
  • A script example should appear in the script window.
  • The script window is input capable.
  • Replace the "===> Replace this line with your FTP user profile <===" string in line 2 of the script with the user profile you use for FTP file transfers. Typically this is your System i user profile (eg: QPGMR).
  • Replace the "===> Replace this line with your FTP password <===" string in line 3 of the script with the user profile you use for FTP file transfers. Typically this is your System i user profile password (eg: PGMR). Note that your user profile and password details are not stored in the Framework XML file and are only ever kept in your Visual LANSA system.
  • Review the script and check that the directory names are correct. Change them as required so that information can be copied from your partition execute directory to your LANSA for the Web images directory and your private folder.

For example, after pressing the "Generate Example" button you might see this:

OPEN 608.89.58.81

===> Replace this line with your FTP user profile <===

===> Replace this line with your FTP password <===

LCD "C:\PROGRAM FILES\LANSA\X_WIN95\X_LANSA\x_dem\execute"

PROMPT 

........... etc ................

 

If your FTP user profile was QPGMR (say) and your password was MOUSE (say) then you should change the generated example to be like this:

 

OPEN 608.89.58.81

QPGMR

MOUSE

LCD "C:\PROGRAM FILES\LANSA\X_WIN95\X_LANSA\x_dem\execute"

PROMPT 

........... etc ................

For a Windows web server and for an Apache web server running on System i, you may need to change directory names.

For example, if the virtual name for your Images folder was Images after pressing the "Generate Example" button you might see this:

CD "//Images"

MPUT <<PUT_SHARED_FILES>>

CD "//Images/My_Private_Folder"

MPUT <<PUT_PRIVATE_FILES>>

........... etc ................

 

If the real name for your Images folder was LANSAIMG you should change the generated example to be like this:

CD "\lansaimg"

MPUT <<PUT_SHARED_FILES>>

CD "\lansaimg\My_Private_Folder"

MPUT <<PUT_PRIVATE_FILES>>

........... etc ................

 

Note that the upload script is static.

If you change any of your folder or mapped drive details you will probably need to regenerate the upload script again.

This property is in the Developer Preferences – Web Server tab.