There are a number of utilities and library routines that allow you to interact with data files and folders hosted in a database. In order to reference those files and folders within a datastore, you need to use a specific URL, as described below:
sql://<server-name>/<datastore-name>/<file-name>[?<file-attributes>] *> file url sql://<server-name>/<datastore-name>?type=folder;[folder=/<folder-name>] *> folder url
where:
Attribute | Values | Example | Description |
---|---|---|---|
type |
|
|
File type. This only needs to be specified when deploying files into the database that do not have file headers |
reclen | <min[,max]> |
|
Minimum and maximum max record lengths of variable-length sequential files, or the record length of fixed-length sequential or RRDS files. This only needs to be specified when deploying files into the database that do not have file headers |
recterm |
|
|
The type of record terminator the file has. Used primarily for RRDS files, and only required for files that have been created on a platform different to the one on which it is currently being deployed |
folder | <folder-name> |
|
Folder name. If a folder name is not explicitly specified, the root folder is assumed (i.e. folder=/) |
You can use environment variables within the SQL URL, which can be specified in one of two formats:
For example: sql://$MYSERVER/$MYDATASTORE/myfile.dat
For example: sql://${MYSERVER}/${MYDATASTORE}/myfile.dat
sql://swt-bto/JCLTEST/my.dat
sql://swt-bto/$JCLDATASTORE/another.dat?folder=/MyData
sql://${MYSVR}/SEQDATA/newseq.dat?folder=/MySeqData;type=seq;reclen=0,80