6 Working with Output Stream Access

This chapter contains the following topics:

6.1 Understanding OSA

You can use OSA interfaces to output to third-party software programs. OSA interfaces enable the third-party program to process and format JD Edwards EnterpriseOne data concurrently with the processing of a UBE. OSA interfaces must be predefined, typically by a representative of the third-party product that you are using. Several interfaces may exist for one program, depending on the section types included in the report and the desired output.

OSA uses its own set of commands from a third-party library.

Benefits of using OSA are:

  • Employs the formatting options of the target software program.

  • Employs the processing power of the target software program.

The system processes the components of batch applications in a specific order. At different points during this processing, you can trigger an event through the OSA interface.

This diagram illustrates the OSA execution points:

Figure 6-1 Execution Points for OSA

Description of Figure 6-1 follows
Description of ''Figure 6-1 Execution Points for OSA''

At each of these execution points, with the exception of PRT_InitializeLib and PRT_TerminateLib, you can call an OSA function. You can create functions or you can use existing XML libraries and their functions.

6.2 Creating OSA Libraries

This section discusses:

  • OSA libraries

  • Function parameters

  • OSA documents

  • Include files

  • File locations and names

  • OSASample source code

6.2.1 OSA Libraries

An OSA library is a collection of OSA functions; OSA functions must be included in a library before you can use them. You can create new functions and libraries to satisfy the business requirements.

JD Edwards EnterpriseOne includes an OSA library named OSASample. This OSASample library, along with its source code, serves as an example of how to create an OSA library. The following reference information is provided for developers who need to create their own libraries.

6.2.1.1 Function Signatures

OSA functions are called using the function pointers defined in the JDEOSA file. Therefore, OSA functions should be defined using the same parameters and return values, as in this example set of function prototypes:

