CDS710

Display Dynastore Document

Last Revised: 08/26/15

This application can be used to display a Dynastore document that can be displayed using a browser, such as pdf, txt, xls, or htm file. It can also return a URL suitable for displaying the document at a later time.

Note: CDS710 requires the Dynastore ID and Key be specified in Company Information Maintenance (SMC).  Contact Excellware to obtain this information.

CDS710 also requires openssl version 1.0.0 or newer be installed on the server, in order to create a valid signature for the URL.

Calling Format:

CALL "CDS710", ERR=XXXX, Y$, S710$

CDS710 Arguments
Argument Passed To/From Description
ERR=XXXX N/A

Error branch taken if:

  • Dynastore ID or Key not specified in Company Information Maintenance
  • Bucket not specified
  • Bucket contains an upper case letter
  • Stored File Name not specified
Y$ To Session Control Variable
S710$ To/From This templated string used to pass variables to, and receive the resultant URL from CDS710.
FieldContents
S710.CC$Optional company code, required when you want to use an alternate companies Dynastore ID and Key. Y.COMPCODE$ used if not provided.
S710.DISPLAY$Pass as "N" to prevent CDS710 from displaying the document. S710.URL$ will be set for use by the calling program.
S710.EXPIRESNumber of seconds before URL expires and can no longer be used.  Defaults to one hour if not passed. Minimum value is 1 second and the maximum value is 604,800 seconds or 7 days.
S710.ENDPOINT$Optional URL endpoint only needed to override the default URL endpoint for the region provided, i.e., mydocuments.mydomain.com.
S710.REGION$Optional AWS region when the document to be displayed is not located in the US Standard Region.  Refer to the AWS Region values for a complete list of supported Regions.
S710.BUCKET$The top level folder where the document is located. Note that AWS does not support direct document display if BUCKET$ contains an upper case letter.
S710.STOREDFILE$The file name including any folders below the bucket.  Note that spaces in the file name are not supported.
S710.URL$The URL composed by CDS710 which can be used to access the document.
Example
1230 CALL "CDS041","CDS710",S710$,"YY"
1240 LET S710.BUCKET$="excellware-cd-example"

1250 LET S710.STOREDFILE$="00000059.pdf"

1260 CALL "CDS710",Y$,S710$
?S710.URL$
https://excellware-cd-example.s3.amazonaws.com/00000059.pdf
?X-Amz-Algorithm=AWS-HMAC-SHA256
&X-Amz-Credential=AKIAI523HPHEAPKPYYCA%2F20150826%2Fus-east-1%2Fs3%Faws4_request
&X-Amz-Date=20150827T020310Z
&X-Amz-Expires=3600
&X-Amz-SignedHeader=host
&X-Amz-Signature=2836a46e437200a25f10ce7bb252698d13f72cf72ddaedc10ce91999aa94890