IBM 4J manual Return Code, Goodrc Errorrc

Page 82

C++ Function

C Function

Description

 

 

 

exit_child_init()

exit_child_init_c()

Use this function as the first line in a user exit

 

 

program to initialize communications between

 

 

Sterling Connect:Direct and the user exit program.

 

 

 

recv_exit_msg()

recv_exit_msg_c()

Used by both Sterling Connect:Direct and the user

 

 

exit program to receive a message from the other

 

 

Process. The receive exit messages wait for a

 

 

response from the other Process.

 

 

 

send_exit_file()

send_exit_file_c()

The user exit program uses this function when it

 

 

has opened a file for Sterling Connect:Direct. This

 

 

function uses underlying UNIX methods to pass

 

 

an open file descriptor. from one Process to

 

 

another.

 

 

 

send_exit_msg()

send_exit_msg_c()

Both Sterling Connect:Direct and the user exit

 

 

program use this function to send a message to

 

 

the other Process. Send messages are followed

 

 

with a receive message to get the response from

 

 

the other Process.

 

 

 

Initializing Communications with exit_child_init() or exit_child_init_c()

Use the exit_child_init() or exit_child_init_c() function as the first line of code of the user exit program to initialize communications. This function performs a check to verify that each side is ready to communicate. Following is the format of the exit_child_init() function:

int exit_child_init( char * logfile )

The exit_child_init() or exit_child_init_c() function has the following parameter:

Parameter

Description

Value

 

 

 

logfile

The name of the log or trace file that is opened for

Name of log file or

 

use by the user exit programs. Because the file open

trace file

 

and security exit are started by SMGR, which is

 

 

running as root, the exits also run as root. Running

 

 

the exits as root can cause problems with file

 

 

permissions of the log file, so logfile enables you to

 

 

easily change owner or permissions on the file. See

 

 

the sample exit in d_dir/ndm/src/exit_skeleton.c

 

 

for more details.

 

 

 

 

The exit_child_init() or exit_child_init_c() function have the following return codes. Return codes for the function are defined in ndmapi.h.

Return Code

GOOD_RC

ERROR_RC

Description

Communications between Sterling Connect:Direct and the user exit program were successfully initialized.

Communications between Sterling Connect:Direct and the user exit program could not be initialized.

76Sterling Connect:Direct for UNIX: User Guide

Image 82
Contents User Guide Page User Guide Copyright IBM Corporation 1999 Contents Iv Sterling ConnectDirect for Unix User Guide Starting the CLI Overview of the Command Line InterfaceCLI Commands Stopping the CLISample Command Option Description Value EntryCLI Job Control CdpnumCommand CLI History CommandsOverview of Sterling ConnectDirect Commands Command Abbreviation DescriptionAbbreviations for Common Sterling ConnectDirect Commands Parameter AbbreviationPname = A?PROD5 Submitting a ProcessParameter Description Values Parameter Description Values Username@hostname or user@localhost Id , pswdName host name nnn.nnn.nnn.nnn or Name nnnnnId ,pswd ,newpswd Snodeid fieldSpecify retain=initial Following command submits the Process named payroll Following command submits the Process named copyfilParameter Description Value Following command submits the Process named copy.cdpChanging Process Parameters Name generic listRemote node specification generic list Node specification, userid generic listDeleting a Process from the TCQ Number list Removing a Process from the Execution Queue Flush process command has the following optional parameters Stopping Sterling ConnectDirectViewing a Process in the TCQ Parameter DescriptionPname Locate the Process to view EX HC HE HI HO HR HS PE Following command displays the specified Process number Monitoring Process Status in the TCQAll EX HC HE HI HO HR HS PE Output from the command is displayed in the following table Determining the Outcome of a Process Dest=/path/file nameCaev Capr CAEV, Capr Record id listParameter Description Value Parameter Description Value Parameter Description Value Srcf=/path/file name Date day , hhmmss ampmGenerating a Detailed Output Report for a Process Select Statistics Running System DiagnosticsGenerating a Summary Report for a Process Recid LOG Timepname Pnumber Stepname Ccod Fdbk MsgidCOMM.TRC Smgr Trace smgr pnode tnode=ath3500ry level=2 file=Smgp.trc Scheduling Sterling ConnectDirect Activity Command DefinitionOverview of the Transmission Control Queue Scheduling Parameter Queue CommentsProgression of a Process Through the TCQ Execution Queue Element Comment Wait QueueStatus Comment Timer Queue Hold QueueHeld for Call indicates that the Process was Introduction to Translation Tables Creating a Translation TableCompiling a Translation Table Using the ndmxlt Utility Example-Creating a Translation TableUsing Translation During File Transfer Operations Example-Modifying a Model Translation TableMessage File Content Translation Table Error MessagesAccessing Sterling ConnectDirect Messages Diagnostic Number DescriptionDisplaying Message Text Following is a sample ndmmsg commandMessage File Record Format Following are the parameters for the message file recordSterling ConnectDirect for Unix User Guide Level-Compression level Using the Standalone Batch Compression UtilityFollowing are the parameters for the cdsacomp utility Memory-The amountCodepage Source codepage, destinationNnnnn Example-Precompress a Binary File Example-Precompress a Text FileExample-Precompress a Text File With Codepage Conversion Example-Decompress a Text FileExamples-csdacomp Command Help Cfgcheck command has the following arguments Validate Configuration FilesConfiguration Reports Argument DescriptionGenerating a Configuration Report on the Base Installation Type the following command at a Unix promptSterling ConnectDirect Utilities Following example shows an excerpt from a sample report Sterling ConnectDirect Utilities Sterling ConnectDirect for Unix User Guide Compiling Custom Programs Program using the C++ API callsIntroduction to Writing Custom Programs Compiler version to use for each platformPlatform Compile Command You want to create such as apicheckWriting Custom C Programs ++ Function DescriptionNdmerrenth Ndmnoerror NdmerrorNdmapirecvresp or Receiving Responses Using ndmapirecvresp or ndmapirecvrespcNdmapirecvrespc Parameter Description Value PNOD-PNODE Return Code Description Following is a sample ndmapirecvresp functionSNOD-SNODE TruncatedNdmapirecvresp or ndmapirecvrespc to retrieve Following is a sample ndmapisendcmd function Writing Custom C++ ProgramsNdmapisendcmdc function call has the following return codes Selectstatistics or Selectprocess , the CLISterling ConnectDirect for Unix User Guide Method Description Parameter Return Values CdfailureFollowing is the ConnectDirectSession class header Cdsuccess = 0, Cdfailure =Writing Custom Programs Sterling ConnectDirect for Unix User Guide Program Description User Exit ProgramsUser Exit Functions Chown root exitskeletonGoodrc Errorrc Return CodeWaiting for a Message Using recvexitmsg or recvexitmsgc ExitprogramFollowing are the parameters for sendexitmsg or sendexitmsgc HeaderStatistics Exit Message Overview of User Exit MessagesFile Open Exit Messages Security Exit Messages FileopenoutputreplymsgGeneratemsg Validatemsg ValidatereplymsgCopy Control Block User Exit Stop MessageExit Log Files Copyright IBM Corp IBM Corporation J46A/G4 Bailey Avenue San Jose, CA Trademarks Sterling ConnectDirect for Unix User Guide Index Special characters Generatemsg Generatereplymsg Validatemsg Validatereplymsg Page Sterling ConnectDirect for Unix User Guide Page Product Number 5725-C99