The LANDP Store for Forwarding server temporarily stores transactions intended for a host system. Using a Store for Forwading server helps maintain service if communication between the workgroup and the host is temporarily lost or only available at certain times.
This session provides practical experience with LANDP's Store for Forwarding server. During the session, you will customize a simple LANDP workgroup consisting of a single workstation providing a Store for Forwarding service. In this exercise, we will not configure a host connection, so we will not be transmitting any data from the Store for Forwarding server.
The Store for Forward server uses the same system of storing data as the Electronic Journal, and has a number of similarities.
In this section the LANDP configuration files are written to specify a LANDP workstation that provides the Store for Forwarding service. The steps required during customization are outlined below.
A brief overview about creating LANDP common definitions is available.
Table 'Vectors - a quick reference' on page 44 of the LANDP Installation and Customization manual shows that LANDP requires 4 vector types for defining a Store for Forwarding profile; SFORWPRF, SFORWREC, RECDEF, and RECFIELD. The table on page 51 of the LANDP Installation and Customization manual, 'Server Requirements' also states that a System Manager server, Shared File server and Query server must also be customized.
RECDEF | NAME=SFFREC, DELIMIT='/', DECSEP=',' |
RECFIELD | NAME=ACCNUM, LENGTH=12, FORMAT=C |
RECFIELD | NAME=WSID, LENGTH=2, FORMAT=C |
RECFIELD | NAME=BAL, LENGTH=6, FORMAT=N |
RECFIELD | NAME=TIME, LENGTH=4, FORMAT=C |
RECDEF | NAME=LDPREC01, DELIMIT='/', DECSEP=',' |
RECFIELD | NAME=NAMES, LENGTH=20, FORMAT=C |
RECFIELD | NAME=NUMBP, LENGTH=12, FORMAT=N |
RECFIELD | NAME=BALS, LENGTH=12, FORMAT=P |
SHFLDBD | SHFLPRF=LDPDATA, DBDNAME=LDPDBD, RECNAME=LDPREC01, KEY01=(NUMBP,P,N,,), KEY02=(NAMES,S,N,,), KEY03=(BALS,S,N,,), DBDPATH=C:\LDP\SHFL\, DBFLNAME=LDPDATA |
SHFLPCB | PCBNAME=ACCNUMB, KEYFIELD=NUMBP |
SHFLPCB | PCBNAME=ACCNAME, KEYFIELD=NAMES |
SHFLPCB | PCBNAME=BALANCE, KEYFIELD=BALS |
SMGRPRF | NAME=LDPSMGR |
SMGRUSER | USERID=LDPUSER, PASSWORD=LDPUSER |
SFORWPRF | NAME=EHCSFOR, SEPSESS=Y, SHFLPRF=LDPDATA, DBDPATH=C:\LDP\SFOR\, SPLIT=128 |
SFORWREC | RECNAME=SFFREC |
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=EHCXLATE.DLL, |
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=SVPCPRBN.EXE, |
SOFTPACK  | PACKNAME=CONFTEST, FILENAME=SVPCPRBN.HLP, |
A brief overview about creating LANDP workgroup definitions is available.
We will specify a single workstation providing a Store for Forwarding service in a workgroup called "SFOR". We will also specify that the workstation will be used as a client for the Store for Forwarding server.
LANCONF  | NAME=SFOR, WSNAMES=(S1) |
LWSCONF | NAME=S1, TYPE=NT, SERVER=SMGR, SERVER=SFQUERY, SERVER=SHFILE01, SERVER=SFORFORW, PAR&SHFL=(LDPDATA,,3), PAR&SFOR=(EHCSFOR), CLIENT=(SHFILE01,S1), CLIENT=(SFORFORW,S1), SOFTPACK=CONFTEST |
The COMMON.SPC and LANCONF.SPC must now be validated to ensure they have been entered correcly. More information about the validation stage is available on page 55 of the LANDP Installation and Customization manual.
C:\
CD C:\EHC\EHCCUS\
VALSPEC COMMON
VALSPEC
LAN \SFOR
Once the configuration has been validated, the LANDP files to be installed on each workstation can now be generated and copied. See our brief overview on distribution.
GENRUN \SFOR
GETTING \SFOR WS=S1 C:\SFOR\
The LANDP files are now installed in the directory C:\SFOR\.
The final stage is to start the LANDP services on the workstations. See our brief overview on starting and managing LANDP services.
CD \SFOR
SET LOGPATH=.
GENLOG
AUTOFBSS
The LANDP services should now have started. To view a list of the running LANDP services, type EHCINFO at the command prompt. You are now ready to begin using the LANDP Store for Forwarding support.
Testing of LANDP servers is done using the SVPCPRB program. For more information on the SVPCPRB program and it's capabilities, see page 107 of the LANDP Programming Guide.
Communication with LANDP services is done by sending CPRB messages. The first message we must send is an IN command to the LANDP Supervisor server.
If the CPRB message was recieved successfully, the Server Return Code shown in the Output panel should read "OK". If the return code is different, refer to the Problem Determination manual for more information.
Before you can use the Store for Forwarding functions, you must initialise the Shared File server. This is done using the GF and OO Shared File functions. Issue a GF to the Shared File server as follows. Be sure to include the capital letter O in the Request Data Area.
Next, issue an OO to the Shared File Server to open it for online transactions:
The Shared File server can take a second or two to come online. A client application that uses the Store for Forwarding server would use the TI function of the Store for Forwarding server in a loop here to ensure the server is ready before continuing.
Data to be forwarded is added using the AR function. In it's initial state, the Store for Forwarding server will not attempt to transmit the data, and it will be stored. A record can be added as follows:
In this hands on, the Store for Forward server was customized with seperate session integrity controls turned on. This means that, unlike the Electronic Journal hands on, we do not have to send BT and ET commands to the Shared File server. Instead, the integrity flag is used. Because we are only adding a single record, the integrity flag in the Request Parameter Area is set to "O", meaning only one record per transaction.
The record that was added was placed in the Request Data Area, and the record format was specified in the Request Parameter Area as SFFREC. The System Manager Server is used here to check that the data conforms to the specified record format. The record was placed in the Store for Forwarding file FBSF01.
Try adding several different records. Also try adding some to the second Store for Forwarding file, FBSF02.
You can check the status of the Store for Forwarding files using the IS function of the Store for Forwarding server. Issue an IS request as follows:
The Reply Data Area contains 4 bytes representing the status of the Store for Forwarding file, and the forwarding session associated with it. The meaning of the 4 bytes is as follows:
See page 405 of the LANDP Programming Reference for more information.
Retrieving stored records is done using the RR function. The RR function can be used with or without search criteria. See page 414 of the LANDP Programming Reference for more information on the RR function. Retrieving the first record in the FBSF01 Store for Forwarding file can be done as follows:
The record is returned in the Reply Data Area. The Store for Forward server supports more advanced searching operations. See page 385 of the LANDP Programming Reference for more information on specifying search criteria. Finding the first record where the WSID field is S1 can be done as follows:
Updating a record in a Store for Forwarding file involves retrieving the record with RR using the retrieve-for-updating flag, and performing an update using the UP request. Because an update transaction requires 2 function calls, the integrity flag must be changed to reflect this. Instead of using "O", the first function call will use a flag of "F", and the second function call will use a flag of "L". If a transaction requires more than 2 function calls, the intermediate functions should use an "M" flag.
Perform a retrieve-for-updating as follows:
The record to be updated(the first record in file FBSF01 where WSI is S1) is now locked for updating. Update the record with the following function call:
Deleting a record is done in much the same way as updating, except the record is retrieved for deleting. A deleted record is not removed from the Store for Forwarding file, it is simply marked as deleted, and will not be forwarded or returned in retrieve operations unless the RR function has a retrieve-deleted-records flag set.
Perform a retrieve-for-deleting as follows:
The record to be deleted(the first record in file FBSF01 where WSI is S1) is now locked for deleting. The record's sequence number is a 5 character value at offset 16 of the Reply Data Area. In this case the sequence number is 2, but you should note down the sequence number of your record if it is different. You need to know the sequence number of a particular record to delete it.
Issue the following function call to delete the record, and make sure you change the number at offset 18 of the Request Parameter Area if the sequence number of your record is something other than 2.
To end this Store for Forwarding session, you must close the connection to the Shared File server. Issue a CO to close the online Shared File session:
Finally, issue a RF to revoke your access to the Shared File server as follows:
When you have completely finished with LANDP, you should send an EJ message to the Supervisor server to disconnect your client from the LANDP system.