void MyStartDoc (POSA_REPORT_INFO);
void MySetFont (POSA_REPORT_INFO, POSA_FONT_INFO);
void MySetColor (POSA_REPORT_INFO, unsigned long int);
void MyStartPage (POSA_REPORT_INFO);
void MyTextOut (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyDrawObject (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyUnderline (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyEndPage (POSA_REPORT_INFO, POSA_LINK_INFO, unsigned long);
void MyEndDoc (POSA_REPORT_INFO);
void MyFinalize (POSA_REPORT_INFO);
void MyStartDoc (POSA_REPORT_INFO);
void MySetFont (POSA_REPORT_INFO, POSA_FONT_INFO);
void MySetColor (POSA_REPORT_INFO, unsigned long int);
void MyStartPage (POSA_REPORT_INFO);
void MyTextOut (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyDrawObject (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyUnderline (POSA_REPORT_INFO, POSA_OBJECT_INFO);
void MyEndPage (POSA_REPORT_INFO, POSA_LINK_INFO, unsigned long);
void MyEndDoc (POSA_REPORT_INFO, POSA_PAGEOF_INFO, unsigned long);
void MyFinalize (POSA_REPORT_INFO);

6.2.2 Function Parameters

Function parameters define:

  • Start document parameters

  • Set font parameters

  • Set color parameters

  • Start page parameters

  • Text out parameters

  • Insert draw object parameters

  • Draw underline parameters

  • End page parameters

  • End document parameters

  • Finalize document parameters

6.2.2.1 Defining Start Document Parameters

The OSA function that is associated with the Start Document execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo
OSA_REPORT_INFO *pOSAReportInfo

6.2.2.2 Defining Set Font Parameters

The OSA function that is associated with the Set Font execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo,
OSA_FONT_INFO *pOSAFontInfo

6.2.2.3 Defining Set Color Parameters

The OSA function that is associated with the Set Color execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo,
unsigned long int zColorRef

6.2.2.4 Defining Start Page Parameters

The OSA function that is associated with the Start Page execution point is called by defining this parameter:

OSA_REPORT_INFO *pOSAReportInfo

6.2.2.5 Defining Text Out Parameters

The OSA function that is associated with the Text Out execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo,
OSA_OBJECT_INFO *pOSAObjectInfo

6.2.2.6 Defining Insert Draw Object Parameters

The OSA function that is associated with the Insert Draw Object execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo,
OSA_OBJECT_INFO *pOSAObjectInfo

6.2.2.7 Defining Draw Underline Parameters

The OSA function that is associated with the Draw Underline execution point is called by defining these parameters:

OSA_REPORT_INFO *pOSAReportInfo,
OSA_OBJECT_INFO *pOSAObjectInfo

6.2.2.8 Defining End Page Parameters

The OSA function that is associated with the End Page execution point is called by defining these parameters:

OSA_REPORT_INFO pOSAReportInfo,
OSA_LINK_INFO *pOSALinkInfo,
unsigned long ulNumberOfLinks

6.2.2.9 Defining End Document Parameters

The OSA function that is associated with the End Document execution point is called by defining this parameter:

OSA_REPORT_INFO *pOSAReportInfo

6.2.2.10 Defining Finalize Document Parameters

The OSA function that is associated with the Finalize Document execution point is called by defining this parameter:

OSA_REPORT_INFO *pOSAReportInfo

6.2.3 OSA Documents

Within the OSAReportInfo structure, the szOSAFileName member enables external applications to specify the name of a file created by OSA functions. A member of the same name is added to the UBEVar structure. After the End Document execution point has been processed, any value that exists in the OSAReportInfo member for szOSAFileName is copied to the corresponding UBEVar member. When a job has finished processing, the UBEVar structure is updated into the Job Control Status Master (F986110) table for that job.

6.2.4 Include Files

The structure and function definitions required for functions interfacing through OSA are available in the JDEOSA.H file, which is located in the system\include directory.

6.2.5 File Locations and Names

The JD Edwards EnterpriseOne Universal Batch Engine (UBE) performs these steps to load an OSA Library:

  1. If the library name, as defined in the OSA Interface Definition (F986169) table, contains a period (.), the UBE ignores the period and any subsequent characters.

  2. The UBE adds prefixes, extensions, or both according to the platform on which the UBE is executing.

This table illustrates the prefixes and extensions that are added to the platform on which the UBE is executing:

PLATFORM EXTENDED LIBRARY NAME
Microsoft Windows libname + .dll
Solaris, Linux, AIX, HP-UX lib + libname + .so
IBM i libname

The UBE passes the resulting library name to the LoadLibrary function, which uses a standard search strategy to locate the requested library.

The OSA files are generated in the same location as the PDF files, which is the PrintQueue directory. They also follow a similar naming convention as the PDF files, except for the extension. The OSASample output has the extension .osa.

6.2.6 OSASample Source Code

OSASample includes three components:

  • OSAStruct.h

  • OSASample.h

  • OSASample.c

6.2.6.1 OSAStruct.h

This example shows OSAStruct.h source code:

#ifndef  OSASAMPLE_DEF_HPP
#define  SASAMPLE_DEF_HPP
#define  chAmpersand '&'
#define  chOpenAngle '<'
#define  chCloseAngle '>'
#define  chDoubleQuote ''
#define  PAGEOF_TYPE TP
typedef struct tagOSASAMPLE_STRUCT
{
unsigned short  nCount;
FILE  *fpOutput;
} OSASAMPLE_STRUCT, *POSASAMPLE_STRUCT;
#endif

6.2.6.2 OSASample.h

This example shows OSASample.h source code:

#ifndef __OSASAMPLE_H__
#define __OSASAMPLE_H__
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <jdeosa.h>
#if defined (_WIN32)
#undef CDECL
#define CDECL _cdecl
#if defined(IAMOSASAMPLE)
#define APIEXPORT _declspec(dllexport)
#else
#define APIEXPORT _declspec(dllimport)
#endif
#else
#define CDECL
#define APIEXPORT
#endif
#define CLASSEXPORT APIEXPORT
#undef EXTERNC
#if defined(__cplusplus)
#define EXTERNC extern C
#else
#define EXTERNC
#endif
EXTERNC APIEXPORT void CDECL OSASample_StartDoc(POSA_REPORT_INFO
       pOSAReportInfo);
EXTERNC APIEXPORT void CDECL OSASample_SetFont(POSA_REPORT_INFO
       pOSAReportInfo, POSA_FONT_INFO pOSAFontInfo);
EXTERNC APIEXPORT void CDECL OSASample_SetColor(POSA_REPORT_INFO
       pOSAReportInfo, unsigned long int zColorRef);
EXTERNC APIEXPORT void CDECL OSASample_EndDoc(POSA_REPORT_INFO
       pOSAReportInfo);
EXTERNC APIEXPORT void CDECL OSASample_StartPage(POSA_REPORT_INFO
       pOSAReportInfo);
EXTERNC APIEXPORT void CDECL OSASample_EndPage(POSA_REPORT_INFO
pOSAReportInfo,
POSA_LINK_INFO pOsaLinkInfo,
unsigned long ulNumberOfLinks);
EXTERNC APIEXPORT void CDECL OSASample_TextOut(POSA_REPORT_INFO
 pOSAReportInfo, POSA_OBJECT_INFO pOSAObjectInfo);
EXTERNC APIEXPORT void CDECL OSASample_DrawObject(POSA_REPORT_INFO
 pOSAReportInfo, POSA_OBJECT_INFO pOSAObjectInfo);
EXTERNC APIEXPORT void CDECL OSASample_DrawUnderLine(POSA_REPORT_INFO
 pOSAReportInfo, POSA_OBJECT_INFO pOSAObjectInfo);
EXTERNC APIEXPORT void CDECL OSASample_FinalizeDoc(POSA_REPORT_INFO
 pOSAReportInfo);
#endif

6.2.6.3 OSASAMPLE.c

#include OSASample.h
#include OSAStruct.h
/*-------------------------------------------------------------------------
* Function Name: OSA_ReportInfoOut
* Parameters: OSASAMPLE_STRUCT * Pointer to OSA Sample Structure
* OSA_REPORT_INFO * Pointer to Report Info structure
* Exceptions: None
* Return Value: None
* Description: Output data from the Report Info structure
*------------------------------------------------------------------------- */
void OSA_ReportInfoOut(POSASAMPLE_STRUCT pOSAStruct, POSA_REPORT_INFO pOSAReportInfo)
{
/* Check for valid parameter values. If pointers are void, return. */
if (!pOSAStruct || !pOSAStruct->fpOutput || !pOSAReportInfo)
{
return;
}
/* Print values to the output file */
fprintf(pOSAStruct->fpOutput, ****** REPORT INFO ******\n\n);
jde Fprintf(pOSAStruct->fpOutput), ("Report: % s\n",) pOSAReportInfo->szReport);
fprintf(pOSAStruct->fpOutput, Version: %s\n, pOSAReportInfo->szVersion);
fprintf(pOSAStruct->fpOutput, MachineKey: %s\n, pOSAReportInfo->
                        szMachineKey);
fprintf(pOSAStruct->fpOutput, Environment: %s\n, pOSAReportInfo->szEnhv);
fprintf(pOSAStruct->fpOutput, User: %s\n, pOSAReportInfo->szUser);
fprintf(pOSAStruct->fpOutput, Release: %s\n, pOSAReportInfo->
                       szOneWorldRelease);
fprintf(pOSAStruct->fpOutput, Time: %s\n, pOSAReportInfo->szReportTime);
fprintf(pOSAStruct->fpOutput, Date: %s\n, pOSAReportInfo->szDateToday);
fprintf(pOSAStruct->fpOutput, Local Code Page: %d\n, pOSAReportInfo->
                          nLocalCodePage);
fprintf(pOSAStruct->fpOutput, Remote Code Page: %d\n, pOSAReportInfo->
                           nRemoteCodePage);
fprintf(pOSAStruct->fpOutput, Local Operating System: %d\n,
             pOSAReportInfo->nLocalOperatingSystem);
fprintf(pOSAStruct->fpOutput, Remote Operating System: %d\n,
             pOSAReportInfo->nRemoteOperatingSystem);
fprintf(pOSAStruct->fpOutput, Printer: %s\n, pOSAReportInfo->szPrinter);
fprintf(pOSAStruct->fpOutput, Page Height: %d\n,
             pOSAReportInfo->ulPageSizeVertical);
fprintf(pOSAStruct->fpOutput, Page Width: %d\n,
             pOSAReportInfo->ulPageSizeHorizontal);
fprintf(pOSAStruct->fpOutput, Number Of Copies: %d\n,
             pOSAReportInfo->ulNumberOfCopies);
fprintf(pOSAStruct->fpOutput, Paper Source: %d\n,
             pOSAReportInfo->ulPaperSource);
fprintf(pOSAStruct->fpOutput, Orientation: %d\n,
             pOSAReportInfo->nPageOrientation);
fprintf(pOSAStruct->fpOutput, Lines Per Inch: %d\n,
             pOSAReportInfo->nPrinterLinesPerInch);
fprintf(pOSAStruct->fpOutput, Default Font Size: %d\n,
             pOSAReportInfo->nPrinterDefaultFontSize);
fprintf(pOSAStruct->fpOutput, Printer Type: %s\n,
             pOSAReportInfo->szPDLProgram);
fprintf(pOSAStruct->fpOutput, Decimal Separator: %s\n,
             pOSAReportInfo->szDecimalString);
fprintf(pOSAStruct->fpOutput, Thousands Separator: %c\n,
             pOSAReportInfo->cThousandsSeparator);
fprintf(pOSAStruct->fpOutput, Date Format: %s\n, pOSAReportInfo->
szDateFormat);
fprintf(pOSAStruct->fpOutput, Date Separator: %c\n, pOSAReportInfo->
cDateSeparator);
fprintf(pOSAStruct->fpOutput, Report Title: %s\n, pOSAReportInfo->
szReportTitle);
fprintf(pOSAStruct->fpOutput, Company Name: %s\n, pOSAReportInfo->
szCompanyName);
fprintf(pOSAStruct->fpOutput, Job Number: %d\n, pOSAReportInfo->ulJobNum);
fprintf(pOSAStruct->fpOutput, Current Page Number: %d\n,
pOSAReportInfo->ulCurrentPageNumber);
fprintf(pOSAStruct->fpOutput, Actual Page Number: %d\n,
pOSAReportInfo->ulActualCurrentPageNumber);
fprintf(pOSAStruct->fpOutput, UBE File Name: %s\n, pOSAReportInfo->
szUBEFileName);
fprintf(pOSAStruct->fpOutput, OSA File Name: %s\n, pOSAReportInfo->
szOSAFileName);
fprintf(pOSAStruct->fpOutput, Number of Sections: %d\n, pOSAReportInfo->
ulNumberOfSections);
fprintf(pOSAStruct->fpOutput, \n****** END REPORT INFO ******\n);
return;
}
/*-------------------------------------------------------------------------
* Function Name: OSA_SectionInfoOut
* Parameters: OSASAMPLE_STRUCT * Pointer to OSA Sample Structure
* OSA_SECTION_INFO * Pointer to Section Info structure
* Exceptions: None
* Return Value: None
* Description: Output data from the Section Info structure
*------------------------------------------------------------------------- */
void OSA_SectionInfoOut(POSASAMPLE_STRUCT pOSAStruct, POSA_SECTION_INFO
pOSASectionInfo)
{
/* Check for valid parameter values. If pointers are void, return. */
if (!pOSAStruct || !pOSAStruct->fpOutput || !pOSASectionInfo)
{
return;
}
fprintf(pOSAStruct->fpOutput, \n\t****** SECTION INFO ******\n\n);
fprintf(pOSAStruct->fpOutput, \tSection Name: %s\n, pOSASectionInfo->
szSectionName);
fprintf(pOSAStruct->fpOutput, \tSection Type: %s\n, pOSASectionInfo->
szSectionType);
fprintf(pOSAStruct->fpOutput, \tBusiness View Name: %s\n, pOSASectionInfo->
szBusinessViewName);
fprintf(pOSAStruct->fpOutput, \tSection ID: %d\n, pOSASectionInfo->
idSection);
fprintf(pOSAStruct->fpOutput, \tParent Section ID: %d\n, pOSASectionInfo->
idParentSection);
fprintf(pOSAStruct->fpOutput, \tNumber of Objects: %d\n, pOSASectionInfo->
ulNumberOfObjects);
fprintf(pOSAStruct->fpOutput, \tRecord Fetch Count: %d\n, pOSASectionInfo->
ulRecordFetchCount);
fprintf(pOSAStruct->fpOutput, \n\t****** END SECTION INFO ******\n);
return;
}
/*-------------------------------------------------------------------------
* Function Name: OSA_ObjectInfoOut
* Parameters: OSASAMPLE_STRUCT * Pointer to OSA Sample Structure
* OSA_OBJECT_INFO * Pointer to Object Info structure
* unsigned short int Flag to control output of Item Info
* Exceptions: None
* Return Value: None
* Description: Output data from the Object Info and Item Info structures
*------------------------------------------------------------------------- */
void OSA_ObjectInfoOut(POSASAMPLE_STRUCT pOSAStruct,
POSA_OBJECT_INFO pOSAObjectInfo,
unsigned short int nPrintItemInfo)
{
/* Check for valid parameter values. If pointers are void, return. */
if (!pOSAStruct || !pOSAStruct->fpOutput || !pOSAObjectInfo)
{
return;
}
fprintf(pOSAStruct->fpOutput, \n\t\t****** OBJECT INFO ******\n\n);
fprintf(pOSAStruct->fpOutput, \t\tData Dictionary Item: %s\n,
pOSAObjectInfo->szDataDictionaryAlias);
fprintf(pOSAStruct->fpOutput, \t\tObject Name: %s\n, pOSAObjectInfo->
szObjectName);
fprintf(pOSAStruct->fpOutput, \t\tObject ID: %d\n, pOSAObjectInfo->idObject);
fprintf(pOSAStruct->fpOutput, \t\tSection ID: %d\n, pOSAObjectInfo->
idSection);
fprintf(pOSAStruct->fpOutput, \t\tRow ID: %d\n, pOSAObjectInfo->idRow);
fprintf(pOSAStruct->fpOutput, \t\tObject Type: %s\n, pOSAObjectInfo->
szObjectType);
fprintf(pOSAStruct->fpOutput, \t\tObject Length: %d\n, pOSAObjectInfo->
nLength);
fprintf(pOSAStruct->fpOutput, \t\tOneWorld Data Type: %d\n, pOSAObjectInfo->
idEverestType);
fprintf(pOSAStruct->fpOutput, \t\tGeneral Data Type: %c\n, pOSAObjectInfo->
cDataType);
fprintf(pOSAStruct->fpOutput, \n\t\t****** END OBJECT INFO ******\n);
/* Only output Item Info if the parameter indicates to do so */
if (nPrintItemInfo)
{
POSA_ITEM_INFO pOSAItemInfo = &(pOSAObjectInfo->zOSAItemInfo);
fprintf(pOSAStruct->fpOutput, \n\t\t****** ITEM INFO ******\n\n);
fprintf(pOSAStruct->fpOutput, \t\tOccurence Count: %d\n, pOSAItemInfo->
ulOccurenceCount);
fprintf(pOSAStruct->fpOutput, \t\tRecord Fetch Count: %d\n, pOSAItemInfo->
ulRecordFetchCount);
fprintf(pOSAStruct->fpOutput, \t\tNumber Of Lines: %d\n, pOSAItemInfo->
ulNumPDFLines);
fprintf(pOSAStruct->fpOutput, \t\tReprinting: %d\n, pOSAItemInfo->
nReprinting);
fprintf(pOSAStruct->fpOutput, \t\tUnderline Thickness: %d\n, pOSAItemInfo->
nUnderlineThickness);
fprintf(pOSAStruct->fpOutput, \t\tUnderline Margin: %d\n, pOSAItemInfo->
nUnderlineMargin);
fprintf(pOSAStruct->fpOutput, \t\tColor Reference: %d\n, pOSAItemInfo->
ColorRef);
fprintf(pOSAStruct->fpOutput, \t\tFont Face Name: %s\n, pOSAItemInfo->
zFontInfo.lfFaceName);
fprintf(pOSAStruct->fpOutput, \t\tFont Point Size: %d\n, pOSAItemInfo->
zFontInfo.nPointSize);
fprintf(pOSAStruct->fpOutput, \t\tAdobe Font Name: %s\n, pOSAItemInfo->
zFontInfo.szAdobeFontName);
fprintf(pOSAStruct->fpOutput, \t\tDisplay Style: %d\n, pOSAItemInfo->
nDisplayStyle);
fprintf(pOSAStruct->fpOutput, \t\tObject Start X: %f\n, pOSAItemInfo->
fObjectHorizontalPosition);
fprintf(pOSAStruct->fpOutput, \t\tObject Start Y: %f\n, pOSAItemInfo->
fObjectVerticalPosition);
fprintf(pOSAStruct->fpOutput, \t\tObject End X: %f\n, pOSAItemInfo->
fObjectEndingHorizontalPosition);
fprintf(pOSAStruct->fpOutput, \t\tObject End Y: %f\n, pOSAItemInfo->
fObjectEndingVerticalPosition);
fprintf(pOSAStruct->fpOutput, \t\tValue Start X: %f\n, pOSAItemInfo->
fValueHorizontalPosition);
fprintf(pOSAStruct->fpOutput, \t\tValue Start Y: %f\n, pOSAItemInfo->
fValueVerticalPosition);
fprintf(pOSAStruct->fpOutput, \t\tValue End X: %f\n, pOSAItemInfo->
fValueEndingHorizontalPosition);
fprintf(pOSAStruct->fpOutput, \t\tValue End Y: %f\n, pOSAItemInfo->
fValueEndingVerticalPosition);
fprintf(pOSAStruct->fpOutput, \t\tValue Text: %s\n, pOSAItemInfo->szValue);
fprintf(pOSAStruct->fpOutput, \t\tFull Object Text: %s\n, pOSAItemInfo->
szFullText);
fprintf(pOSAStruct->fpOutput, \n\t\t****** END ITEM INFO ******\n);
}
else
{
fprintf(pOSAStruct->fpOutput, \n\t\t****** No Item Info At This Point ******
\n);
}
return;
}
/*-------------------------------------------------------------------------
* Function Name: OSA_LinkInfoOut
* Parameters: OSASAMPLE_STRUCT * Pointer to OSA Sample Structure
* OSA_LINK_INFO * Pointer to array of Link Info structures
* unsigned long The number of elements in the Link Info array
* Exceptions: None
* Return Value: None
* Description: Output data from the Link Info structures, if any.
*------------------------------------------------------------------------- */
void OSA_LinkInfoOut(POSASAMPLE_STRUCT pOSAStruct,
POSA_LINK_INFO pOSALinkInfo,
unsigned long ulNumberOfLinks)
{
unsigned short i =0;
/* Check for valid parameter values. If pointers are void, return. */
if (!pOSAStruct || !pOSAStruct->fpOutput)
{
return;
}
/* Check for valid parameter values. If pointer is void or array is empty,
output a message and return. */
if (!pOSALinkInfo || !ulNumberOfLinks)
{
fprintf(pOSAStruct->fpOutput, \n** No Link Information **\n);
return;
}
fprintf(pOSAStruct->fpOutput, \n****** LINK INFO ******\n\n);
for (i=0; i<ulNumberOfLinks; i++)
{
fprintf(pOSAStruct->fpOutput, Lower Left X: %f\n, pOSALinkInfo[i].
fLowerLeftHorizontal);
fprintf(pOSAStruct->fpOutput, Lower Left Y: %f\n, pOSALinkInfo[i].
fLowerLeftVertical);
fprintf(pOSAStruct->fpOutput, Upper Right X: %f\n, pOSALinkInfo[i].
fUpperRightHorizontal);
fprintf(pOSAStruct->fpOutput, Upper Right Y: %f\n, pOSALinkInfo[i].
fUpperRightVertical);
fprintf(pOSAStruct->fpOutput, Application Name: %s\n, pOSALinkInfo[i].
szApplication);
fprintf(pOSAStruct->fpOutput, Form Name: %s\n, pOSALinkInfo[i].szForm);
fprintf(pOSAStruct->fpOutput, Parameter String: %s\n\n, pOSALinkInfo[i].
szParms);
}
fprintf(pOSAStruct->fpOutput, \n****** END LINK INFO ******\n);
return;
}
/*-------------------------------------------------------------------------
* Function Name: OSA_FontInfoOut
* Parameters: OSASAMPLE_STRUCT * Pointer to OSA Sample Structure
* OSA_FONT_INFO * Pointer to Font Info structure
* Exceptions: None
* Return Value: None
* Description: Output data from the Font Info structure
*------------------------------------------------------------------------- */
void OSA_FontInfoOut(POSASAMPLE_STRUCT pOSAStruct,
POSA_FONT_INFO pFontInfo)
{
/* Check for valid parameter values. If pointers are void, return. */
if (!pOSAStruct || !pOSAStruct->fpOutput || !pFontInfo)
{
return;
}
fprintf(pOSAStruct->fpOutput, \n****** FONT INFO ******\n\n);
fprintf(pOSAStruct->fpOutput, Font Face Name: %s\n, pFontInfo->lfFaceName);
fprintf(pOSAStruct->fpOutput, Font Point Size: %d\n, pFontInfo->nPointSize);
fprintf(pOSAStruct->fpOutput, Adobe Font Name: %s\n, pFontInfo->
szAdobeFontName);
fprintf(pOSAStruct->fpOutput, \n****** END FONT INFO ******\n);
return;
}
/*-----------------------------------------------------------------------*/
 Function Name: OSA_OpenOutputFile
* Parameters: OSA_REPORT_INFO * Pointer to Report Info Structure
* OSASAMPLE_STRUCT * Pointer to OSA Sample Structure 
* Exceptions: None
* Return Value: None
* Description: Create the file which will contain the sample output
*------------------------------------------------------------------------- */
void OSA_OpenOutputFile (POSA_REPORT_INFO pOSAReportInfo, POSASAMPLE_STRUCT pOSAStruct)
{
/* Formulate the output file name based on information from Report Info. */
strcpy(pOSAReportInfo->szOSAFileName, pOSAReport Info->szUBEFileName);
#if defined JDENV_AS400
/* On IBM i, the UBE file name is of the form LIBRARY/PRINTQUEUE(F99999), where 99999 is the job number. We will just switch an O for the F to indicate an OSA file. */
pStrPtr = strrchr( pOSAReportInfo- >szOSAFileName,'F' );
*pStrPtr = 'O';
#else
/* On platforms other than IBM i, just replace the PDF file extension with OSA. */ 
if( !strstr( pOSAReportInfo->sz OSAFileName,.pdf ) )
{
/* If there is no .pdf extension, just tack on a .osa extension */
  strcat( pOSAReportInfo->szOSAFileName, .osa );
}
else
{  sprintf( strstr( pOSAReportInfo->szOSAFileName, .pdf ), .osa); 
}
#endif
/* Open the OSA file for output. */
pOSAStruct->fpOutput= fopen(pOSAReportInfo->szOSAFileName, w+b);
if (!pOSAStruct->fpOutput)
{
/* If the file could not be opened, send an error message
 back to the UBE log */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = 1;
}
sprintf(pOSAReportInfo->szLogMessage, Could not
 open OSA file: %s\n,
pOSAReportInfo->szOSAFileName);
return;
}
return;}
/*------------------------------------------------------------------------*/
/* Name: OSASample_StartDoc */
/* Parameters: OSA_REPORT_INFO* */
/* Exceptions: None */
/* ReturnValue: None */
/* Description: Open the output file, */
/* Output Report, Section and Object */
/* properties. */
/*------------------------------------------------------------------------*/
EXTERNC APIEXPORT void CDECL OSASample_StartDoc(OSA_REPORT_INFO*pOSAReportInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
POSA_SECTION_INFO pOSASectionInfo = NULL;
POSA_OBJECT_INFO pOSAObjectInfo = NULL;
char *pStrPtr NULL;
unsigned long i = 0;
unsigned long j = 0;
if(!pOSAReportInfo )
{return;
}
/* Allocate memory to hold severity value.
Deallocated in OSASample_EndDoc */
if (!pOSAReportInfo->pnLogMessageSeverity)
{
pOSAReportInfo->pnLogMessageSeverity = malloc(sizeof( unsigned short));
}
if (pOSAReportInfo->pnLogMessageSeverity)
{
pOSAReportInfo->pnLogMessageSeverity[0] = 0;
}
/* Create the common structure for passing values between functions,
if it has not been created before this point. */
if (!pOSAReportInfo->pExternalDataPointer)
{
pOSAStruct = malloc(sizeof( OSASAMPLE_STRUCT));
if (pOSAStruct)
{
memset(pOSAStruct, 0, sizeof(OSASAMPLE_STRUCT));
}else
{
strcpy(pOSAReportInfo->szLogMessage, OSA: Could not allocate External Data
Pointer.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
}
/* Record the pointer as the external data pointer in Report Info. */
pOSAReportInfo->pExternalDataPointer=pOSAStruct;
}
/* If the external data pointer does not exist, execution
cannot go on. Set severity to the highest value, assign a message for the
log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at End
Doc.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;}
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Create output file if it has not been created yet */
if (!pOSAStruct->fpOutput)
{
OSA_OpenOutputFile (pOSAReportInfo, pOSAStruct);
if (pOSAReportInfo->pnLogMessageSeverity[0] > 0)
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, ****** START DOC EXECUTION POINT ******\n\n);
/* Output Report Info to file. */
OSA_ReportInfoOut(pOSAStruct, pOSAReportInfo);
/* Output Section Info to file. */
if (!pOSAReportInfo->pOSASectionInfo || !pOSAReportInfo->ulNumberOfSections)
{
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = 2;
}
sprintf(pOSAReportInfo->szLogMessage, No Section Info present.\n);
return;
}
pOSASectionInfo = pOSAReportInfo->pOSASectionInfo;
for (i=0; i<pOSAReportInfo->ulNumberOfSections; i++)
{
OSA_SectionInfoOut(pOSAStruct, pOSASectionInfo);
/* Output Object Info to file. */
if (!pOSASectionInfo->pOSAObjectInfo || !pOSASectionInfo->ulNumberOfObjects)
{
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = 3;
}
sprintf(pOSAReportInfo->szLogMessage,
No Object Info present for Section %s.\n,
pOSASectionInfo->szSectionName);
return;
}
pOSAObjectInfo = pOSASectionInfo->pOSAObjectInfo;
for (j=0; j<pOSASectionInfo->ulNumberOfObjects; j++)
{
OSA_ObjectInfoOut(pOSAStruct, pOSAObjectInfo, 0); /* Do not print Item Info at this time. */
pOSAObjectInfo++;
}
pOSASectionInfo++;
}
}/*----------------------------------------------------------------------- */
/* Name: OSASample_EndDoc */
/* Parameters: OSA_REPORT_INFO*/
/* Exceptions: None */
/* Return Value: None */
/* Description: Open the output file, */
/* Output Report, Section and Object */
/* properties. */
/*----------------------------------------------------------------------- */

EXTERNC APIEXPORT void CDECL OSASample_EndDoc(OSA_REPORT_INFO* pOSAReportInfo
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely), then
return */
if(!pOSAReportInfo )
{return;
}
/* If the external data pointer does not exist execution
cannot go on. Set severity to the highest value, assign a message for the
log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at End
Doc.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Close Output File */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** END DOC EXECUTION POINT ******);
if (pOSAStruct->fpOutput)
{
fclose (pOSAStruct->fpOutput);
}
/* Delete the structure created to hold the external data */
free (pOSAStruct);
if (pOSAReportInfo->pnLogMessageSeverity)
free(pOSAReportInfo->pnLogMessageSeverity);
pOSAReportInfo->pExternalDataPointer = NULL;
return;
}
/*----------------------------------------------------------------------- */
/* Name: OSASample_StartPage */
/* Parameters: OSA_REPORT_INFO* */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Report Info to output file. */
/*----------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_StartPage(OSA_REPORT_INFO*
pOSAReportInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely), then return */
if(!pOSAReportInfo )
{
return;}
/* If the external data pointer does not exist, execution cannot go on. Set severity to the highest value, assign a message for the log and return */ 
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at Start Page.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Start Page.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** START PAGE EXECUTION POINT ******\n);
OSA_ReportInfoOut(pOSAStruct, pOSAReportInfo);
return;
}
/*----------------------------------------------------------------------- */
/* Name: OSASample_EndPage */
/* Parameters: OSA_REPORT_INFO*, OSA_LINK_INFO*, unsigned long */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Report Info and Link Info */
/* */
/*----------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_EndPage(POSA_REPORT_INFO
pOSAReportInfo,
POSA_LINK_INFO pOSALinkInfo,
unsigned long ulNumberOfLinks)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely), then return */
if(!pOSAReportInfo )
{
return;
}
/* If the external data pointer does not exist executioncannot go on. Set severity to the highest value, assign a message for the log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at End Page.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at End Page.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** END PAGE EXECUTION POINT ******\n);
OSA_ReportInfoOut(pOSAStruct, pOSAReportInfo);
/* Output Link Info */
OSA_LinkInfoOut(pOSAStruct, pOSALinkInfo, ulNumberOfLinks);
return;
}
/*----------------------------------------------------------------------- */
/* Name: OSASample_SetFont */
/* Parameters: OSA_REPORT_INFO*, OSA_FONT_INFO* */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Font Info */
/* */
/*----------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_SetFont(POSA_REPORT_INFO
pOSAReportInfo,
POSA_FONT_INFO pOSAFontInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely),then return */
if(!pOSAReportInfo )
{
return;
}
/* Allocate memory to hold severity value. Deallocated in OSASample_EndDoc */
if (!pOSAReportInfo->pnLogMessageSeverity)
{
pOSAReportInfo->pnLogMessageSeverity = malloc(sizeof( unsigned short));
}
if (pOSAReportInfo->pnLogMessageSeverity)
{
pOSAReportInfo->pnLogMessageSeverity[0] = 0;
}
/* Create the common structure for passing values between functions,if it has not been created before this point. */
if (!pOSAReportInfo->pExternalDataPointer)
{
pOSAStruct = malloc(sizeof( OSASAMPLE_STRUCT));
if (pOSAStruct)
{
memset(pOSAStruct, 0, sizeof(OSASAMPLE_STRUCT));
}
else
{
strcpy(pOSAReportInfo->szLogMessage, OSA: Could not allocate External
Data Pointer.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
d*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
}
/* Record the pointer as the⇒
 external data pointer in Report Info.*/
pOSAReportInfo->pExternalDataPointer=p⇒
OSAStruct;
}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Create output file if it has not been created yet */
if (!pOSAStruct->fpOutput)
{
OSA_OpenOutputFile (pOSAReportInfo, pOSAStruct);
if (pOSAReportInfo->pnLogMessageSeverity[0] > 0)
return;
}
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Set Font.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** SET FONT EXECUTION POINT ******\n);
OSA_FontInfoOut(pOSAStruct, pOSAFontInfo);
return;
}
/*----------------------------------------------------------------------- */
/* Name: OSASample_SetColor */
/* Parameters: OSA_REPORT_INFO*, unsigned long int */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Color Reference Number */
/* */
/*----------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_SetColor(POSA_REPORT_INFO
pOSAReportInfo,
unsigned long int zColorRef)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely),then return */
if(!pOSAReportInfo )
{
return;
}
/* If the external data pointer does not exist execution cannot go on. Set severity to the highest value, assign a message for the log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at Set Color.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Set
Color.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** SET COLOR: %d ******\n, zColorRef);
return;
}
/*------------------------------------------------------------------------- */
/* Name: OSASample_TextOut */
/* Parameters: OSA_REPORT_INFO*, OSA_OBJECT_INFO* */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Font Info */
/* */
/*------------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_TextOut(POSA_REPORT_⇒
INFO
pOSAReportInfo,
POSA_OBJECT_INFO pOSAObjectInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely),
then return */
if(!pOSAReportInfo )
{
return;
}
/* If the external data pointer does not exist execution cannot go on. Set severity to the highest value, assign a message for the log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at Text Out.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Text Out.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** TEXT OUT EXECUTION POINT ******\n);OSA_ObjectInfoOut(pOSAStruct, pOSAObjectInfo, 1);
return;
}
/*---------------------------------------------------------------------- */
/* Name: OSASample_Underline */
/* Parameters: OSA_REPORT_INFO*, OSA_OBJECT_INFO* */
/* Exceptions: None */
/* Return Value: None */
/* Description: Output Font Info */
/* */
/*---------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_DrawUnderline(POSA_REPORT_INFO
pOSAReportInfo,
POSA_OBJECT_INFO pOSAObjectInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely), then return */
if(!pOSAReportInfo )
{
return;
}/* If the external data pointer does not exist execution cannot go on. Set severity  to the highest value, assign a message for the log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at Draw Underline.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Output Report Info */pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!p⇒
OSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Draw
Underline.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** DRAW UNDERLINE EXECUTION POINT
******\n);
OSA_ObjectInfoOut(pOSAStruct, pOSAObjectInfo, 1);
return;
}
/*---------------------------------------------------------------------- */
/* Name: OSASample_DrawObject */
/*⇒
 Parameters: OSA_REPORT_INFO*, OSA_OBJECT_INFO* */
