When testing your application on the workstation, you must produce files that reflect the data sets your application will access on OS/390. There are several ways to create a file for testing, including writing to an empty file with data that mirrors the OS/390 data set, re-creating the data set on the workstation, and downloading the data set to the workstation. Of these, downloading the data set from OS/390 to the workstation involves the least amount of work and allows your program to access the exact same data on the workstation as it will be accessing on OS/390.
The way your program uses downloaded data sets on the workstation depends on what type of data set you have downloaded. There are different procedures for VSAM data sets, fixed PDS members or sequential data sets, and variable PDS members or sequential data sets. Note that when you are using data sets downloaded from OS/390, you must set the correct values for data conversion either using the COBOL or C parser or from your application. For more information on C or COBOL parsers in VisualAge Smalltalk, refer to the VisualAge User's Guide. If you decide to set the correct values for data conversion from your application, send the messages bigEndian: and codePage: to the object.
If you want to use the OS/390 VSAM data set on the workstation, follow these steps:
The seqFileID is the fileid for the downloaded sequential file as specified in the resource association file, and the vsamFileID is the fileid for the Btrieve file as specified in the resource association file. Each of these classes answers an OrderedCollection. For KSDS files, it is a collection of keys; for RRDS files, it is a collection of relative record numbers; for ESDS files, it is a collection of relative byte addresses.
You can also convert VSAM files to sequential files, with the intention of uploading the file to OS/390 as a binary file and using the REPRO command to copy the sequential file into a preallocated VSAM data set. The following tools enable you to convert VSAM ESDS, KSDS, and RRDS files into sequential files on the workstation:
Whenever you use either the tools that convert a VSAM file to a sequential file or the tools that convert a sequential file to a VSAM file, ensure that the file ids for both the VSAM file and the sequential file are properly specified in the resource association file.
If you want to use an OS/390 PDS member or sequential data set whose records are fixed, you can simply download the PDS member or sequential data set as binary to the workstation. Before you access the file on the workstation, ensure that the resource association file is properly specified, including the RECFM parameter, which must be specified as F or FB.
If you want to use an OS/390 PDS member or sequential file whose records are variable, follow these steps:
Before you access the file on the workstation, ensure that the resource association file is properly specified, including the RECFM parameter, which must be specified as V or VB.