Configuring the Adapter for JSON

In this section:

How to:

x

You can configure the Adapter for JSON from the Web Console or the Data Management Console.


Top of page

x
Procedure: How to Configure the Adapter

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters.

    or

    From the Data Management Console, expand the Adapters folder.

    The Adapters folder opens.

  2. Expand the Available folder, if it is not already expanded.
  3. Expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click the adapter name and/or version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. Enter values for the parameters required by the adapter, as described in the connection attributes reference.
  6. Click Configure. The configured adapter is added to the Adapters list in the navigation pane.

Note: The JSON adapter is located under the XML-based group folder. No input parameters are required.


Top of page

x
Associating a Master File With a JSON Document

How to:

You must explicitly issue a FILEDEF command to associate a Master File with a JSON document. In order to properly code the FILEDEF command, you need to determine how the JSON documents are organized. If the documents are all in one file, the organization is called a COLUMN. If there are various documents in one directory, then the organization is called a COLLECTION.

Source

Collection Organization

Column Organization

disk

supported

supported

http

not supported

supported

https

not supported

supported



x
Syntax: How to Associate a Master File With a JSON Document
FILEDEF ddname source filename

where:

ddname

Is the logical reference name matching the desired Master File.

source

Is the location of the JSON document. Possible values are http, https, and disk.

filename

For a JSON Column, is the full path to the source file.

For a JSON Collection, is the full path to the source directory. The directory name must be followed by the wildcard characters '*.*'.

The file name must start with 'http://' or 'https://' if the JSON documents are to be read using an HTTP or HTTPS session.



Example: Issuing a FILEDEF Command for a JSON Column

Note: If you are working on the Web Console or Data Management Console Create Synonym panes, see Synonym Creation Parameters for JSON for details about how FILEDEFs are created.

For Windows, when you have the ordercol.JSON document under C:\, use the following FILEDEF in your profile:

FILEDEF ordercol disk C:\ordercol.JSON

For UNIX, when you have the ordercol.JSON document under /usera/JSON/, use the following FILEDEF in your profile:

FILEDEF ordercol DISK /usera/JSON/ordercol.JSON

For z/OS, when you have the ordercol.JSON document in TEST.JSON, use the following FILEDEF in your profile:

FILEDEF ordercol DISK //'TEST.JSON'

For HTTP and HTTPS, when you have the ordercol.JSON document under http://www.test.com/JSONtest/ (or https://www.test.com/JSONtest/), use the following FILEDEF in your profile:

FILEDEF order http http://www.test.com/JSONtest/ordercol.JSON

or

FILEDEF order http https://www.test.com/JSONtest/ordercol.JSON


Example: Issuing a FILEDEF Command for a JSON Collection

Note: If you are working on the Web Console or Data Management Console Create Synonym panes, see Synonym Creation Parameters for JSON for details about how FILEDEFs are created.

For Windows, when you have the order1.JSON and order2.JSON documents under C:\ORDERS, use the following FILEDEF in your profile:

FILEDEF order disk C:\orders\*.*

For UNIX, when you have the ordercol.JSON document under /usera/orders, use the following FILEDEF in your profile:

FILEDEF ordercol DISK //'TEST.JSON'

For z/OS, when you have the order document in TEST.JSON, use the following FILEDEF in your profile:

FILEDEF order DISK /usera/orders/*.*

iWay Software