/* Exceptions: None */
/* Return⇒
 Value: None */
/* Description: Output Font Info */
/* */
/*---------------------------------------------------------------------- */
EXTERNC APIEXPORT void CDECL OSASample_DrawObject(POSA_REPORT_INFO
pOSAReportInfo,
POSA_OBJECT_INFO pOSAObjectInfo)
{
POSASAMPLE_STRUCT pOSAStruct = NULL;
/* If OSA does not provide the needed parameter (Highly unlikely),then return */
if(!pOSAReportInfo )
{
return;}
/* If the external data pointer does not exist execution cannot go on. Set severity to the highest value, assign a message for the log and return */
if(!pOSAReportInfo->pExternalDataPointer)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No External Data Pointer at Draw Object.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Output Report Info */
pOSAStruct=pOSAReportInfo->pExternalDataPointer;
/* Check for valid file pointer */
if (!pOSAStruct->fpOutput)
{
strcpy(pOSAReportInfo->szLogMessage, OSA: No Output File pointer at Draw Object.\n);
/* Set the correct severity to error message severity */
if (pOSAReportInfo->pnLogMessageSeverity)
{
*(pOSAReportInfo->pnLogMessageSeverity) = (unsigned short)1;
}
return;
}
/* Identify the Execution Point */
fprintf(pOSAStruct->fpOutput, \n****** DRAW OBJECT EXECUTION POINT ******\n);
OSA_ObjectInfoOut(pOSAStruct, pOSAObjectInfo, 1);
return;
}

