Вы находитесь на странице: 1из 5

You are here: Application Framework > Open Financial Service > OFS special

characters > Summary: What this How To will show you


OFS special characters

Summary: What this How To will show you


This document explains the usage of reserved characters in OFS messages.

The objective of this document is to illustrate the usage of replacement characters in the place of
reserved characters and other special characters that are supported by OFS.

Pre-requisites
N/A

Environment
The Screen shots, functionality and workflow are based on a Model Bank R12

Overview
SPECIAL CHARACTERS IN OFS: Usage of special characters in OFS are illustrated under four categories:

a. Usage of escape sequences in the place of reserved characters.

b. Usage of underscore in the data section of OFS messages.

c. Usage of NULL as a field value.

d. Characters used in Special messages category.

OFS REPLACEMENT CHARACTERS

a. OFS supports replacement characters, when there is a requirement to use reserved characters
which has a special meaning in OFS.

The OFS reserved characters and their corresponding replacement characters are:

Replacement OFS Reserved Character


Character

Question mark (?) Comma (,)

Pipe Line symbol (|) Double quotes (")

Caret symbol (^) Forward slash (/)

Scenarios:
To use comma in OFS string.
? Question Mark:

OFS Request
SECTOR,/I/PROCESS,INPUTT/123456,700,DESCRIPTION::=CORPORATE?
SECTOR,SHORT.NAME::=CORPSEC

OFS Response
700//1,DESCRIPTION:1:1=CORPORATE,SECTOR,SHORT.NAME:1:1=CORPSEC,RECORD.STATUS:1:1=INA
U,CURR.NO:1:1=1,INPUTTER:1:1=14499_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=1207161236,
CO.CODE:1:1=US0010001,DEPT.CODE:1:1=1

To use double quotes in OFS string


| Pipeline:

OFS Request
SECTOR,/I/PROCESS,INPUTT/123456,700,DESCRIPTION::=CORPORATE|
SECTOR,SHORT.NAME::=CORPSEC

OFS Response
700//1,DESCRIPTION:1:1=CORPORATE"SECTOR,SHORT.NAME:1:1=CORPSEC,RECORD.STATUS:1:1=IN
AU,CURR.NO:1:1=1,INPUTTER:1:1=96264_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=120716123
8,CO.CODE:1:1=US0010001,DEPT.CODE:1:1=1

To use slash in OFS string


^ Caret:

The ^ (Caret Symbol) is primarily used as a replacement character for the Transaction ID part of the OFS
string, as shown in the e.g., below.

OFS Request
TSA.SERVICE,/I/PROCESS,INPUTT/123456,BNK^OFS.MESSAGE.SERVICE,DESCRIPTION::=DESC,WORK.P
ROFILE::=ONE,USER::=SEAT.USER,SERVICE.CONTROL::=START

OFS Response
BNK/OFS.MESSAGE.SERVICE//1,DESCRIPTION:1:1=DESC,WORK.PROFILE:1:1=ONE,SERVER.STATUS:1:
1=AUTHORISER,USER:1:1=SEAT.USER,SERVICE.CONTROL:1:1=START,DATE:1:1=20001130,STARTED:1
:1=01/02/2010 14:32:03,STOPPED:1:1=23/01/2012
20:44:40,ELAPSED:1:1=17310:12:37,RECORD.STATUS:1:1=INAU,CURR.NO:1:1=6,INPUTTER:1:1=9996
4_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=1207161244,CO.CODE:1:1=DE0010001,DEPT.CODE:
1:1=1

To use double slash in OFS string


If Double slash is required (//) in the data portion of the OFS message, use two caret symbols (^^) in
the OFS request.

OFS Request
SECTOR,/I/PROCESS,INPUTT/123456,700,DESCRIPTION::=CORPORATE^^SECTOR,SHORT.NAME::=CO
RPSEC

OFS Response
700//1,DESCRIPTION:1:1=CORPORATE//SECTOR,SHORT.NAME:1:1=CORPSEC,RECORD.STATUS:1:1=IN
AU,CURR.NO:1:1=1,INPUTTER:1:1=99964_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=120716133
1,CO.CODE:1:1=US0010001,DEPT.CODE:1:1=1

A look at the OFS response clearly displays that, escape sequences used in the request are replaced by
the corresponding characters in the response.

Consider if a OFS response must display the same escape sequence characters used in the request.
However the appropriate changes must reflect in the record stored in the application. If so, then set the
value SPECIAL.CHAR.CONV in the attribute field of the OFS.SOURCE record.

OFS Request
SECTOR,/I/PROCESS,INPUTT/123456,7001,DESCRIPTION::=CORPORATE^^SECTOR,SHORT.NAME::=C
ORPSEC

OFS Response
7001//1,DESCRIPTION:1:1=CORPORATE^^SECTOR,SHORT.NAME:1:1=CORPSEC,RECORD.STATUS:1:1
=INAU,CURR.NO:1:1=1,INPUTTER:1:1=87694_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=120716
1336,CO.CODE:1:1=US0010001,DEPT.CODE:1:1=1

To use underscore in OFS string


If underscore (_) is required in the data portion of the OFS message, enclose it within single quotes '_'.

OFS Request
TSA.SERVICE,/I/PROCESS,INPUTT/123456,BNK^OFS.MESSAGE.SERVICE,DESCRIPTION::=USE'_'O'UNDE
RSCORE,WORK.PROFILE::=ONE,USER::=SEAT.USER,SERVICE.CONTROL::=START

OFS Response
BNK^OFS.MESSAGE.SERVICE//1,DESCRIPTION:1:1=USE_O'UNDERSCORE,WORK.PROFILE:1:1=ONE,SE
RVER.STATUS:1:1=AUTHORISER,USER:1:1=SEAT.USER,SERVICE.CONTROL:1:1=START,DATE:1:1=2000
1130,STARTED:1:1=01^02^2010 14:32:03,STOPPED:1:1=23^01^2012
20:44:40,ELAPSED:1:1=17310:12:37,RECORD.STATUS:1:1=INAU,CURR.NO:1:1=6,INPUTTER:1:1=1562
8_INPUTTER__OFS_TEST.TELNET,DATE.TIME:1:1=1207161409,CO.CODE:1:1=DE0010001,DEPT.CODE:
1:1=1

To use NULL in OFS string


If the text ‘NULL’ is required as a field value in OFS, prefix it with a ‘\’
NULL passed directly as the field value, will result in an ‘INPUT MISSING’ response for the field, as NULL
is ignored.

OFS Request
SECTOR,/I/PROCESS,INPUTT/123456,1011,DESCRIPTION::="\NULL",SHORT.NAME::="NULL VALUE"

OFS Response
1011/TLNT120267802617418.00/1,DESCRIPTION:1:1=NULL,SHORT.NAME:1:1=NULL
VALUE,RECORD.STATUS:1:1=INAU,CURR.NO:1:1=1,INPUTTER:1:1=78026_INPUTTER__OFS_TELNET,D
ATE.TIME:1:1=1211140450,CO.CODE:1:1=GB0010001,DEPT.CODE:1:1=1

To use replacement characters as part of field data directly in OFS string


If the replacement character is required as a part of field data text, then the OFS replacement character
effect can be neutralized, by wrapping the replacement character with % in the field data. (%?%, %|%,
%^%)

OFS Request
VERSION, ?/I/PROCESS//0/,INPUTT/123456,SECTOR?TST,RECORDS.PER.PAGE:1:1=1,
FIELDS.PER.LINE:1:1=1,NO.OF.AUTH:1:1=0,DESCRIPTION:1:1=CONFIRM(Y/N)%?%

OFS Response
SECTOR,TST/TEST130364677336130.02/1,RECORDS.PER.PAGE:1:1=1,FIELDS.PER.LINE:1:1=1,NO.OF.A
UTH:1:1=0,

LOCAL.REF.FIELD:1:1=LOCAL.REF,REPORT.LOCKS:1:1=YES,DESCRIPTION:1:1=CONFIRM(Y/N)?,CURR.N
O:1:1=2,

INPUTTER:1:1=46773_INPUTTER__OFS_TELNET,DATE.TIME:1:1=1302051002,AUTHORISER:1:1=46773
_INPUTTER_OFS_TELNET,CO.CODE:1:1=US0010001,DEPT.CODE:1:1=1

Characters used in special messages category


SPECIAL MESSAGES CATEGORY: The characters mentioned below comes under special messages
category:

_ (underscore) ---> Used for Forex transactions for separating the legs.

// (Double slash) ---> Used for LD transactions for defining the schedules.

Conclusion
Reserved Characters (comma (,), Double quotes (”), forward slash (/)) must not be used in the OFS
message directly. They must be replaced by OFS replacement characters.

OFS replacement characters required directly in field data must be wrapped within % i.e., %|%,%^%,
%?%

The special messages category ( _ and //) must not be used directly in the OFS message.

Characters apart from these namely., @,( and { can be used as the same in the OFS request.

Published on : 21.12.2014

Вам также может понравиться