Daily Support Issues


Reflect Command Error Codes

One of the first questions of 2017 was what was the Error message associated with an ERROR-CODE returned from the PC REFLECT command. I googled REFLECT ERROR-CODE and I couldn't find the associated error message.

I tried to read thru some of the Attachmate/Micro-Focus Reflection manuals to no avail. Then I remembered the good old Help files in the Reflection directory. Of course you have to install the WinHelp helper program to read help files which hasn't been available since Windows 7. I vaguely remembered that the ERROR-CODES would be found in the RCL help file.

The following errors can be referenced with the ERROR-CODE function.

			1	Transmit error.  CTS or DSR required; if modem connection, no DCD present.
			2	EOF on file read.
			3	Timeout while waiting for expected or specified data.
			4	Received unexpected data from host.
			5	File transfer aborted by user.
			6	Fatal block number sequence error on a file transfer.
			7	Received a nonprocessable message during file transfer.
			8	Data message received during file transfer was not the correct packet type.
			
			9	File transfer aborted by host program.
			10	Local file does not exist.
			11	File transfer failed.
			12	File transfer software is incompatible with the host file transfer software.
			13	Disk error detected.
			14	Too many consecutive NAKs received or sent during a file transfer.
			15	Could not create local file.
			16	Could not execute host file transfer program.
			17	User requested termination of file transfer with STOP (not ABORT).
			
			18	Local file already exists.
			19	Unexpected error detected.
			20	Unsupported terminal class (relates to IBM hosts). 
			21	VM in CP mode (relates to IBM hosts).
			22	Bad syntax (relates to IBM hosts).
			23	File transfer link failed.
			24	File not updated.
			25	No file selected.
			26	Host software requires OLD-WRQ file transfer protocol.
			101	No files were found to backup. 
			103	Backup terminated by user. 
			
			104	Backup terminated due to error. 
			120	Not a valid state file. 
			121	Error loading state file. 
			122	Must have an external LATCI to exit.
			160	Bad command. 
			161	Command Language Syntax Error. 
			162	Error detected while executing command. 
			163	Decryption error. 
			164	Buffer overflow while transmitting. 
			201	System error, DDE operation not completed (DDE client error code). 
			202	Insufficient memory available for the operation (DDE client error code). 
			
			203	An invalid conversation was specified (DDE client error code). 
			204	Maximum conversation count was exceeded (DDE client error code). 
			205	Client message not acknowledged by server, timed out (DDE client error code). 
			206	Server sent negative acknowledgment (DDE client error code). 
			207	Server is busy, unable to complete DDE operation (DDE client error code).
			208	Waiting for server acknowledgment of message (DDE client error code). 
			
			209	Invalid advise-link was specified (DDE client error code). 
			210	Maximum advise-link count exceeded (DDE client error code). 
			211	Advise-link to item already exists (DDE client error code). 
			212	Data from server is invalid or has invalid format (DDE client error code). 
			251	VINT14.386 not installed. 
			252	Invalid communications driver. 
			253	Not enough memory to load driver. 
			254	No more connection handles available. 
			
			255	Cannot load communications driver. 
			256	Cannot free overlay memory. 
			257	Invalid handle. 
			258	Can't find communication driver overlay. 
			259	Error opening device through Windows. 
			260	Required drivers not found. 
			261	VINT14 memory allocation error. 
			262	Port already in use. 
			263	Connection already in use. 
			264	Cannot connect to host. 
			265	No host name specified. 
			266	No more network handles available. 
			
			267	Invalid connection name. 
			268	Invalid password. 
			269	Character Delay value is out of range. 
			270	Line Delay value is out of range. 
			271	VINT14 not compatible with DLL. 
			272	Cannot delete default templates. 
			273	Cannot load a library. 
			274	Missing or invalid RCOMTASK.EXE. 
			275	Subfunction invalid or not supported.
			276	Subfunction call failed.
			277	Waiting for connection to come up.
			
			278	Cannot change a default saved connection.
			279	Error attaching to server.
			280	Machine setup requires using the Windows serial driver. From command window type 'SET ENHANCED-SERIAL-DATACOMM NO'.
			281	Could not create socket for your  connection.Check your  network software installation and configuration.
			282	Could not resolve host name.
			283	Host unreachable.
			284	Connection refused by host.
			
			285	Connection timed out.
			286	General connection failure.
			287	Host currently busy.
			288	Insufficient resources for operation.
			289	Host is not in service table.
			290	LAT session control block is corrupt.
			291	Connection terminated by user.
			292	The VINT14.386 driver defined in SYSTEM.INIis a lower version level than RCOMNG.DLL.
			293	Reflection communication module is an illegal version.
			294	User canceled.
			
			295	Invalid command issued to modem.
			296	Failed to detect dialtone.Modem not hooked to telephone network.
			297	Remote computer did not answer. NO ANSWER
			298	Could not connect to remote computer. NO CARRIER
			299	Could not connect to remote computer. Line is busy.
			300	Could not communicate with the modem. Modem power is off or connection path is incorrect.
			301	No modems installed.
			302	Could not translate international phone number.No dialing plans defined.
			
			303	User Changed Connection Options.
			304	Could not connect using saved connection.The saved connection has been removed.
			305	Required communication software is not supported in this environment.
			306	Not attached to server.
			307	Cannot detach from server while other NLAT connections are open.
			308	Configuration string contains no keywords.
			309	Value for keyword is invalid.
			310	Configuration string contains an unknown keyword.
			
			311	A keyword was found that has no value setting.
			312	Unknown connection type requested.
			313	Keyword value cannot be changed while a connection is open.
			314	Changing a connection type while a connection exists is not allowed.
			315	A value for a keyword exceeds the maximum allowable length.
			316	Length of the keyword is too long.
			317	Attempt to set a keyword to an unknown value.
			318	Unable to open the reflect.ini file.
			
			319	The reflect.ini file is write protected.
			320	Could not translate phone number.Unbalanced dialing variable expression.
			321	Could not translate phone number.Unknown dialing variable used.
			322	Reflection cannot establish another session because this would exceed the limit established by your system administrator.
			323	Invalid phone number.
			324	Configuration string contains an inappropriate keyword for the current connection type.
			
			325	Cannot open specified com port.
			326	Cannot set transmit and receive buffer size for the specified com port.
			327	Cannot set time out value for the specified com port.
			328	Cannot configure the specified com port.
			329	Connection failure. Please make sure your TCP/IP network is properly is installed. Push Help for network trouble shooting information.
			330	Your modem responded to the command  with an error.  Click OK to ignore the error and continue.
			
			331	NetWare User Name is invalid.
			332	NetWare Password is required.
			333	NetWare User Name or Password is invalid.
			334	NetWare User Name required.
			335	Unable to load all NLAT resources.Try quitting some other applications.
			336	Unable to start NLAT.The NLATTask module is missing.
			337	 has a version level of .Reflection requires that this module have a version level greater than or equal to .	
	