6.3 Creating and Associating OSA Interfaces

This section provides an overview of OSA interfaces and discusses how to:

  • Create OSA interface definitions.

  • Associate an OSA interface with an object.

6.3.1 Understanding OSA Interfaces

Before reports can be output using OSA, you must define the interface. Typically, once defined, OSA interfaces are associated with specific reports or batch versions; however, you can override the default OSA at runtime. You can select from any valid OSA at runtime, although the results might vary depending on how robust the OSA. OSA interfaces can be associated in the same way as default printers with:

  • Environments

  • Hosts

  • Users or roles

Depending on the report output requirements, you might need to define multiple interfaces.

6.3.1.1 Using the System Hierarchy to Resolve Priority Conflicts

The general hierarchy that the system uses to resolve OSA interfaces that are associated with more than one report or version is illustrated in the following table. The system uses the same hierarchy for each user or role, processing in this order:

  1. Username

  2. Role

  3. *PUBLIC

Report Version Environment Host
report version environment hosttype
report version environment *ALL
report version *ALL hosttype
report version *ALL *ALL
report *ALL environment hosttype
report *ALL environment *ALL
report *ALL *ALL hosttype
report *ALL *ALL *ALL
*ALL *ALL environment hosttype
*ALL *ALL environment *ALL
*ALL *ALL *ALL hosttype
*ALL *ALL *ALL *ALL

