iObj¶
-
class
iObj
(conn)¶ Note
Deprecated: Will be removed in the next major version.
- Arguments
conn (Connection) – The Connection object.
-
iObj.
addToLibraryList
(lib, cb)¶ Note
Deprecated: Will be removed in the next major version.
Adds a library to the library list. IBM i API: QLICHGLL
- Arguments
lib (string) – The library to add.
cb (addToLibraryListCallback) – The callback function.
-
iObj.
retrCmdInfo
(cmd, lib="*LIBL", cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves information from a command definition object. IBM i API: QCDRCMDI
- Arguments
cmd (string) – The command name.
lib (string) – The library name.
cb (retrCmdInfoCallback) – The callback function.
-
iObj.
retrPgmInfo
(_pgm, lib="*LIBL", cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves information from a program object. IBM i API: QCLRPGMI
- Arguments
_pgm (string) – The program name.
lib (string) – The library name.
cb (retrPgmInfoCallback) – The callback function.
-
iObj.
retrSrvPgmInfo
(srvpgm, lib="*LIB", cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves information from a service program object. IBM i API: QBNRSPGM
- Arguments
srvpgm (string) – The service program name.
lib (string) – The library name.
cb (retrSrvPgmInfoCallback) – THe callback function.
-
iObj.
retrUserAuthToObj
(path, cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves information about the users who are authorized to an object. IBM i API: QSYRTVUA
- Arguments
path (string) – The absolute path to the object.
cb (retrUserAuthToObjCallback) – The callback function.
-
iObj.
retrUserInfo
(user, cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves information about a user profile. IBM i API: QSYRUSRI
- Arguments
user (string) – The user profile.
cb (retrUserInfoCallback) – The callback function.
-
iObj.
retrUsrAuth
(usr, type, obj, lib="*LIBL", cb)¶ Note
Deprecated: Will be removed in the next major version.
Retrieves a specific user’s authority for an object. IBM i API: QSYRUSRA
- Arguments
usr (string) – The name of the user whose object authority is returned.
type (string) – The type of object for which authority information is returned.
obj (string) – The object name.
lib (string) – The library name.
cb (retrUsrAuthCallback) – The callback function.
-
addToLibraryListCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (boolean|null) – This is true if successful or null when an error occurs.
-
retrUsrAuthCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrUsrAuthOutput|null) – This is an object if successful or null when an error occurs.
-
retrUsrAuthOutput
()¶ retrUsrAuth Output Object
- Arguments
Object_authority_/_Data_authority (string) –
Authorization_list_management (string) –
Object_operational (string) –
Object_management (string) –
Object_existence (string) –
Data_read (string) –
Data_add (string) –
Data_update (string) –
Data_delete (string) –
Authorization_list (string) –
Authority_source (string) –
Some_adopted_authority (string) –
Adopted_object_authority (string) –
Adopted_authorization_list_management (string) –
Adopted_object_operational (string) –
Adopted_object_management (string) –
Adopted_object_existence (string) –
Adopted_data_read (string) –
Adopted_data_add (string) –
Adopted_data_update (string) –
Adopted_data_delete (string) –
Adopted_data_execute (string) –
Adopted_object_alter (string) –
Adopted_object_reference (string) –
Data_execute (string) –
Object_alter (string) –
Object_reference (string) –
ASP_device_name_of_library (string) –
ASP_device_name_of_object (string) –
Offset_to_group_information_table (string) –
Number_of_group_table_entries_returned (string) –
-
retrCmdInfoCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrCmdInfoOutput|null) – This is an object if successful or null when an error occurs.
-
retrCmdInfoOutput
()¶ retrCmdInfo Output Object
- Arguments
Command_name (string) –
Command_library_name (string) –
Command_processing_program_or_proxy_target_command (string) –
Command_processing_program's_or_proxy_target_command's_library (string) – name
Source_file_name (string) –
Source_file_library_name (string) –
Source_file_member_name (string) –
Validity_check_program_name (string) –
Validity_check_program_library_name (string) –
Mode_information (string) –
Where_allowed_to_run (string) –
Allow_limited_user (string) –
Maximum_positional_parameters (string) –
Prompt_message_file_name (string) –
Prompt_message_file_library_name (string) –
Message_file_name (string) –
Message_file_library_name (string) –
Help_panel_group_name (string) –
Help_panel_group_library_name (string) –
Help_identifier (string) –
Search_index_name (string) –
Search_index_library_name (string) –
Current_library (string) –
Product_library (string) –
Prompt_override_program_name (string) –
Prompt_override_program_library (string) – name
Restricted_to_target_release (string) –
Text_description (string) –
Command_processing_program_call_state (string) –
Validity_check_program_call_state (string) –
Prompt_override_program_call_state (string) –
Offset_to_help_bookshelf_information (string) –
Length_of_help_bookshelf_information (string) –
Coded_character_set_ID_(CCSID) (string) –
Enabled_for_GUI_indicator (string) –
Threadsafe_indicator (string) –
Multithreaded_job_action (string) –
Proxy_command_indicator (string) –
Prompt_message_file_text_indicator (string) –
Object_authority_/_Data_authority (string) –
-
retrPgmInfoCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrPgmInfoOutput|null) – This is an object if successful or null when an error occurs.
-
retrPgmInfoOutput
()¶ retrPgmInfo Output Object
- Arguments
Program_name (string) –
Program_library_name (string) –
Program_owner (string) –
Program_attribute (string) –
Creation_date_and_time (string) –
Source_file_name (string) –
Source_file_library_name (string) –
Source_file_member_name (string) –
Source_file_updated_date_and_time (string) –
Observable_information (string) –
User_profile_option (string) –
Use_adopted_authority (string) –
Log_commands (string) –
Allow_RTVCLSRC (string) –
Fix_decimal_data (string) –
Text (string) – description
Type_of_program (string) –
Teraspace_storage-enabled_program (string) –
Minimum_number_of_parameters (string) –
Maximum_number_of_parameters (string) –
Program_size (string) –
Associated_space_size (string) –
Static_storage_size (string) –
Automatic_storage_size (string) –
Number_of_MI_instructions (string) –
Number_of_MI_ODT_entries (string) –
Program_state (string) –
Compiler_identification (string) –
Earliest_release_program_can_run (string) –
Sort_sequence_table_name (string) –
Sort_sequence_table_library (string) – name
Language_identifier (string) –
Program_domain (string) –
Conversion_required (string) –
Conversion_details (string) –
Optimization (string) –
Paging_pool (string) –
Update_program_automatic_storage_area_(PASA) (string) –
Clear_program_automatic_storage_area_(PASA) (string) –
Paging_amount (string) –
Program_entry_procedure_module (string) –
Program_entry_procedure_module_library (string) –
Activation_group_attribute (string) –
Observable_information_compressed (string) –
Run-time_information_compressed (string) –
Release_program_created_on (string) –
Shared_activation_group (string) –
Allow_update (string) –
Program_CCSID (string) –
Number_of_modules (string) –
Number_of_service_programs (string) –
Number_of_copyrights (string) –
Number_of_unresolved_references (string) –
Release_program_created_for (string) –
Allow_static_storage_reinitialization (string) –
All_creation_data (string) –
Allow_bound_*SRVPGM_library_name_update (string) –
Profiling_data (string) –
Teraspace_storage_enabled_modules (string) –
Storage_model (string) –
Uses_argument_optimization_(ARGOPT) (string) –
-
retrSrvPgmInfoCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrSrvPgmInfoOutput|null) – This is an object if successful or null when an error occurs.
-
retrSrvPgmInfoOutput
()¶ retrSrvPgmInfo Output Object
- Arguments
Service_program_name (string) –
Service_program_library_name (string) –
Service_program_owner (string) –
Service_program_attribute (string) –
Creation_date_and_time (string) –
Export_source_file_name (string) –
Export_source_file_library_name (string) –
Export_source_file_member_name (string) –
Activation_group_attribute (string) –
Current_export_signature (string) –
User_profile (string) –
Observable_information_compressed (string) –
Run-time_information_compressed (string) –
Service_program_CCSID (string) –
Number_of_modules (string) –
Number_of_service_programs (string) –
Number_of_copyrights (string) –
Text_description (string) –
Shared_activation_group (string) –
Allow_update (string) –
Number_of_unresolved_references (string) –
Use_adopted_authority (string) –
Allow_bound_*SRVPGM_library_name_update (string) –
Profiling_data (string) –
Teraspace_storage_enabled_modules (string) –
Storage_model (string) –
Uses_argument_optimization_(ARGOPT) (string) –
Service_program_state (string) –
Service (string) – program_domain
Associated_space_size (string) –
Static_storage_size (string) –
Service_program_size (string) –
Release_service_program_created_on (string) –
Earliest_release_service_program_can_run (string) –
Release_service_program_created_for (string) –
Allow_static_storage_reinitialization (string) –
Conversion_required (string) –
All_creation_data (string) –
Conversion_details (string) –
Paging_pool (string) –
Paging_amount (string) –
-
retrUserInfoCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrUserInfoOutput|null) – This is an object if successful or null when an error occurs.
-
retrUserInfoOutput
()¶ retrUserInfo Output Object
- Arguments
User_profile_name (string) –
Previous_sign-on_date_and_time (string) –
Sign-on_attempts_not_valid (string) –
Status (string) –
Password_change_date (string) –
No_password_indicator (string) –
Password_expiration_interval (string) –
Date_password_expires (string) –
Days_until_password_expires (string) –
Set_password_to_expire (string) –
Display_sign-on_information (string) –
Local_password_management (string) –
Block_password_change (string) –
-
retrUserAuthToObjCallback
(error, output)¶ - Arguments
error (Error|null) – the error object if an error occured or null.
output (retrUserAuthToObjOutput|null) – This is an object if successful or null when an error occurs.
-
retrUserAuthToObjOutput
()¶ retrUserAuthToObj Output Object
- Arguments
Profile_name (string) –
User_or_group (string) – indicator
Data_authority (string) –
Authorization_list_management (string) –
Object_management (string) –
Object_existence (string) –
Object_alter (string) –
Object_reference (string) –
Object_operational (string) –
Data_read (string) –
Data_add (string) –
Data_update (string) –
Data_delete (string) –
Data_execute (string) –
Examples¶
Retrieve a user’s authority to an object¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrUsrAuth('*PUBLIC', '*PGM', 'XMLCGI', 'QXMLSERV', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Retrieve command information¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrCmdInfo('CRTLIB', '*LIBL', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Retrieve program information¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrPgmInfo('XMLCGI', 'QXMLSERV', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Retrieve service program information
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrSrvPgmInfo('QZSRVSSL', 'QHTTPSVR', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Retrieve user information¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrUserInfo('QSYS', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Retrieve users authorized to an object¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.retrUserAuthToObj('/home', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});
Add a library to the library list¶
const { Connection, iObj } = require('itoolkit');
const connection = new Connection({
transport: 'ssh',
transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});
const obj = new iObj(connection);
obj.addToLibraryList('QHTTPSVR', (error, output) => {
if (error) {
throw error;
}
console.log(output);
});