ADIC Server User Manual

Adic server user manual
Table of Contents

Advertisement

Quick Links

The ADIC
Distributed AML Server
DAS V3.10E
Interfacing
Guide

Advertisement

Table of Contents
loading

Summary of Contents for ADIC Server

  • Page 1 The ADIC Distributed AML Server DAS V3.10E Interfacing Guide...
  • Page 2: Copyright Notice

    Further, ADIC Europe reserves the right to revise or change this publication without obligation on the part of ADIC Europe to notify any person or organization of such revision of change.
  • Page 3 21 Dec 2001...
  • Page 4 [Chapter Name] 601626-B...
  • Page 5: Table Of Contents

    Introduction Overview ............. . . 1-3 Intended Audience .
  • Page 6 Media Types ............2-7 DAS Error Codes .
  • Page 7 Return Values ............4-25 aci_drivestatus3 .
  • Page 8 aci_getVolserToSide ........... . . 4-70 Return Values .
  • Page 9 aci_scratch_info ............4-111 Return Values .
  • Page 10 das_force ............5-7 das_insert .
  • Page 11 Error Recovery Procedures ..........A-3 Terms .
  • Page 12 Contents 601626-B...
  • Page 13 Figure 2-1 Logical Relationship Between AML Components ....2-3 Figure 4-1 aci_barcode Function Call ........4-5 Figure 4-2 Example of the aci_barcode Function.
  • Page 14 Figure 4-22 aci_drivestatus4 Function Call ......4-29 Figure 4-23 Returned Status ......... . . 4-30 Figure 4-24 aci_drivestatus_one Function Call .
  • Page 15 Figure 4-55 Example of the aci_foreign Function......4-68 aci_getvolsertodrive Function Call ......4-68 Figure 4-56 Figure 4-57 aci_voltodrive_entry Structure .
  • Page 16 Figure 4-88 aci_qversion Function Call........4-97 Figure 4-89 Example of the aci_qversion Function .
  • Page 17 Figure 5-1 Example of a Generic aci_async_add() Function ....5-5 aci_async_add Function with the das_mount Parameter ..5-6 Figure 5-2 Figure 5-3 Example of the aci_async_add Function with the das_mount Parame-...
  • Page 18 Figures 601626-B...
  • Page 19 Table 2-1 Routines Available with Basic Service Access ....2-5 Table 2-2 Routines Available with Complete Service Access ....2-5 Table 2-3 Supported Media Types .
  • Page 20 Table 4-19 Parameters for the aci_eject2_complete Function Call... 4-52 Table 4-20 Parameters for the aci_eject3_complete Function Call... 4-55 Table 4-21 Parameters for the aci_ejectclean Function Call .
  • Page 21 Table 4-52 Parameters for the aci_view Function Call ....4-124 Table Types..........4-124 Table 4-53 Table 4-54 Table Attributes .
  • Page 22 xviii Tables 601626-B...
  • Page 23: Introduction

    Introduction Overview ............. . . 1-3 Intended Audience .
  • Page 24 Introduction 601626-B...
  • Page 25: Overview

    Overview Intended Audience Organization 21 Dec 2001 This guide contains information and instructions necessary to program an application for using the ADIC AML via the Distributed AML Server (DAS). The topics discussed in this chapter are: • Overview • Intended Audience •...
  • Page 26: Associated Documents

    Associated Documents Explanation of Symbols and Notes Introduction You may wish to reference the following documents: • 601324-A DAS V3.1 Release Guide • 601625-A DAS V3.1 Administration Guide The following symbols and highlighted passages draw attention to important information. Detailed explanations for the above symbols are provided in Hazard Alert Messages on page 3-3.
  • Page 27: Assistance

    Assistance 21 Dec 2001 If problems cannot be solved with the aid of this document or if recommended training is desired, contact the ADIC Technical Assistance Center (ATAC). ADIC 10949 East Peakview Avenue Englewood, CO 80112 U.S.A. • United States 1-800-827-3822 •...
  • Page 28 Introduction 601626-B...
  • Page 29 Overview ............. . . 2-3 DAS/2 .
  • Page 30: Das Aci

    DAS ACI 601626-B...
  • Page 31: Overview

    This section contains an overview of the DAS/2 software and information on AML Client Interface (ACI) services. DAS is a client/server software product designed to provide shared access to the family of ADIC AML systems (AMLs). The DAS software may be installed as a stand-alone AML connection or be configured to share an AML with MVS or other ADIC supported, host attachments.
  • Page 32: Aci Services

    ACI Services Client Services DAS ACI The DAS server component is an OS/2 program that runs within the AMU controller personal computer (PC). It converts DAS client requests into AMU AMS requests and sends them to the AMS for action. Fifty heterogeneous networked clients can be configured within the DAS server environment.
  • Page 33: Aci Routines - Basic Services

    Table 2-1 Routines Available with Basic Service Access Routine aci_dismount aci_init aci_initialize aci_mount Table 2-2 Routines Available with Complete Service Access Routine aci_barcode aci_cancel aci_dismount aci_cleandrive aci_clientaccess aci_clientstatus aci_driveaccess aci_drivestatus aci_drivestatus2 aci_drivestatus3 aci_eject 21 Dec 2001 ACI Routines - Basic Services Table 2-1 lists the routines that are available to an ACI client with basic service access rights.
  • Page 34: Table 4-17 Table

    Table 2-2 Routines Available with Complete Service Access Routine aci_eject2 aci_ejectclean aci_eject2_complete aci_flip aci_force aci_foreign aci_getvolsertodrive aci_getvolsertoside aci_init aci_initialize aci_insert aci_insert2 aci_inventory aci_list aci_mount aci_partial_inventory aci_qversion aci_qvolsrange aci_register DAS ACI Explanation Eject media from AML, and keep database entry for future insert requests. Eject clean media from AML, and remove database entry.
  • Page 35: Media Types

    Table 2-2 Routines Available with Complete Service Access Routine aci_robhome aci_robstat aci_scratch_get aci_scratch_info aci_scratch_set aci_scratch_unset aci_killamu aci_shutdown aci_switch aci_unload aci_view aci_volseraccess aci_volserstatus Media Types Table 2-3 Supported Media Types ACI Media Name ACI_3480 ACI_3590 ACI_4MM 21 Dec 2001 Explanation Set the AML-System to offline and move the robot to home position.
  • Page 36: Das Error Codes

    Table 2-3 Supported Media Types ACI Media Name ACI_8MM ACI_AUDIO_TAPE ACI_BETACAM ACI_BETACAML ACI_CD ACI_D2 ACI_DECDLT ACI_DTF ACI_OD_THIN ACI_OD_THICK ACI_TRAVAN ACI_VHS ACI_SONY_AIT ACI_LTO a. only IBM LTO media type is supported. DAS Error Codes DAS ACI DDS 8mm tape (e.g. EXABYTE) standard audio tape cartridges SONY BetaCAM cartridge large BetaCAM cartridge...
  • Page 37 Safety Overview ............. . . 3-3 Hazard Alert Messages .
  • Page 38 Safety 601626-B...
  • Page 39: Overview

    Persons Persons Material 21 Dec 2001 Knowledge and observance of these instructions is imperative for the safe operation of the ADIC Storage Systems AML system. Avoid danger when maintaining and operating the machine • behaving in a safety-conscious manner •...
  • Page 40 Table 3-1 Hazard Alert Message Symbol Damage to ... Material Caution Attention STATIC SENSITIVE Note Safety Signal Word Definition Potential electronic Static damaging situation Sensitive Tips for operators Note Important or useful information Specially emphasized paragraphs in this guide warn of danger or draw attention to important information.
  • Page 41: Validity

    Validity These instruction are valid for ADIC Storage Systems AML systems. Supplementary safety provisions for any components used on the machine are not invalidated by these instructions. Any other manufacturer's documentation forms part of the AML documentation. Validity 21 Dec 2001...
  • Page 42 Safety 601626-B...
  • Page 43 Overview ............. . . 4-5 aci_barcode .
  • Page 44 aci_drivestatus2_one ........... . . 4-34 Return Values .
  • Page 45 Return Values ............4-76 aci_insert2 .
  • Page 46 Return Values ............4-118 aci_snmp .
  • Page 47: Overview

    Overview aci_barcode #include "aci.h" int aci_barcode( Figure 4-1 aci_barcode Function Call Table 4-1 Parameters for the aci_barcode Function Call Parameter cRobNum Action 21 Dec 2001 All ACI function calls and ACI structures are defined in the aci.h header file. ACI functions return 0 or -1 for successful and unsuccessful command execution respectively.
  • Page 48: Return Values

    Return Values DAS ACI Functions The Scalar 1000 does not support the aci_barcode command (barcode on Scalar 1000 will never read on mount and eject). Use this command to switch the barcode reading after the command aci_mount, aci_cleandrive or any aci_eject ended with failure and derrno=EBARCODE.
  • Page 49: Aci_Cancel

    /* Switch the barcode reading off for robot 1 */ int rc = 0; char *cRobNum = "1"; char *Action = "OFF"; rc = aci_barcode( cRobNum, Action ); if( rc ) aci_perror( "Command failed: " ); else printf( "barcode reading switched off \n" );} Figure 4-2 Example of the aci_barcode Function aci_cancel...
  • Page 50: Return Values

    Example of the aci_cancel Function DAS ACI Functions The cancel request cancels the command in the DAS server and the AML. If the request is being acted upon in the AML, DAS attempts to cancel it, however this is unlikely to succeed.
  • Page 51: Aci_Cleandrive

    aci_cleandrive #include "aci.h" int aci_cleandrive( char *drive) Figure 4-5 aci_cleandrive Function Call Table 4-3 Parameter for the aci_cleandrive Function Call Parameter drive name of the drive to be cleaned Return Values 21 Dec 2001 The aci_cleandrive function mounts a cleaning cartridge to a specific drive.
  • Page 52 4-10 DAS ACI Functions • ERERTRYL • EINUSE • ECANCELLED • EDASINT • ECLEANING • ETIMEOUT • ESWITCHINPROG • EHICAPINUSE • EBARCODE • EINVALIDDEV • ENOROBOT • EDATABASE • ENOTSUPPHCMD • EAREAEMPTY • ENOPOOL • EPROBDEV • EBARCODE • EAREAFULL 601626-B...
  • Page 53: Aci_Clientaccess

    aci_clientaccess #include "aci.h" int aci_clientaccess( char *clientname, Figure 4-6 aci_clientaccess Function Call Table 4-4 Parameters for the aci_clientaccess Function Call Parameter clientname name of the client which authorization is to be changed action type of the activity (add or remove access rights) ACI_ADD ACI_DELETE volser_range...
  • Page 54: Return Values

    DAS is running. When DAS is shut down, all access modifications set by aci_clientaccess are lost. When the DAS server is restarted, client access returns to the default settings in the DAS configuration file.
  • Page 55 /* Add a volser range to a clients access list */ int rc = 0; enum aci_command action = ACI_ADD; /*default action*/ char *client = "SomeClient"; char *volser = "AAB000 - AAB999"; char *drive = ""; enum aci_media type = ACI_3590; if ((rc = aci_clientaccess ( client, aci_perror( "Command failed: "...
  • Page 56: Aci_Clientstatus

    aci_clientstatus #include "aci.h" int aci_clientstatus( char *clientname, Figure 4-8 aci_clientstatus Function Call struct aci_client_entry{ char clientname[ACI_NAME_LEN]; struct in_addr ip_addr; boolean avc; boolean complete_access; boolean dismount; char volser_range[ACI_MAX_RANGES][ACI_RANGE_LEN]; char drive_range[ACI_RANGE_LEN]; Figure 4-9 Returned Configuration Information 4-14 DAS ACI Functions The aci_clientstatus function queries client access list configuration.
  • Page 57: Return Values

    Table 4-5 Parameters for the aci_clientstatus Function Call Parameter clientname aci_client_entry Return Values 21 Dec 2001 Description name of the client which authorization is to be changed returned information to the requested client clientname requested client name in_addr 32-bit dotted decimal noted Internet Protocol (IP) address (true or false) Parameter “avoid volume contention”...
  • Page 58: Aci_Dismount

    /* Query some clients access list configuration */ int rc = 0; char *client = "SomeClient"; struct aci_client_entry client_entry; rc = aci_clientstatus ( client, &client_entry ); if( rc ) aci_perror( "Command failed: " ); Figure 4-10 Example of the aci_clientstatus Function aci_dismount #include "aci.h"...
  • Page 59: Return Values

    Return Values 21 Dec 2001 • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: • ERPC • EINVALID • ENOVOLUME • ENODRIVE • EPROBVOL •...
  • Page 60: Aci_Driveaccess

    /* Dismount volume from drive */ int rc = 0; enum aci_media type = ACI_3590; char *volser = "AAB001"; if (( rc = aci_dismount( volser, type ) )) aci_perror( "Dismount command failed: " ); else printf( "Dismount of %s successful.\n", volser Example of the aci_dismount Function Figure 4-12 aci_driveaccess...
  • Page 61: Table 4-24 Table

    Table 4-7 Parameters for the aci_driveaccess Function Call Parameter clientname client that has allocated the drive or wants to allocate the drive. Using SHARED_ACCESS as a key word for the client name when requesting a drive reservation causes that drive to be shared with other clients.
  • Page 62: Return Values

    Return Values /* Allocate a drive for client use */ int rc = 0; char *client = "SomeClient"; char *drive = "Drive1"; enum aci_drive_status status; status = ACI_DRIVE_UP; if (( rc = aci_driveaccess( client, drive, status ) )) aci_perror( "Drive allocation failed: " ); else printf( "Allocation of %s for %s successful\n", Example of the aci_driveaccess Function...
  • Page 63: Aci_Drivestatus

    aci_drivestatus #include "aci.h" int aci_drivestatus( char *clientname, struct aci_drive_entry *pstDriveEntry[ACI_MAX_DRIVE_ENTRIES]) Figure 4-15 aci_drivestatus Function Call struct aci_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname[ACI_NAME_LEN]; char volser [ACI_VOLSER_LEN]; bool_t cleaning; short clean_count; Figure 4-16 Returned Status 21 Dec 2001 The aci_drivestatus function queries status of up to 15 drives.
  • Page 64: Return Values

    Return Values aci_drivestatus2 #include "aci.h" int aci_drivestatus2( char *clientname, struct aci_drive_entry *pstDriveEntry[ACI_MAX_DRIVE_ENTRIES2]) Figure 4-17 aci_drivestatus2 Function Call 4-22 DAS ACI Functions • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: •...
  • Page 65 struct aci_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname[ACI_NAME_LEN]; char volser [ACI_VOLSER_LEN]; bool_t cleaning; short clean_count; Returned Status Figure 4-18 Table 4-8 Parameters for the aci_drivestatus2 Function Call Parameter clientname 21 Dec 2001 See Table 4-8 for a description of the parameters for the aci_drivestatus2 function call.
  • Page 66: Table 4-26 Table

    Table 4-8 Parameters for the aci_drivestatus2 Function Call Parameter aci_drive_entry 4-24 DAS ACI Functions Description returned information about the status of the drives drive_name name of the drive (name used in DAS and AMS description) amu_drive_name internal AMS drive name e.g. 03 or ZZ drive_state UP or DOWN reservation of the...
  • Page 67: Return Values

    Return Values 21 Dec 2001 • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: • ERPC • EINVALID • ETIMEOUT • ESWITCHINPROG • EBADCLIENT Refer to Figure 4-19 on page 4-26 for an example of the aci_drivestatus2 function.
  • Page 68: Aci_Drivestatus3

    /* Get drive status information for some client */ int rc = 0; int i = 0; char *client = "SomeClient"; struct aci_drive_entry *drive_entry[ACI_MAX_DRIVE_ENTRIES2]; (( rc = aci_drivestatus2( client, drive_entry ) )) aci_perror( "listd failed" ); else printf("Drive status request for client: for (i = 0;...
  • Page 69 #include "aci.h" init aci_drivestatus3 ( char *clientname, struct aci_ext_drive_entry *pstDriveEntry[]) Figure 4-20 aci_drivestatus3 Function Call struct aci_ext_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char volser[ACI_VOLSER_LEN]; bool_t cleaning short clean_count int mount int keep Figure 4-21 Returned Status Table 4-9 Parameters for the aci_drivestatus3 Function Call...
  • Page 70 Table 4-9 Parameters for the aci_drivestatus3 Function Call Parameter aci_drive_entry 4-28 DAS ACI Functions Description returned information about the status of the drives drive_name name of the drive (name used in DAS and AMS description) amu_drive_name internal AMS drive name e.g. 03 or ZZ drive_state UP or DOWN reservation of the...
  • Page 71: Return Values

    Return Values aci_drivestatus4 #include "aci.h" init aci_drivestatus4 ( char *clientname, char *drive struct aci_ext_drive_entry4 aci_drivestatus4 Function Call Figure 4-22 21 Dec 2001 • 0: The call was successful • -1: The call has failed The external variable d_errno is set to one of the following DAS error codes: •...
  • Page 72 struct aci_ext_drive_entry4 { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname[ACI_NAME_LEN]; char volser[ACI_VOLSER_LEN]; bool_t cleaning; short clean_count; int mount; int keep; char serial_number[ACI_SERIAL_NUMBER_LEN]; Figure 4-23 Returned Status Table 4-10 Parameters for the aci_drivestatus4 Function Call Parameter clientname drive...
  • Page 73: Return Values

    Table 4-10 Parameters for the aci_drivestatus4 Function Call Parameter Return Values 21 Dec 2001 Description drive_state UP or DOWN reservation of the drive Refer to aci_driveaccess on page 4-18 type type of the drive (internal AMS code, e.g. E for DLT drive) (See the AMU Reference Guide) system_id empty, reserved for further use...
  • Page 74: Aci_Drivestatus_One

    aci_drivestatus_one #include "aci.h" init aci_drivestatus_one ( char *clientname, char *drive struct aci_drive_entry *pstDriveEntry[ACI_MAX_DRIVE_ENTRIES] Figure 4-24 aci_drivestatus_one Function Call struct aci_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname char volser[ACI_VOLSER_LEN]; bool_t cleaning short clean_count Figure 4-25 Returned Status 4-32...
  • Page 75: Return Values

    Table 4-11 Parameters for the aci_drivestatus_one Function Call Parameter clientname aci_drive_entry Return Values 21 Dec 2001 See Table 4-11 for an explanation of the parameters used for the aci_drivestatus_one function. Description name of the client that requested the status of the drives.
  • Page 76: Aci_Drivestatus2_One

    aci_drivestatus2_one #include "aci.h" init aci_drivestatus2_one ( char *clientname, char *drive struct aci_drive_entry *pstDriveEntry[ACI_MAX_DRIVE_ENTRIES2] Figure 4-26 aci_drivestatus_2_one Function Call struct aci_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname char volser[ACI_VOLSER_LEN]; bool_t cleaning short clean_count Figure 4-27 Returned Status 4-34...
  • Page 77: Return Values

    Table 4-12 Parameters for the aci_drivestatus2_one Function Call Parameter clientname aci_drive_entry Return Values 21 Dec 2001 See Table 4-12 for an explanation of the parameters used for the aci_drivestatus2_one function. Description name of the client that requested the status of the drives.
  • Page 78: Aci_Drivestatus3_One

    aci_drivestatus3_one #include "aci.h" init aci_drivestatus3_one ( char *clientname, char *drive struct aci_drive_entry *pstDriveEntry[ACI_MAX_DRIVE_ENTRIES2] Figure 4-28 aci_drivestatus_3_one Function Call struct aci_drive_entry { char drive_name[ACI_DRIVE_LEN]; char amu_drive_name[ACI_AMU_DRIVE_LEN]; enum aci_drive_status drive_state; char type; char system_id[ACI_NAME_LEN]; char clientname char volser[ACI_VOLSER_LEN]; bool_t cleaning short clean_count Figure 4-29 Returned Status 4-36...
  • Page 79: Return Values

    Table 4-13 Parameters for the aci_drivestatus3_one Function Call Parameter clientname aci_drive_entry Return Values 21 Dec 2001 See Table 4-13 for an explanation of the parameters used for the aci_drivestatus3_one function. Description name of the client that requested the status of the drives.
  • Page 80: Aci_Eif_Conf

    aci_eif_conf #include "aci.h" int aci_eif_conf( struct aci_lora *lora_desc, Figure 4-30 aci_eif_conf Function Call struct aci_lora { char lora_name[ACI_AREANAME_LEN]; char StartCoord[ACI_COORD_LEN]; char EndCoord[ACI_COORD_LEN]; char ctype char description[ACI_DESCRIPTION_LEN]; Figure 4-31 Returned Status 4-38 DAS ACI Functions • ERPC • EINVALID • ETIMEOUT •...
  • Page 81: Return Values

    Table 4-14 Parameters for the aci_eif_conf Function Call Parameter aci_lorta structure used to describe the import/export area and addressing lora_name StartCoord EndCoord ctype description nCount the number of returned status (maximum of 300) Return Values aci_eject #include "aci.h" int aci_eject( char *eject_area, Figure 4-32 aci_eject Function Call 21 Dec 2001...
  • Page 82: Return Values

    Table 4-15 Parameters for the aci_eject Function Call Parameter clientname eject_area volser_ranges types Return Values 4-40 DAS ACI Functions Eject the volumes in volser_range to the eject_area. The media type of the volumes must match that of the eject_area. Set type to the media type of the volser_range.
  • Page 83 int rc = 0; rc = aci_eject( "E01", "AAB001", ACI_3590 ); if( rc ) aci_perror( "Command failed: " ); else printf( "Volser AAB001 ejected to E01 \n" ); Figure 4-33 Example of the aci_eject Function 21 Dec 2001 • ENOVOLUME •...
  • Page 84: Aci_Eject2

    aci_eject2 #include "aci.h" int aci_eject2( char *eject_area, Figure 4-34 aci_eject2 Function Call struct aci_ei_info { char volser[ACI_VOLSER_LEN]; char media_type[ACI_DRIVE_LEN]; int errcode Figure 4-35 Structure of the aci_ei_info function from aci.h Table 4-16 Parameters for the aci_eject2 Function Call Parameter eject_area volser_range type pnActualCount...
  • Page 85: Return Values

    Table 4-16 Parameters for the aci_eject2 Function Call Parameter aci_ei_info returned information on each volser ejected volser type errcodes Return Values 21 Dec 2001 Description volser of the ejected volume media type of the named volser Refer to Media Types on page 2-7 error code derrno If the eject area is full, the system stops the eject procedure.
  • Page 86 4-44 DAS ACI Functions • ENOTAUTH • EBADCLIENT • ERETRYL • EINUSE • ECANCELED • EDASINT • ENOMATCH • ETIMEOUT • ESWITCHINPROG • EHICAPINUSE • ECOORDINATE • EBARCODE • EINVALIDDEV • ENOROBOT • EDATABASE • ENOTSUPPHCMD • EAREAEMPTY • EBARCODE •...
  • Page 87 /* Eject volume but reserve archive location */ int rc, i, pnActualCount; char *volser_range = "000815 - 004711"; char *eject_area = "E02" struct aci_ei_info ei_info[ACI_EI_MAX_RANGE]; rc = aci_eject2( eject_area, volser_range, ACI_3590 &pnActualCount, &ei_info ); if( rc ) aci_perror( "Command failed: " ); else printf("Volume ejects request successful\n"...
  • Page 88: Aci_Eject3

    aci_eject3 #include "aci.h" int aci_eject3( char *eject_area, Figure 4-37 aci_eject3 Function Call struct aci_ei_info { char volser[ACI_VOLSER_LEN]; char media_type[ACI_DRIVE_LEN]; int errcode Figure 4-38 Structure of the aci_ei_info function Table 4-17 Parameters for the aci_eject3 Function Call Parameter eject_area volser_range type 4-46 DAS ACI Functions The aci_eject3 function ejects a range of volumes from the...
  • Page 89: Return Values

    Table 4-17 Parameters for the aci_eject3 Function Call Parameter pnActualCount returned number of ejected volsers aci_ei_info returned information on each volser ejected volser type errcodes Return Values 21 Dec 2001 Description volser of the ejected volume media type of the named volser Refer to Media Types on page 2-7 error code derrno If the eject area is full, the system stops the eject procedure.
  • Page 90 4-48 DAS ACI Functions • ENOAREA • ENOTAUTH • EBADCLIENT • ERETRYL • EINUSE • ECANCELED • ENOMATCH • ETIMEOUT • ESWITCHINPROG • EHICAPINUSE • ECOORDINATE • EBARCODE • EINVALIDDEV • ENOROBOT • EDATABASE • ENOTSUPPHCMD • EAREAEMPTY • EBARCODE •...
  • Page 91: Aci_Eject_ Complete

    aci_eject_ complete #include "aci.h" int aci_eject_complete( char *eject_area, Figure 4-39 aci_eject_complete function call Table 4-18 Parameters for the aci_eject_complete Function Call Parameter eject_area Logical area defined in AMS, where the cartridges should be ejected volser_range • a single volser • multiple volsers separated by commas •...
  • Page 92: Return Values

    Return Values 4-50 DAS ACI Functions • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: • ERPC • EINVALID • ENOVOLUME • EPROBVOL • EAMU •...
  • Page 93 /* Eject volume from archive and free storage position. int rc = 0; rc = aci_eject_complete("E01", "AAB001", ACI_3590 ); if( rc ) aci_perror( "Command failed:" ); else printf( "Volser AAB001 ejected to E01 \n" ); Figure 4-40 Example of the aci_eject_complete Function aci_eject2_complete #include "aci.h"...
  • Page 94 Table 4-19 Parameters for the aci_eject2_complete Function Call Parameter eject_area volser_range type pnActualCount aci_ei_info 4-52 DAS ACI Functions See Table 4-19 for a description of the parameters for the aci_eject2_complete function call. Description logical area defined in AML, where the cartridges should be ejected •...
  • Page 95: Aci_Eject2_Complete

    Return Values 21 Dec 2001 • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: • ERPC • EINVALID • ENOVOLUME • EPROBVOL • EAMU •...
  • Page 96: Aci_Eject3_Complete

    /* Eject volume complete from AML system*/ int rc, i, pnActualCount; char *volser_range = "000815 - 004711"; char *eject_area = "E02" struct aci_ei_info ei_info[ACI_EI_MAX_RANGE] ; rc = aci_eject2_complete( eject_area, volser_range, ACI_3590, & pActualCount, &ei_info ); if( rec ) aci_perror( "Command failed: " ); else printf("Volume ejects request successful\n"...
  • Page 97 struct aci_ei_info { char volser[ACI_VOLSER_LEN]; char media_type[ACI_DRIVE_LEN]; int errcode Figure 4-45 Structure of the aci_ei_info function Table 4-20 Parameters for the aci_eject3_complete Function Call Parameter eject_area volser_range type pnActualCount aci_ei_info 21 Dec 2001 The volser_range field has a maximum size of 512 bytes. See Figure 4-45 for the structure of the aci_ei_info function.
  • Page 98: Return Values

    Return Values 4-56 DAS ACI Functions The attribute of the coordinate will be set to empty in the AMU database. The volser will be set to 0000000000000000, but the type will remain unchanged. The compartment is ready for the other volsers. For additional information, refer to aci_insert on page 4-75, and aci_eject2 on page 4-42.
  • Page 99: Aci_Ejectclean

    aci_ejectclean #include "aci.h" int aci_ejectclean( char *areaname, Figure 4-46 aci_ejectclean Function Call struct aci_ei_info { char volser[ACI_VOLSER_LEN]; char media_type[ACI_DRIVE_LEN]; int errcode Figure 4-47 Structure of the aci_ei_info function from aci.h Table 4-21 Parameters for the aci_ejectclean Function Call Parameter areaname Cleanpoolname pnActualCount 21 Dec 2001...
  • Page 100: Return Values

    Table 4-21 Parameters for the aci_ejectclean Function Call Parameter aci_ei_info Return Values 4-58 DAS ACI Functions Description returned information to each ejected volser volser volser of the ejected volume type media type of the named volser Refer to Media Types on page 2-7 errcode error code derrno If the eject area is full the system stops the eject procedure.
  • Page 101 21 Dec 2001 • EBADCLIENT • ERETRYL • EINUSE • ECANCELED • EDASINT • ENOMATCH • ETIMEOUT • ESWITCHINPROG • ENOPOOL • EAREAFULL • EHICAPINUSE • ECOORDINATE • EBARCODE • EINVALIDDEV • ENOROBOT • EDATABASE • ENOTSUPPHCMD • EAREAEMPTY • EBARCODE •...
  • Page 102: Aci_Email

    /* Eject clean cartridges from AML system*/ int res, i, pnActualCount; char *Cleanpoolname = "CLP01"; char *areaname = "E02" struct aci_ei_info *ei_info[ACI_EI_MAX_RANGE]; res = if( rec ) aci_perror( "Command failed: " ); else printf("Volume ejects request successful\n" ); for (i = 0; i < ACI_EI_MAX_RANGE; i++) if ( *ei_info[i]->volser == '\0' ) printf( "volser:%s media type:%s Error:%d\n", Figure 4-48...
  • Page 103: Return Values

    Table 4-22 Parameter for the aci_email Function Call Parameter A non-empty email address of no more than 64 characters defines the email message of no more than 255 characters Return Values aci_flip #include "aci.h" int aci_flip( char *drive) aci_flip Function Call Figure 4-50 21 Dec 2001 Description...
  • Page 104: Return Values

    Table 4-23 Parameter for the aci_flip Function Call Parameter drive name of the optical disk drive for the flip operation Return Values 4-62 DAS ACI Functions Description • 0: The call was successful. • -1: The call failed. The external variable d_errno is set to one of the following DAS error codes: •...
  • Page 105 /* Flip a volume in a optical disk drive */ int rc = 0; char *drive = "od01"; if (( rc = aci_flip( drive ) )) aci_perror( "Flip command failed: " ); else printf("Flip of in drive %s successful completed.\n", drive ); Figure 4-51 Example of the aci_flip Function 21 Dec 2001...
  • Page 106: Aci_Force

    aci_force #include "aci.h" int aci_force( char *drive ) Figure 4-52 aci_force Function Call Table 4-24 Parameter for the aci_force Function Call Parameter drive Return Values 4-64 DAS ACI Functions The aci_force function dismounts any cartridge from a specific drive. See Figure 4-52. Force a dismount from a drive named drive, regardless of which volser is in the drive.
  • Page 107 /* Dismount any volume from drive */ int rc = 0; rc = aci_force( "Drive1" ); if( rc ) aci_perror( "Command failed: " ); else printf( "Dismount of Drive1 successful.\n" ); Figure 4-53 Example of the aci_force Function 21 Dec 2001 •...
  • Page 108: Aci_Foreign

    aci_foreign #include "aci.h" int aci_foreign( enum aci_command action, aci_foreign Function Call Figure 4-54 Table 4-25 Parameters for the aci_foreign Function Call Parameter action volser type coordinate 4-66 DAS ACI Functions The aci_foreign function catalogs a foreign volume. See Figure 4-54. char *volser, enum aci_media type, char *coordinate,...
  • Page 109: Return Values

    Table 4-25 Parameters for the aci_foreign Function Call Parameter position Return Values 21 Dec 2001 Descriptions reserved for compatibility, not used This version does not have a command to display occupied symbolic volsers. Please note this assignment; the symbolic volser will be needed for the rmf command. For additional information, refer to aci_dismount on page 4-16, and aci_mount on page 4-91.
  • Page 110: Aci_Getvolsertodrive

    /* Add foreign media to DAS catalog */ int rc = 0; enum aci_media type = ACI_3590; char *volser = "FOR001"; char *coord = "E301010310"; short pos = 0; if ((rc = aci_foreign(ACI_ADD, volser, type, aci_perror("Foreign media location failed: "); else printf("Foreign volser %s added.\n", volser);...
  • Page 111: Return Values

    struct aci_voltodrive_entry{ char Drive[ACI_DRIVE_LEN]; char VolserRange[ACI_RANGE_LEN]; Figure 4-57 aci_voltodrive_entry Structure Table 4-26 Parameters for the aci_getvolsertodrive Function Call Parameter Drive aci_voltodrive_entry Return Values 21 Dec 2001 See Table 4-26 for a description of the parameters for the aci_getvolsertodrive function call. Description name of the drive, that the reserved volsers requested number of reported entries...
  • Page 112: Aci_Getvolsertoside

    /* Display volumes reserved for a drive*/ int rc, i, num; char *Drive = "Drive1"; struct aci_voltodrive_entry *drive_inf[ACI_MAX_RANGES]; rc = aci_getvolsertodrive( Drive, num, drive_inf); if( rc ) aci_perror( "Command failed: " ); else for (i = 0; i < ACI_MAX_RANGES; i++) if ( *drive_inf[i]->volser == '\0' ) printf( "drive:%s Volser Range%d\n", Figure 4-58...
  • Page 113: Return Values

    struct aci_sideinfo { char char Structure of Type aci_sideinfo Figure 4-60 Table 4-27 Parameters for the aci_getvolsertoside Function Call Parameter volser aci_sideinfo Return Values 21 Dec 2001 cVolumeSide; szVolser[ACI_VOLSER_LEN]; The define ‘ACI_SIDE_NUMBER’ parameter is set, in aci.h, to 2. See Table 4-27. Description name of the volser, for which information is requested information returned for the selected volser...
  • Page 114: Aci_Init

    Normally this call can be placed in the initialization of the client code. This function requests that the DAS server dismount any occupied drives defined to the requesting client.
  • Page 115: Return Values

    Return Values /* Initialize client and free drive resources */ int rc = 0; rc = aci_init( ); if( rc ) aci_perror( "ACI failed initialization:" ); Figure 4-63 Example of the aci_init Function 21 Dec 2001 • 0: The call was successful. •...
  • Page 116: Aci_Initialize

    aci_initialize #include "aci.h" int aci_initialize( void ) Figure 4-64 aci_initialize Function Call Return Values /* Initialize client, do not change drive state */ int rc = 0; rc = aci_initialize( ); if( rc ) aci_perror( "ACI failed initialization:" ); Figure 4-65 Example of the aci_initialize Function 4-74 DAS ACI Functions...
  • Page 117: Aci_Insert

    aci_insert #include "aci.h" int aci_insert( char *insert_area, Figure 4-66 aci_insert Function Call Table 4-28 Parameters for the aci_insert Function Call Parameter insert_area Logical insert range of the Insert/Eject unit of the AML in the AMS (e.g. I03) volser_range The volumes found in the insert_area are returned in the volser_ranges array of strings, where each volser is separated by a comma.
  • Page 118: Return Values

    Return Values 4-76 DAS ACI Functions Use the insert2 function instead of this command. This function experiences difficulties with large I/O units with long volsers (16-digit) since the buffer for displaying the inserted volser is restricted. For compatibility reasons this function continues to be supported.
  • Page 119: Aci_Insert2

    /* Insert media into AML */ int rc, i; enum aci_media type = ACI_3590; char *area_name = "I01"; char *volser_ranges[ACI_MAX_RANGES]; rc = aci_insert(area_name, volser_ranges, &type); if( rc ) aci_perror("Command failed: "); else for (i = 0; i < ACI_MAX_RANGES; i++) if (*volser_ranges[i] == '\0') break;...
  • Page 120 struct aci_ei_info { char char int errcode aci_ei_info Structure from aci.h Figure 4-69 Table 4-29 Parameters for the aci_insert2 Function Call Parameter insertopt areaname cleanPoolname pnActualCount 4-78 DAS ACI Functions • Volsers which already have a entry in the AMU database, will be moved to this position.
  • Page 121: Return Values

    Table 4-29 Parameters for the aci_insert2 Function Call Parameter aci_ei_info Return Values 21 Dec 2001 Description returned information on each volser ejected volser volser of the ejected volume type media type of the named volser Refer to Media Types on page 2-7 errcodes error code derrno •...
  • Page 122 /* insert clean volume in the AML system*/ int res, i, pnActualCount; char *cleanPoolname = "CLP01"; char *areaname = "I02" struct aci_ei_info *pstEiInfo[ACI_EI_MAX_RANGE]; res = aci_insert2( "-c", areaname, cleanPoolname, if( rec ) aci_perror( "Command failed: " ); else printf("Volume insert request successful\n" ); for (i = 0;...
  • Page 123: Aci_Inventory

    aci_inventory #include "aci.h" int aci_inventory( void ) Figure 4-71 aci_inventory Function Call Attention Return Values 21 Dec 2001 The aci_inventory function performs a physical inventory of the AML. See Figure 4-71. This command instructs the robot to perform a physical inventory of the archive and to update the database.
  • Page 124: Aci_Killamu

    /* Inventory the AML */ int rc = 0; rc = aci_inventory( ); if( rc ) aci_perror( "Command failed:" ); Figure 4-72 Example of the aci_inventory Function aci_killamu #include "aci.h" int aci_killamu(void) Figure 4-73 aci_killamu Function Call Attention 4-82 DAS ACI Functions •...
  • Page 125: Return Values

    Return Values /* Shutdown of the AMU */ int rc = 0; rc = aci_killamu( ); if( rc ) aci_perror( "Shutdown of AMU PC failed:" ); Figure 4-74 Example of the aci_killamu Function 21 Dec 2001 • 0: The call was successful. •...
  • Page 126: Aci_List

    aci_list #include "aci.h" int aci_list( char *clientname, struct aci_req_entry Figure 4-75 aci_list Function Call struct aci_req_entry { u_long request_no; u_long individ_no; char clientname[ACI_NAME_LEN]; char req_type[ACI_REQTYPE_LEN + 1]; Example of the Returned Structure Figure 4-76 4-84 DAS ACI Functions The aci_list function lists outstanding requests for a client. See Figure 4-75.
  • Page 127 Table 4-30 Parameters for the aci_list Function Call Parameter clientnamet aci_req_entry Table 4-31 Explanation of the Req_types req_types BACO switch barcode reading on or off (aci_barcode) EJCL eject of cleaning cartridges (aci_ejectclean) INCL insert media from I/O unit with aci_insertgen INVT insert media from I/O with aci_insert KEEP...
  • Page 128: Return Values

    Return Values /* List outstanding client requests */ int rc, i; char *client = "SomeClient"; struct aci_req_entry *requests[ACI_MAX_REQ_ENTRIES]; if ( rc = aci_list( client, requests ) ) aci_perror( "Command failed: " ); else printf ("List for client %s successful\n", for (i=0;(i<ACI_MAX_REQ_ENTRIES)&&(requests[i]- >request_no!=0);i++) printf("client = %s\n\trequest = %u\n\tindivid_no = %ld\n"...
  • Page 129: Aci_List2

    aci_list2 #include "aci.h" int aci_list2( char *clientname, struct aci_req_entry2 *req_status[]) Figure 4-78 aci_list2 Function Call struct aci_req_entry2 { u_long request_no; u_long individ_no; char clientname[ACI_NAME_LEN]; char req_type[ACI_REQTYPE_LEN2 + 1]; char Volser[ACI_VOLSER_LEN]; char Drive[ACI_DRIVE_LEN]; char AreaName[ACI_AREANAME_LEN]; char PoolName[ACI_POOLNAME_LEN]; char VolserRange[ACI_RANGE_LEN]; char StartCoord[ACI_COORD_LEN]; char EndCoord[ACI_COORD_LEN];...
  • Page 130: Table 4-42 Table

    Table 4-32 Parameters for the aci_list2 Function Call Parameter clientname aci_req_entry2 Table 4-33 Explanation of the Req_types req_types BACO switch barcode reading on or off (aci_barcode) EJCL eject of cleaning cartridges (aci_ejectclean) INCL insert media from I/O unit with aci_insertgen INVT insert media from I/O with aci_insert KEEP...
  • Page 131: Return Values

    Table 4-33 Explanation of the Req_types req_types PINV Complete archive inventory and database update (aci_inventory) PRGE Delete a command from the command list (aci_cancel) SHUT Shutdown off the complete AMU (aci_killamu) Return Values aci_list_foreign #include "aci.h" int aci_list_foreign( char *volser, Figure 4-80 aci_list_foreign Function Call 21 Dec 2001...
  • Page 132: Return Values

    struct aci_foreign_desc { char volser[ACI_VOLSER_LEN]; char coord[ACI_COORD_LEN]; enum aci_media_type eType; char attrib Figure 4-81 Example of the Returned Structure Table 4-34 Parameters for the aci_list_foreign Function Call Parameter volser coord aci_media_type attrib Return Values 4-90 DAS ACI Functions Refer to Table 4-34 for a description of the parameters for the aci_list_foreign function call.
  • Page 133: Aci_Mount

    aci_mount #include "aci.h" int aci_mount( char *volser, Figure 4-82 aci_mount Function Call Table 4-35 Parameters for the aci_mount Function Call Parameter volser Volser which should be mounted (also foreign volser possible after the cataloging with carf) type Media type of the named volser Refer to Media Types on page 2-7 drive Name of the drive which should be mounted.
  • Page 134 4-92 DAS ACI Functions • EDRVOCCUPIED • EPROBVOL • EAMU • EAMUCOMM • EROBOTCOMM • EDASINT • EDEVEMPTY • ENOTAUTH • EUPELSE • EBADCLIENT • ERETRYL • EINUSE • ENOTFOUND • ECANCELLED • EDASINT • ENOMATCH • ECLEANING • ETIMEOUT •...
  • Page 135: Aci_Partial_Inventory

    /* Mount volume in specific drive */ int rc = 0; rc = aci_mount( "AAB001", ACI_3590, "Drive2" ); if( rc ) aci_perror( "Command failed:" ); else printf( "Mount of %s successful.\n", volser ); Figure 4-83 Example of the aci_mount Function aci_partial_inventory #include "aci.h"...
  • Page 136 Table 4-36 Parameters for the aci_partial_inventory Function Call Parameter SourCoor TargetCoor Attention 4-94 DAS ACI Functions Description 10 digit logical coordinate of the device for the start of the inventory (defined in the AMU database), e.g. L501010101 10 digit logical coordinate of the device for the end of the inventory (defined in the AMU database), e.g.
  • Page 137: Return Values

    Return Values /* Partial Inventory in AML */ int rc = 0; rc =aci_partial_inventory("L501010101", L501011310"); if( rc ) aci_perror( "Command failed:" ); else printf( "Inventory started successful.\n"); Figure 4-85 Example of the aci_partial_inventory Function 21 Dec 2001 • 0: The call was successful. •...
  • Page 138: Table 4-46 Table

    The aci_perror function writes an error message to the standard error device, describing the last error encountered. The error message is either returned by the DAS server, or if not available, the error message is selected according to the value stored in d_errno.The parameter error_prefix is attached to the message.
  • Page 139: Aci_Qversion

    aci_qversion #include "aci.h" int aci_qversion( char *aciver, Figure 4-88 aci_qversion Function Call Table 4-38 Parameters for the aci_qversion Function Call Parameter aciver displays the release of the used ACI (function library), e.g. 3.01 dasver displays the release of the used DAS software on the AMU, e.g. 3.01 Return Values 21 Dec 2001...
  • Page 140: Aci_Qvolsrange

    /* Check DAS and ACI version */ rc = 0; char szACIVersion[ ACI_MAX_VERSION_LEN ] = ""; char szDASVersion[ ACI_MAX_VERSION_LEN ] = ""; if( ( rc = aci_qversion( (char *) &szACIVersion, (char *) &szDASVersion ) ) ) aci_perror("Version request failed: "); else printf("DAS-Version : %s\n", szDASVersion );...
  • Page 141 Archive Catalog with aci_qvolsrange listed volsers Figure 4-91 Amount of Listed Volsers struct aci_volserinfo { char volser[ACI_VOLSER_LEN]; enum aci_media media_type; char attrib; Figure 4-92 Structure for the aci_volserinfo Table 4-39 Parameters for the aci_qvolsrange Function Call Parameter startvolser endvolser num_of_requested_volser client_name 21 Dec 2001 Volser Ranges defined for Client...
  • Page 142 Table 4-39 Parameters for the aci_qvolsrange Function Call Parameter number_of_returned_volser aci_volserinfo Table 4-40 Explanation of the Attrib Values Name ACI_VOLSER_ATTRIB_ MOUNTED ACI_VOLSER_ATTRIB_ EJECTED ACI_VOLSER_ATTRIB_ OCCUPIED ACI_VOLSER_ATTRIB_ UNDEFINED ACI_VOLSER_ATTRIB_ EMPTY ACI_VOLSER_ATTRIB_ REVERSESIDEMOUNTED ACI_VOLSER ATTRIB_ JUKEBOX ACI_VOLSER_ATTRIB_ INITIAL 4-100 DAS ACI Functions number of the volsers actually found in the range volser...
  • Page 143: Return Values

    Table 4-40 Explanation of the Attrib Values Name ACI_VOLSER_ATTRIB_ TEMP_HERE ACI_VOLSER_ATTRIB_ TEMP_AWAY Return Values 21 Dec 2001 attrib Explanation temp here (slot occupied, medium in the problem box) temp away (medium temporarily not at the specified coordinates, in transit on AML/2 with double robotic controller systems) •...
  • Page 144 /* Query volser range */ rc = 0; char szBeginVolser[ ACI_VOLSER_LEN ] = ""; char szEndVolser char szClient nCount = ACI_MAX_QUERY_VOLSRANGE; nActualCount = 0; nFor; struct aci_volserinfo stVolsRange[ nCount ]; rc = aci_qvolsrange((char *) &szBeginVolser, if( rc == -1 ) aci_perror("Command failed: ");...
  • Page 145 • remove a client profile When the DAS server is shut down, the change is lost. To permanently create, modify or delete a client, the administrator must edit the definition in the DAS configuration file. See Table 4-41.
  • Page 146: Return Values

    Table 4-41 Parameters for the aci_register Function Call Parameter complete dismount Return Values 4-104 DAS ACI Functions Description true or false option avoid volume contention (Refer to the DAS Administration Guide) true or false selection between basic or complete command set (Refer to Client Services on page 2-4) true or false optional dismount;...
  • Page 147: Aci_Register

    /* Modify existing client configuration */ int rc =0; char *client = "SomeClient"; char * ipname = "CLIENT1"; enum aci_command action; short avc; short c; short dism; int i, j; struct aci_client_entry client_entry; rc = aci_clientstatus (client, &client_entry); if ( !rc ) action = ACI_MODIFY;...
  • Page 148: Return Values

    aci_robhome #include "aci.h" int aci_robhome(char *szRobot) aci_robhome Function Call Figure 4-96 Table 4-42 Parameter for the aci_robhome Function Call Parameter szRobot Return Values 4-106 DAS ACI Functions The aci_robhome function sets the robot (accessor in Scalar 1000) in the AML to off-line and moves it to the home position. See Figure 4-96.
  • Page 149: Aci_Robstat

    /* Robot Homing */ int rc = 0; rc =aci_robhome("R1"); if( rc ) aci_perror( "Command failed:" ); else printf( "robot is now home.\n"); Figure 4-97 Example of the aci_robhome Function aci_robstat #include "aci.h" int aci_robstat(char *szRobot , char *szAction) Figure 4-98 aci_robstat Function Call 21 Dec 2001 •...
  • Page 150: Return Values

    Table 4-43 Parameters for the aci_robstat Function Call Parameter szRobot szAction Return Values 4-108 DAS ACI Functions Description the defined robot of a twin AML system Robot 1 of AML (must also be used for all single AML system) Robot 2 of the twin AML START or in szRobot, set the defined Robot to on- start...
  • Page 151: Table 4-48 Table

    /* Check robot status */ char szRobot[ 3 ] = "R1"; char szAction[ 5 ] = "STAT"; if( ( rc = aci_robstat(szRobot, szAction))) aci_perror("Version request failed: "); else printf("Robstat 1 : %s\n", szSourceCoord ); printf (“robstat sucessful\n) Figure 4-99 Example of the aci_robstat Function aci_scratch_get #include "aci.h"...
  • Page 152: Return Values

    Table 4-44 Parameters for the aci_scratch_get Function Call Parameter subpool type volser Return Values 4-110 DAS ACI Functions Description stored name of the pool for scratch media in the AMU database If the volume is to be taken from a default subpool of a media type, set type to the media type of the volser and set subpool to the NULL string (““...
  • Page 153 /* Get volser of new scratch media */ char *pszPoolName = ""; enum aci_media type = ACI_3590; char szVolser[ACI_VOLSER_LEN]; rc = aci_scratch_get (pszPoolName, type, pszVolser); if( rc ) aci_perror ("Command failed: "); else printf ("Scratch volser %s found.\n", szVolser); Figure 4-101 Example of the aci_scratch_get Function aci_scratch_info #include "aci.h"...
  • Page 154: Return Values

    Table 4-45 Parameters for the aci_scratch_info Function Call Parameter subpool type volcount scratchcount Return Values 4-112 DAS ACI Functions Description stored name of the pool for scratch media. If the information is to be taken from a default subpool of a media type, set type to the media type of the volser and seat subpool to the NULL string (““...
  • Page 155: Aci_Scratch_Info

    /* List scratch pool information */ char *pszPoolName = ""; enum aci_media type = ACI_3590; long lVolserCount, lScratchCount; if ((rc = aci_perror ("Command failed: "); else if (strcmp (pszPoolName, "") == 0) printf ("DEFAULT_POOL:VolserCount:%d, else printf ("%s: VolserCount: %d, Figure 4-103 Example of the aci_scratch_info Function 21 Dec 2001 aci_scratch_info (pszPoolName, type,...
  • Page 156 aci_scratch_set #include "aci.h" int aci_scratch_set( char *subpool, Figure 4-104 aci_scratch_set Function Call Table 4-46 Parameters for the aci_scratch_set Function Call Parameter subpool type volser Attention 4-114 DAS ACI Functions The aci_scratch_set function sets volume status to scratch. See Figure 4-104. enum aci_media type, char *volser ) Set volume named volser of media type type to scratch status...
  • Page 157: Return Values

    Return Values /* Add volume to default scratch pool */ char *pszPoolName = ""; char *pszVolser enum aci_media type = ACI_3590; rc = aci_scratch_set(pszPoolName, type, pszVolser); if( rc ) aci_perror ("aci_scratch_set failed"); else printf("Scratch volume %s set.\n ", pszVolser); Figure 4-105 Example of the aci_scratch_set Function 21 Dec 2001 The command will be rejected with the message...
  • Page 158: Aci_Scratch_Set

    aci_scratch_unset #include "aci.h" int aci_scratch_unset( char *subpool, Figure 4-106 aci_scratch_unset Function Call Table 4-47 Parameters for the aci_scratch_unset Function Call Parameter subpool the stored name of the pool for scratch media in the AMU database. If the information is to be taken from a default subpool of a media type set type to the media type of the volser and set subpool to the NULL string (““...
  • Page 159: Return Values

    Return Values /* Change volume’s scratch status */ /* Change volume’s scratch status */ char *pszPoolName = ""; char *pszPoolName = ""; enum aci_media type = ACI_3590; enum aci_media type = ACI_3590; char *pszVolser char *pszVolser rc = aci_scratch_unset(pszPoolName,type,pszVolser); rc = aci_scratch_unset(pszPoolName,type,pszVolser); if( rc ) if( rc ) aci_perror ("aci_scratch_unset failed");...
  • Page 160: Aci_Shutdown

    Figure 4-108. This function shuts down the DAS server. Once the request has been accepted, no other request will be accepted. A restart of the DAS server is necessary to resume DAS operations. See Table 4-48. Description By default, DAS waits for outstanding requests to be completed before termination.
  • Page 161: Aci_Snmp

    /* Shut down DAS operation */ int rc; char *now = NULL; if ((rc = aci_shutdown(now))) aci_perror("Shut down failed:"); else printf("Shut down successful.\n"); Example of the aci_shutdown Function Figure 4-109 aci_snmp #include "aci.h" int aci_snmp (char *Msg) Figure 4-110 aci_snmp Function Call Table 4-49 Parameter for the aci_snmp Function Call Parameter...
  • Page 162: Aci_Switch

    aci_switch #include "aci.h" int aci_switch (char *Switch) Figure 4-111 aci_switch Function Call Table 4-50 Parameter for the aci_switch Function Call Parameter Switch Caution 4-120 DAS ACI Functions The external variable d_errno is set to one of the following DAS error codes: •...
  • Page 163: Return Values

    Return Values /* Switch to the Dual AMU */ int rc; char *Switch = "-n"; if ((rc = aci_switch(Switch))) aci_perror("Swicht actual not possible:"); else printf("Now the Dual AMU is active.\n"); Figure 4-112 Example of the aci_switch Function 21 Dec 2001 •...
  • Page 164: Aci_Unload

    aci_unload #include "aci.h" int aci_unload(char *szDrive) Figure 4-113 aci_unload Function Call Table 4-51 Parameter for the aci_unload Function Call Parameter szDrive Return Values 4-122 DAS ACI Functions The aci_unload function presses one or more buttons on a drive in the AML. See Figure 4-113. See Table 4-51 for an description of the parameter for the aci_unload function.
  • Page 165 aci_view #include "aci.h" int aci_view( char *volser, enum aci_media type, struct aci_volume_desc *desc ) Figure 4-114 aci_view Function Call struct aci_volume_desc { char coordinate[ACI_COORD_LEN]; char owner; char attrib; char type; char volser[ACI_VOLSER_LEN] char vol_owner; int use_count; int crash_count; Figure 4-115 Volser Information Contained in the aci_volume_desc Structure 21 Dec 2001 The aci_view function is used to view a database entry for a...
  • Page 166 Table 4-52 Parameters for the aci_view Function Call Parameter volser type aci_volume_desc Table 4-53 Table Types attrib AMU Dynamic (dynamic storage locations in the AML system) storage (dynamic storage locations in the AML system) clean (cleaning media storage location) 4-124 DAS ACI Functions Description volser specifying the medium for which information is being queried...
  • Page 167: Aci_View

    Table 4-54 Table Attributes attrib occupied (slot occupied, medium is in its home position) ejected (slot empty, medium has been placed in the I/O unit) mounted (slot empty, medium has been placed in a drive) initial (attribute not used) in jukebox (slot empty, optical disk has been placed in the jukebox) reverse side mounted (slot empty, optical disk has been placed in a drive) empty (slot empty, no medium defined for the slot)
  • Page 168: Aci_Volser_Inventory

    /* Get volume information */ int rc; enum aci_media type = ACI_3590; char *volser = ""; struct aci_vol_desc desc; if ( rc = aci_view(volser, type, &desc )) aci_perror("view failed"); else printf("Volser=%s Type=%c Attrib=%c\n\tcoordinate =%s\n" Figure 4-116 Example of the aci_view Function aci_volser_inventory #include "aci.h"...
  • Page 169: Return Values

    Table 4-55 Parameters for the aci_volser_inventory Function Call Parameter pszVolser status Return Values 21 Dec 2001 Description Pointer to an individual volser Indicator to determine manipulate of the database ACI_INVT_NOTUPDT 0 = do not update the database ACI_INVT_UPDT 0 = update the database •...
  • Page 170: Aci_Volseraccess

    aci_volseraccess #include "aci.h" int aci_volseraccess(char *ClientName , Figure 4-118 aci_volseraccess Function Call Table 4-56 Parameters for the aci_volseraccess Function Call Parameter clientName VolserRange status Return Values 4-128 DAS ACI Functions The aci_volseraccess function sets ownership of a volser or range of volsers. See Figure 4-118. char *VolserRange, enum aci_volser_status status) Modify allocation status of a volser for a specified client.
  • Page 171: Aci_Volserstatus

    aci_volserstatus #include "aci.h" int aci_volserstatus char *ClientName, int *num char *VolserRange, struct aci_volser_entry *VolserEntry[ACI_MAX_VOLSER_ENTRIES] Figure 4-119 aci_volserstatus Function Call struct aci_volser_entry { char ClientName[ACI_NAME_LEN]; char VolserStatus[ACI_VOLSERSSTATUS_LEN]; char volser[ACI_VOLSER_LEN]; enum aci_media media_type; 21 Dec 2001 • EUPELSE • ERPC • EINVALID •...
  • Page 172: Return Values

    Figure 4-120 aci_volser_entry Structure Table 4-57 Parameters for the aci_volserstatus Function Call Parameter ClientName VolserRange aci_volser_entry Return Values 4-130 DAS ACI Functions See Table 4-57 for a description of the parameters for the aci_volserstatus function call. Description name of the client which allocated volser should be displayed number of volser ranges Range of the allocated Volser in on of the following forms:...
  • Page 173 Overview ............. . . 5-3 How It Works .
  • Page 174 aci_eject ............5-19 Return Values .
  • Page 175: Overview

    Overview How It Works Sadmin Sample Application 21 Dec 2001 Asynchronous Support Layer library works as a filter between existing ACI libraries (version 3 or later) and the client application, which wants to issue asynchronous ACI calls. Since the native ACI interface is synchronous, a client had to wait for the completion of the request.
  • Page 176: Sadmin Syntax

    Sadmin Syntax Contents of the Async Support Layer Library DAS ACI 3.0 Asynchronous Support Layer • eject: eject/elect complete volsers • allocv: allocate volser • allocd: allocate drive • script: run the commands from a script file This application can run in both single command and scripting modes.
  • Page 177: Aci_Async_Add()

    aci_async_add() #include "aci_async.h" #include "aci_xdr.h" aci_async_entry* aci_async_add(int aci_func, ...); Figure 5-1 Example of a Generic aci_async_add() Function Parameters 21 Dec 2001 aci_async_add - adds an entry in the shared memory area aci_async_create - creates and initializes the shared memory area aci_async_find - finds required shared memory table entry...
  • Page 178: Das_Mount

    aci_asycn_add (das_mount, *volser, *type, *drive) Figure 5-2 aci_async_add Function with the das_mount Parameter Table 5-1 Parameters for the das_mount Parameter Parameter volser Volser which should be mounted (also foreign volser possible after the cataloging with carf) type Media type of the named volser Refer to Media Types on page 2-7 drive Name of the drive which should be mounted.
  • Page 179: Das_Dismount

    aci_async_add (das_dismount, *volser, *type) aci_async_add Function with the das_dismount Parameter Figure 5-4 Table 5-2 Parameters for the das_dismount Parameter Parameter volser volser that is to be moved from a drive to the original position in the AML type media type of the named volser Refer to Media Types on page 2-7 aci_async_add (das_force, *drive) Figure 5-5...
  • Page 180: Das_Insert

    Table 5-3 Parameter for the das_force Parameter Parameter drive aci_async_add (das_insert, *insert_area, *volser_range, *type) Figure 5-6 aci_async_add Function with the das_insert Parameter DAS ACI 3.0 Asynchronous Support Layer Description name of the drive for the dismount das_insert The aci_async_add function with the das_insert parameter inserts volumes into the AML.
  • Page 181: Das_Eject

    Table 5-4 Parameters for the das_insert Parameter Parameter insert_area Logical insert range of the Insert/Eject unit of the AML in the AMS (e.g. I03) volser_range The volumes found in the insert_area are returned in the volser_ranges array of strings, where each volser is separated by a comma.
  • Page 182: Das_Eject_Complete

    Table 5-5 Parameters for the das_eject Parameter Parameter eject_area volser_ranges types aci_async_add (das_eject_complete, eject_area, volser_range, type) Figure 5-8 aci_async_add Function with the das_eject_complete Parameter 5-10 DAS ACI 3.0 Asynchronous Support Layer Description Logical area defined in AML, where the cartridges should be ejected •...
  • Page 183: Return Values

    Table 5-6 Parameters for the das_eject_complete Parameter Parameter eject_area Logical area defined in AMS, where the cartridges should be ejected volser_range • a single volser • multiple volsers separated by commas • a range of volsers separated by a hyphen types media types of the named volser Refer to Media Types on page 2-7...
  • Page 184 . . . * sadmin sample application, dasadmin.c file * aci_async.h, ACI_INSERT macro aci_async_entry *async_entry; if ((async_entry = aci_async_add( DAS_INSERT, insert_area, volser_ranges, type ) ) != 0) if ((async_entry->pid = fork()) == 0) /* map the current process virtual memory to the shared buffer */ if ((int)(async_table = (void*)shmat(async_table_desc, 0, 0)) == -1)
  • Page 185: Aci_Async_Create()

    aci_async_create() #include "aci_async.h" aci_async_entry* aci_async_create(long entry_num); Figure 5-10 aci_async_create Function Call Table 5-7 Parameter for the aci_async_create Function Parameter entry_num Return Values 21 Dec 2001 The aci_async_create function creates a shared memory array of the entry_num size, that will hold the requests sent. See Figure 5-10 See Table 5-7 for a description of the parameter for the aci_async_create function.
  • Page 186: Aci_Async_Find()

    . . . * sadmin sample application, dasadmin.c file * creating a table in shared memory - 50 entries if( ( async_entry = aci_async_create( 50L ) ) == 0 ) aci_perror( "create async failed" ); return 1; . . . Figure 5-11 Example if the aci_async_create Function aci_async_find()
  • Page 187: Return Values

    Return Values . . . * sadmin sample application. wait_for_child.c file if ((async_entry = aci_async_find(pid)) != 0) printf("results: getting results...\n"); switch(async_entry->aci_func) case DAS_MOUNT: . . . aci_async_free(async_entry); printf("results: results done...\n"); . . . Example of the aci_async_find Function Figure 5-13 21 Dec 2001 The call was successful if a pointer to the found value is returned.
  • Page 188: Aci_Async_Free()

    aci_async_free() #include "aci_async.h" void aci_async_free(aci_async_entry* async_entry); Figure 5-14 aci_async_free Function Call Table 5-9 Parameters for the aci_async_free Function Parameter async_entry Return Values Macros aci_mount #include "aci_async.h" ACI_MOUNT(volser, type, drive_name) Figure 5-15 Example of aci_mount Asynchronous ACI Call 5-16 DAS ACI 3.0 Asynchronous Support Layer The aci_async_free function clears the async_table entry.
  • Page 189: Return Value

    aci_dismount #include "aci_async.h" ACI_DISMOUNT(volser, type) Figure 5-16 aci_dismount Asynchronous ACI Call aci_force 21 Dec 2001 All the parameters must comply with the rules for aci_mount function call. The local variables int res must be defined before using this macro. Return Values The d_errno and d_text globals are copied to d_errno and d_text fields of shared memory array entry.
  • Page 190: Returned Values

    #include "aci_async.h" ACI_FORCE(drive) Figure 5-17 aci_force Asynchronous ACI Call aci_insert #include "aci_async.h" ACI_INSERT(insert_area, volser_ranges, type) Figure 5-18 aci_insert Asynchronous Function Call 5-18 DAS ACI 3.0 Asynchronous Support Layer All the parameters must comply with the rules for the aci_force function call. The local variable int res must be defined before using this macro.
  • Page 191: Aci_Eject_Complete

    aci_eject #include "aci_async.h" ACI_EJECT(eject_area, volser_range, type) aci_eject Asynchronous Function Call Figure 5-19 aci_eject_complete #include "aci_async.h" ACI_EJECT_COMPLETE(eject_area, volser_range, type) Figure 5-20 aci_eject_complete Asynchronous Function Call 21 Dec 2001 The aci_eject function ejects a range of volumes from the AML. See Figure 5-19. All the parameters must comply with the rules for the aci_eject function call.
  • Page 192 Return Values The d_errno and d_text globals are copied to the d_errno and d_text fields of the shared memory array entry. The process is terminated by the exit call with the res exit code. If there are problems with the shared memory attachment, the d_errno global will be set to ENOSHARED.
  • Page 193: Response Technique

    Response Technique Setup . . . /* dasadmin sample application, dasadmin.c file */ ( *func )(); struct sigaction action; aci_async_entry *async_entry; action.sa_handler = wait_for_child; sigemptyset(&action.sa_mask); action.sa_flags = 0; if (sigaction(SIGCHLD, &action, (struct sigaction*)0) == (int)SIG_ERR) fprintf( stderr, "Unable to set signal handler for SIGCHLD\n");...
  • Page 194: Signal Handler Routine

    Signal Handler Routine /* dasadmin sample application, wait_for_child.c file */ void wait_for_child(int sig_no) pid_t pid; aci_async_entry* async_entry; int exit_code; int i; pid = wait(&exit_code); if ((async_entry = aci_async_find(pid)) != 0) printf("results: getting results...\n"); Figure 5-22 dasadmin Sample Application 5-22 DAS ACI 3.0 Asynchronous Support Layer The following code processes the result of child process work.
  • Page 195: Data Structures

    Data structures aci_async_entry 21 Dec 2001 This section provides and overview of the data structures used in asynchronous ACI data interchange. The shared memory array consists of several entries of type aci_async_entry. The exact number should be set in the aci_async_create call.
  • Page 196 struct _aci_async_entry pid_t pid; means slot is empty int aci_func; DAS_DISMOUNT, DAS_FORCE, int d_errno; char d_text[DAS_SZ_MSG_LEN]; /* error message union _parms parameters data async_drive_parms st_drive_parms; /* mount, dismount, force parameters */ async_ei_parms st_ei_parms; eject_complete } parms; union _response response data async_mount_parms st_mount_parms;...
  • Page 197: Parameter Data (Parms Structure)

    Parameter Data (Parms Structure) struct async_drive_parms { char volser[XDR_VOLSER_LEN]; /* volser name enum media type; char drive[XDR_DRIVE_LEN]; enum drive_status drive_state; /* drive status - not used here async_common common; used here Figure 5-24 async_drive_parms Structure struct async_ei_parms { char area_name[XDR_AREANAME_LEN]; /* I/E area name char volser_range[XDR_RANGE_LEN];...
  • Page 198: Response Data (Structure)

    Response Data (Structure) st_response struct async_response { int code; char text[XDR_TEXT_LEN]; Figure 5-26 async_response Structure st_mount_parms struct async_mount_parms { async_response stResponse; char volser[XDR_VOLSER_LEN]; enum media type; char drive[XDR_DRIVE_LEN]; enum drive_status drive_state; char drvmedia[XDR_TEXT_LEN]; Figure 5-27 async_mount_parms Structure 5-26 DAS ACI 3.0 Asynchronous Support Layer This union contains several structures where the asynchronous call results are stored after the call is completed.
  • Page 199: St_Insert_Response

    st_insert_response struct async_insert_response { async_response resp; struct { the volsers inserted */ u_int volser_ranges_len; volser_ranges_val array entries, volsers char volser_ranges_val[XDR_NO_RANGES][XDR_RANGE_LEN]; /* this array contains } volser_ranges; enum media mediatype; char szMediaType[XDR_AREANAME_LEN]; /* not used async_insert_responce Structure Figure 5-28 21 Dec 2001 This structure is supported by ACI_INSERT macro, described above.
  • Page 200 5-28 DAS ACI 3.0 Asynchronous Support Layer 601626-B...
  • Page 201: Application Notes

    Application Notes Overview ............. . A-3 Error Recovery Procedures .
  • Page 202 Application Notes 601626-B...
  • Page 203: Overview

    Overview Error Recovery Procedures Table A-1 Error Code Reactions Number d_error Name ERPC EINVALID ENOVOLUME ENODRIVE EDRVOCUPPIED 21 Dec 2001 This section contains information on error recovery procedures and explanations of terms used throughout this document. This section contains information on error recovery procedures.
  • Page 204: Table 4-11 Table

    Table A-1 Error Code Reactions Number d_error Name EPROBVOL EAMU EAMUCOMM EROBOT EROBOTCOMM ENODAS EDEVEMPTY ENOTREG Application Notes Recommended Reactions to the Error Code The AMS returned a error code from robot control or information about an unrecoverable situation in the AML. Stop the command that returned this error.
  • Page 205 Table A-1 Error Code Reactions Number d_error Name EBADHOST ENOAREA ENOTAUTH EUPELSE EBADCLIENT EBADDYN ENOREQ 21 Dec 2001 Recommended Reactions to the Error Code DAS was unable to resolve the IP-name to an address, or the address is invalid. Check the TCP/IP command.
  • Page 206: Table 4-13 Table

    Table A-1 Error Code Reactions Number d_error Name ERERTRYL ENOTMOUNTED EINUSE ENOSPACE Application Notes Recommended Reactions to the Error Code The maximum number of automatic retries for recovering has been exceeded. There is a problem in the AMS. Check the AMU-Log for more information: •...
  • Page 207 A command was canceled with the aci_cancel command or on the AMS. An internal DAS error has occurred. Restart DAS. Save the Log and inform ADIC support about the error situation. An internal ACI error has occurred. Restart DAS. Save the Log and inform ADIC support about the error situation.
  • Page 208: Table 4-15 Table

    Table A-1 Error Code Reactions Number d_error Name ESWITCHINPROG ENOPOOL EAREAFULL EHICAPINUSE ENODOUBLESIDE EEXUP EPROBDEV ECOORDINATE EAREAEMPTY EBARCODE Application Notes Recommended Reactions to the Error Code The commands can not be executed. DAS and AMS are being switched to the other AMU. Wait until the switching process is completed and try again.
  • Page 209 Table A-1 Error Code Reactions Number d_error Name EUPOWN ENOTSUPPHCMD EDATABASE ENOROBOT EINVALIDDEV NO_ECODES Terms 21 Dec 2001 Recommended Reactions to the Error Code The Client tried to allocate volsers that are already allocated. The AMU has a command exclusion feature that can be used to configure which DAS commands are supported.
  • Page 210 Volume. One or more physical volumes, bound in a transportable package with a human- readable external label. A volume server user that may be an application program. A human interface mechanism for controlling and monitoring system operation. Distributed AML Server...
  • Page 211 Drive eject Eject area Ethernet File Foreign (non- system) media insert Insert area I/O unit inventory Media Medium mount 21 Dec 2001 A device used to read and write data on a medium. The physical action of removing a medium from an archive.
  • Page 212 Network Network Protocols OS/2 Robotic archive Scratch media Scratch pool Shelf archive Slot Stage System Administrator (SA) Terabyte (TB) User Volume A-12 Application Notes The physical and logical connection of computers and peripheral devices that allows communication and data sharing. A set of rules defining the physical and logical connection.
  • Page 213 Volser, VSN Volume Serial Number An up to sixteen-digit alphanumeric designation. It identifies one medium (cartridge, optical disk) in the archive. Exception: optical disk has one logical compartment but two volsers (A and B side). The volser is attached to the rear of the medium on a barcode label and can be read by the handling unit.
  • Page 214 A-14 Application Notes 601626-B...
  • Page 215 - A - ACI ........2-4 ACI (AML Client Interface) .
  • Page 216 DAS calls ....... . 2-4 DAS server ....... 2-4 DAS_DISMOUNT .
  • Page 217 Drive status ..... . 4-5 ACI client ......2-5 - E - Eject .
  • Page 218 Scratch unset ......4-116 Set scratch ......4-111 Setenv .

Table of Contents