CICS Server Applications

The following are currently available:

CICS Server Program Language Description
srvtime COBOL & C Returns date and timestamp in first 18 characters of commarea
faadecic COBOL & C Returns date and timestamp in a commarea of length 18
(as srvtime but less robust and not suitable for synj0c3)
dlytime COBOL Returns date and timestamp in a commarea of length 18 AFTER a delay of 'n' seconds as passed by the client application
srvnls COBOL Used in conjunction with Java application ecijnls for testing NLS data

Server Output

The default is for server output to be displayed via the EXEC CICS WRITE OPERATOR command. If this is not desired, the source code offers an alternative option, which is to write the output to the CICS transient data queue 'CSMT'. Before compilation, comment/uncomment the lines as required.

Data Conversion

If the CICS server is EBCDIC based (eg CICS for OS/390, or CICS for OS/400) then the data in the commarea requires data conversion. For CICS for OS/390 this is achieved using the DFHCNV macro. The following code excerpt can be used:

DFHCNV TYPE=INITIAL,CDEPAGE=437 DFHCNV TYPE=ENTRY,RTYPE=PC,RNAME=SRVTIME,USREXIT=NO DFHCNV TYPE=SELECT,OPTION=DEFAULT DFHCNV TYPE=FIELD,OFFSET=0,DATATYP=CHARACTER,DATALEN=32767, X LAST=YES LABLN DFHCNV TYPE=FINAL END DFHCNVBA

For CICS for OS/390 refer to the book: Communicating from CICS on System/390 (document DFHZAE02).