by Stuart Baker
This article describes the BIOC Upload Download feature and the procedures used to tailor the BIOC driver from an application program. My last article on CTD stated, "I will defer the hands on discussion until the problems are resolved." Well, the CTD problems are still not resolved, so I will once again defer my hands on discussion.
BIOC, like CTD, has a Upload Download function. This undocumented feature has been in place since BIOC became a standard part of OS/32. The SETTERM program, available through the Interchange Library, uses Upload Download to display and modify many characteristics of the BIOC driver. Likewise, application programs may tailor the driver on-the-fly. This is almost like performing an instant sysgen. If you program in assembly language, the SETTERM program provides examples of the Upload Download function.
In the DVRM macro library, you will find the BIOCATR and BIOCEQU macros. The BIOCATR macro defines the structure of the BIOC Upload Download data storage area. This structure has not changed since the introduction of BIOC, so programs utilizing Upload Download work on all revisions of OS/32. The BIOCEQU macro defines bit offsets for flags used within BIOC. Caution must be exercised when using these features because BIOC performs no error checking on the Download. If a program Downloads invalid data, the terminal may become inoperable and you will need to re-boot to correct this condition.
Your application program must first perform an Upload to fill the data buffer with the current driver information. Depending upon the function you intend to perform, you may want to keep a copy of the original driver state to restore at program termination. A note of interest, unlike CTD, the Upload Download function of BIOC only works on connected lines. For example, you may not perform the function on a dial line that does not have carrier present. Because of this, you can wait for carrier by performing an Upload with the extended options of S1XO.LCM.
Your application program must be linked with XSVC1 because the Upload Download functions are a VFC operation. To do an Upload, your application program must perform the following steps:
BIOC insures that the buffer is fullword aligned and that the size matches the BIOCATR structure. If you receive a zero status, your buffer contains information uploaded from the BIOC DCB. You should always check the status of the Upload to insure that your buffer contains valid data. Never perform a Download using a buffer filled by an Upload that returned bad status.
Once you have Uploaded the information, you may make changes to the data contained in the buffer. I suggest you look at the SETTERM program as an example of making changes to this data. The following list outlines several items that you may be interested in changing.
After you have made changes to the data in the buffer you may Download the new information. You perform the Download using the same buffer as the Upload. The only changes are to the SVC 1 function code. Use a VFC write to perform the Download. Use a function code of SV1.WRIT!SV1.XOP and an extended option of S1XO.VFM!S1XO.FMM.
Well that about does it for this issue. Stay tuned for more on CTD in the next news letter (maybe). I hope to have some hands on experience to report. Looking forward to seeing everyone at Interchange 89.
This SBSW.COM page has been optimized for printing.