MSMQ://queueHostMachineName\queueNameWhen retrieving from IBM WebSphere MQ queues, use the following syntax:
MQSERIES://queueManager:queueNameor
MQSERIES-C://queueManager:queueNameMQSERIES specifies the server interface that is used to connect to a queue manager that is local. MQSERIES-C specifies the client interface that is used, allowing the queue manager to be local or remote.
COLLECTION_NAME | |
CORRELATIONID | This character string specifies retrieval of only those packages that have the specified correlation identifier. (Applies only to the message queue transport.) |
FTP_PASSWORD | When retrieving with the archive transport (FROM_ARCHIVE), this character string indicates the password that is used to connect to the remote host. Specify this property only when the host does not accept anonymous access. (Applies to the FROM_ARCHIVE property when the FTP protocol is used.) |
FTP_USER | When retrieving with the archive transport, this character string indicates the name of the user to connect to the remote host. (Applies to the FROM_ARCHIVE property when the FTP protocol is used.) |
HTTP_PASSWORD | When retrieving with the WebDAV transport (FROM_WEBDAV), this character string indicates the password used to bind to the Web server. Specify this property only when the Web server does not accept anonymous access. (Applies to the FROM_ARCHIVE property when the HTTP protocol is used.) |
HTTP_PROXY_URL | When retrieving with the WebDAV transport, this character string indicates the URL of the proxy server. (Applies to the archive transport when the HTTP protocol is used with archive specifications.) |
HTTP_USER | When retrieving with the WebDAV transport, this character string indicates the name of the user to bind to the Web server. (Applies to the FROM_ARCHIVE property when the HTTP protocol is used.) |
LIST_NAME | When retrieving with the SharePoint transport, this character string indicates a document library in the SharePoint site. SharePoint document libraries are a special type of list that is used for ordering folders and files. |
NAMESPACES | When retrieving with the WebDAV transport, this
character string lists one or more namespaces that you are interested
in, using the syntax shown in the following example:a="http://www.host.com/myNamespace" A="http://www.host.com/myNamespace1"
B="http://www.host.com/myNamespace2" |
QUEUE_TIMEOUT | This numeric value identifies the number of seconds for the poll time-out. By default, if this property is not specified, the RETRIEVE_PACKAGE CALL routine polls and returns immediately with the number of packages found, if any. To override this default, specify the QUEUE_TIMEOUT property so that the RETRIEVE_PACKAGE CALL routine will continue to poll for packages until at least one package is found on the queue or until the time-out occurs, whichever occurs first. |
data _null_; length description nameValue type userSpec msg $255; length libname $8; length memname $32; CALL RETRIEVE_PACKAGE(packageId,"FROM_ARCHIVE", "AlphaliteAir",tp,rc); do while (rc = 0); CALL ENTRY_NEXT(packageId,eid,type,userSpec, description,nameValue,rc); if (rc = 0) then select (type); when ("DATASET") CALL RETRIEVE_DATASET(eid,libname,memname,rc); when ("CATALOG") CALL RETRIEVE_CATALOG(eid,libname,memname,rc); when ("MDDB") CALL RETRIEVE_MDDB(eid,libname,memname,rc); otherwise; end; end; CALL PACKAGE_TERM(packageId,rc); run;
data _null_; length properties nameValue entryType userSpec filename filepath channel $ 255; length abstract desc msg $2048; abstract = ''; channel = ''; entryCount = 0; entryId = 0; packageId = 0; rc = 0; totalPackages = 0; packageId = 0; numEntries = 0; retrievalType = 'FROM_SHAREPOINT'; siteUrl = 'http://host/site'; retrievalInfo = siteUrl; properties = 'LIST_NAME, COLLECTION_FOLDER, HTTP_USER, HTTP_PASSWORD'; listName = 'Shared Documents'; folderName = 'File Collection'; userName = 'username'; password = 'password'; CALL RETRIEVE_PACKAGE(packageId, retrievalType, retrievalInfo, totalpackages, rc, properties, listName, folderName, userName, password); if rc ne 0 then do; msg = sysmsg(); put msg; ABORT; end; properties = 'ABSTRACT'; CALL PACKAGE_FIRST(packageId, numEntries, desc, dateTime, nameValue, channel, rc, properties, abstract); if (rc = 0) then do; put "packageId: " packageId; put " numEntries: " numEntries; put " Description: " desc; put " nameValue: " nameValue; put " dateTime: " dateTime datetime21.2 " GMT"; put " abstract: " abstract; end; else do; msg = sysmsg(); put msg; ABORT; end; properties = 'FILENAME'; do while (rc = 0); CALL ENTRY_NEXT(packageId, entryId, entryType, userSpec, desc, nameValue, rc, properties, filename); if (rc = 0) then do; entryCount = entryCount + 1; put 'Entry: ' entryCount; put ' EntryId: ' entryId; put ' Type: ' entryType; put ' UserSpec: ' userSpec; put ' Description: ' desc; put ' nameValue: ' nameValue; if (entryType = 'TEXT' OR entryType = 'BINARY') then do; filepath = 'FILENAME: C:\Public\' || filename; CALL RETRIEVE_FILE(entryId, filepath, rc2); if (rc2 ne 0) then do; msg = sysmsg(); put msg; end; else do; put 'File retrieved: ' filepath; end; end; end; else do; msg = sysmsg(); put msg; end; end; /* do while */ CALL PACKAGE_TERM(packageId, rc); if rc ne 0 then do; msg = sysmsg(); put msg; ABORT; end; run;