Adding Records

There are multiple ways of adding records to a database. The method and means depends upon the format of the data, however, the main goal is to get the data into a self-describing file, and then put the data into the database.

In order to add data to a dataset the best method is to create a self-describing file with the data you want to add and then simply put the data using the self-describing file. So the actual put of the data is very simple. Once you have a self-describing file in the same format for each field in order, the add of the data is as follows:

suprtool << EOD
base MEMBRS,1,;
in toadd
put RESPONSE-FILE
EXIT
EOD

The above simply takes the self-describing file toadd and puts the records into the dataset RESPONSE-FILE.

Typically data comes in two ways:
  1. Fixed data that add one by one.
  2. Large amounts of data in a .csv file or similar.

Adding Data One by One

So the trick really is how do I create a file that looks exactly like the data in RESPONSE-FILE with the data you want. The easy part is you can use RESPONSE-FILE.

suprtool << EOD
base MEMBRS,5,;
GET RESPONSE-FILE
NUMRECS 1
EXT ACCOUNT=12345
EXT SUFFIX=0
EXT LINE-NUMBER=1
EXT TYPE-CODE="S"
EXT ENTRY-DATE=20170116
EXT QUEST-CODE="SOME VALUE"
EXT TELLER-INTLS="ABC"
EXT MBR-BRANCH=1
EXT SUB-BRANCH=1
EXT RESPONSE="MEMBER RESPONSE TO QUESTION
EXT CHANGE-DATE=20170116
out toadd,link
exit 
EOD
Adding Data from A File

Again if you have data in a file the premise is the same, which is to get the data in an SD file.

Now data can come in files in many formats
Data one Field per Record
Sometimes data comes in the format of one field per record as in:
12345
0
1
S
20170116
SOME VALUE
ABC
1
1
MEMBER RESPONSE TO QUESTION
20170116
You can use qedit to manipulate the data:
12345
0
1
S
20170116
SOME VALUE
ABC
1
1
MEMBER RESPONSE TO QUESTION
20170116

You can take the above to the necessary commands by doing something like this:

qedit << EOD
t mydata
cq 1 :ACCOUNT=: 1
cq 1 :SUFFIX=: 2
cq 1 :LINE-NUMBER=: 3
cq 1 :TYPE-CODE=': 4
cq 1 :ENTRY-DATE=: 5
cq 1 :QUEST-CODE=': 6
cq 1 :TELLER-INTLS=': 7
cq 1 :MBR-BRANCH=: 8
cq 1 :SUB-BRANCH=: 9
cq 1 :RESPONSE=': 10
cq 1 :CHANGE-DATE=: 11
append :': 4,6,7,10
rm supruse
k supruse,unn
exit
EOD

Then you could use the file you just created with Qedit in a suprtool task:

suprtool << EOD
base MEMBRS,5,;
GET RESPONSE-FILE
NUMRECS 1
useq supruse
out toadd,link
exit
EOD
Now the most common method of receiving data that you want to add to a dataset is typically in .CSV format
.CSV file