{"id":19165719,"url":"https://github.com/loopbackio/loopback-connector-ibmi","last_synced_at":"2026-03-08T16:31:49.346Z","repository":{"id":42582780,"uuid":"191575653","full_name":"loopbackio/loopback-connector-ibmi","owner":"loopbackio","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T17:24:37.000Z","size":237,"stargazers_count":2,"open_issues_count":3,"forks_count":4,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-19T22:02:36.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loopbackio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-12T13:23:42.000Z","updated_at":"2023-01-25T11:04:25.000Z","dependencies_parsed_at":"2024-11-09T09:29:59.763Z","dependency_job_id":"a0666458-be5e-4f48-bd0b-f3276754449d","html_url":"https://github.com/loopbackio/loopback-connector-ibmi","commit_stats":null,"previous_names":["strongloop/loopback-connector-ibmi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-ibmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-ibmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-ibmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-ibmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopbackio","download_url":"https://codeload.github.com/loopbackio/loopback-connector-ibmi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252874908,"owners_count":21817923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T09:29:07.889Z","updated_at":"2026-03-08T16:31:44.296Z","avatar_url":"https://github.com/loopbackio.png","language":"JavaScript","readme":"# loopback-connector-ibmi\n\nThis is a database connectior for Db2 on IBM i intended for use with LoopBack 3 (LoopBack 4 testing soon). It uses the npm `odbc` package to connect to the database, so installing an ODBC driver manager and driver and setting up a datasource is required for use (see below).\n\n## Major differences from version 0.x of loopback-connector-ibmi\nThis version of the module is significantly different from version 0.x and constitutes a complete rewrite. This project is a derivative of [loopback-connector-db2iseries](https://github.com/strongloop/loopback-connector-db2iseries) and the v0.x [loopback-connector-ibmi](https://github.com/andrescolodrero/loopback-connector-ibmi).\n\nThe main difference between this and the other packages for IBM i (including v0.x of this package) is that it uses ODBC to communicate to the database. Version 0.x of this package was built using the Db2 for i CLI API set, hence the need for important prerequisites (below). \n\n## Prerequisites\nBefore installing this package, you will need an ODBC driver and a driver manager (with development libraries). \nThis package is primarily developed and tested with the IBM i Access ODBC driver, which is supported as part of IBM i software maintenance agreements (SWMA) and comes with no additional licensing fees. \n\n### On IBM i\n- Install the `unixODBC-devel` package. See [the RPM and yum documentation for IBM i](http://ibm.biz/ibmi-rpms) for more detailed steps.\n### On Linux\n- Install the `unixODBC-devel` package with your operating system's package manager (apt-get, zypper, yum, etc).\n- Install the \"Linux Application Package\" of IBM i Access Client Solutions. Consult [this document](http://www-01.ibm.com/support/docview.wss?uid=nas8N1010355) for assistance.\n### On Windows\n- Install the \"Windows Application Package\" of IBM i Access Client Solutions. Consult [this document](http://www-01.ibm.com/support/docview.wss?uid=nas8N1010355) for assistance.\n\n\n## Installation\nOnce the prerequisites are satisfied, enter the following in the top-level directory of your LoopBack application and install this package:\n\n```\n$ npm install loopback-connector-ibmi \n```\n\n## Configuration\n\nIn LoopBack, datasources are used to store the information about your database so it can be used by the program. Use the [data source generator](https://loopback.io/doc/en/lb3/Data-source-generator.html) to add  to your application:\n\n```\nlb datasource\n```\n\nThe datasource generator will then walk you through the process of setting up a datasource:\n1. `Enter the datasource name:` Any name will do, such as the name of the schema you will use or the name of your system.\n2. `Select connector for \u003cname\u003e:` LoopBack 3 does not have knowledge of `loopback-connector-ibmi`, so just press up on the arrow key once and select `other`.\n3. `Enter the connector's module name:` Enter `loopback-connector-ibmi`.\n4. `Install loopback-connector-ibmi`: If you haven't installed it, enter `Y`. If you have already installed it, select `n`.\n\nThis will generate an entry in your `server/datasources.json` file. It should know have an entry similar to:\n\n```json\n  \"test\": {\n    \"name\": \"test\",\n    \"connector\": \"loopback-connector-ibmi\"\n  }\n  ```\nYou should edit this entry to add information on how to connect to Db2. For `loopback-connector-ibmi`, you need to pass either a `connectionString`, or pass your `username`, `password`, and `dsn` (which will be the DSN name you set up for your ODBC driver).\n\n```json\n\"test\": {\n  \"name\": \"test\",\n  \"connector\": \"loopback-connector-ibmi\",\n  \"connectionString\": \"DSN=MYDSN\"\n}\n```\n\nor\n\n```json\n\"test\": {\n  \"name\": \"test\",\n  \"connector\": \"loopback-connector-ibmi\",\n  \"dsn\": \"MYDSN\",\n  \"username\": \"FIRSTLAST\",\n  \"password\": \"password123\"\n}\n```\n\nThe following table describes the connector properties.\n\nProperty| Type | Description\n---| --------| --------\nconnectionString | String  | ODBC connection string for connecting to the database\ndsn            | String  | ODBC DSN to use for the connection\nusername       | String  | Username on the IBM i\npassword       | String  | Password on the IBM i\nschema         | String  | Specifies the default schema name that is used to qualify unqualified database objects in dynamically prepared SQL statements. The schema name is case-sensitive.\n\n**More connector properties will be added as requested by the community**\n\nAlternatively, you can create and configure the data source in JavaScript code.\nFor example:\n\n```javascript\nvar DataSource = require('loopback-datasource-juggler').DataSource;\nvar DB2 = require('loopback-connector-ibmi');\n\nvar config = {\n  dsn:      process.env.DSN\n  username: process.env.DB2_USERNAME,\n  password: process.env.DB2_PASSWORD,\n};\n\nvar db = new DataSource(DB2, config);\n\nvar User = db.define('User', {\n  name: { type: String },\n  email: { type: String },\n});\n\n// Will make sure that 'User' table has the same format as the model\ndb.autoupdate('User', function(err) {\n  if (err) {\n    console.log(err);\n    return;\n  }\n\n  User.create({\n    name: 'Tony',\n    email: 'tony@t.com',\n  }, function(err, user) {\n    console.log(err, user);\n  });\n\n  User.find({ where: { name: 'Tony' }}, function(err, users) {\n    console.log(err, users);\n  });\n\n  User.destroyAll(function() {\n    console.log('example complete');\n  });\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopbackio%2Floopback-connector-ibmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopbackio%2Floopback-connector-ibmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopbackio%2Floopback-connector-ibmi/lists"}