6.3.2 Forms Used to Create and Associate OSA Interfaces

Form Name FormID Navigation Usage
Output Stream Access Setup W986168F Type P986168 in the Fast Path. Add or modify OSA interface definitions and add or modify OSA usage specifications.
Work With Output Stream Access Interface Definition W986168C Click Add or modify the Output Stream Access Interface Definition on the Output Stream Access Setup form. Add or select an OSA interface definition.
Output Stream Access Interface Definition Revisions W986168I Click Add on the Work With Output Stream Access Interface Definition form. Enter the OSA interface name and, for each execution point, enter the OSA library names and OSA function names.
Work With Output Stream Access Interface Usage W986168D Click Add or modify the Output Stream Access Interface Usages specification on the Output Stream Access Setup form. Add or select an OSA interface usage.
Output Stream Access Interface Usage Revisions W986168M Click Add on the Work With Output Stream Access Interface Usage form. Enter an OSA interface name and the report, version, environment, host, user or role, and usage status associated with the OSA interface.

6.3.3 Creating OSA Interface Definitions

Access the Output Stream Access Interface Definition Revisions form.

Figure 6-2 Output Stream Access Interface Definition Revisions Form

Description of Figure 6-2 follows
Description of ''Figure 6-2 Output Stream Access Interface Definition Revisions Form''

Output Stream Access Interface Name

Enter a unique name that identifies a set of external functions that can receive and process information during execution. JD Edwards EnterpriseOne OSA interfaces begin with the letters JDE. It is recommended that you do not begin custom interface names with JDE.

Output Stream Access Library Name

Enter the shared libraries that contain functions that use the data provided through the OSA interface.

Output Stream Access Function Name

Enter the functions that conform with the parameters and calling conventions of the OSA interface. The system executes the OSA functions at execution points following a set of parameters. Execution points with no associated function are ignored when the OSA interface executes.

6.3.4 Associating an OSA Interface with an Object

Access the Output Stream Access Interface Usage Revisions form.

Figure 6-3 Output Stream Access Interface Usage Revisions Form

Description of Figure 6-3 follows
Description of ''Figure 6-3 Output Stream Access Interface Usage Revisions Form''

Output Stream Access Interface Name

Enter the OSA interface name to associate with an object. Use the visual assist to select a valid interface name.

Report Name

Enter the name of the report to associate with the OSA interface. *ALL indicates all reports.

Version

Enter the name of the batch version to associate with the OSA interface. *ALL indicates all batch versions of the defined report.

Environment Name

Enter the location of the report and batch version specifications.

Host Name

Enter the name of the server that processes the defined batch version.

User/Role

Enter the user ID or role with permissions to use the OSA interface. *PUBLIC gives permissions to all users.

Usage Status

Select a user-defined code (UDC) (H98|ST) that indicates whether the OSA interface is active or not active.