CA XCOM transfer of ASCII file from LINUX to HP NonStop (Tandem) using RECORD_FORMAT=FB results in in a NonStop Guardian error 21

book

Article ID: 194698

calendar_today

Updated On:

Products

CA XCOM Data Transport CA XCOM Data Transport - Windows CA XCOM Data Transport - Linux PC CA XCOM Data Transport - z/OS XCOM - SUPPORT

Issue/Introduction

A CA XCOM file transfer was initiated from a Linux PC system to a HP NonStop (Tandem) specifying these XCOM for Linux parameters to create an Entry Sequence Structured file on the HP NonStop system:
CODE_FLAG=ASCII
RECORD_FORMAT=FB

The transfer fails with this error in the XCOM remote log file on HP NnStop:
2020/07/08, 16:19:05 $Z8B5  Error # 21 writing output file 
2020/07/08, 16:19:05 $Z8B5  XCOMT0416E ERROR_WRITING_OUTPUT_FILE

An XCOM trace file generated for the transfer on HP NonStop (XTRACE=9) also shows error 21:
16:19:05.501 $Z8B5 tandem.c(4135): WRITEX error 21
16:19:05.501 $Z8B5 tandem.c(4136): errno = 4002
16:19:05.501 $Z8B5 fsmachin.c(519): SNA Receive State(3), XCOM state = 416 -- XCOMT0416E ERROR_WRITING_OUTPUT_FILE
16:19:05.501 $Z8B5 fsmachin.c(3474): Error writing output file Guardian or User Defined Error 21

Cause

The meaning of the NonStop Guardian error 21:
$SYSTEM SYSTEM 1> error 21
0021 An illegal <count> was specified in a file-system call, or the operation attempted to transfer too much or too little data.

That error is issued when the XCOM LRECL value specified for the Entry Sequence structured file trying to be created on NonStop is too small

Environment

Release : 11.1
Component : CA XCOM Data Transport for HP NonStop

Resolution

To resolve the problem increase/specify the files logical record length (LRECL) by using the XCOM Linux .cnf parameter LRECL (the default is LRECL=160).
To determine the LRECL size of a fixed or variable length file, try the following command:
cat file.name | awk '{print length($0)}' | sort -g | tail -1

NOTE: The Linux .cnf parameter MAXRECLEN is set by default to 1024. If the record length is larger than 1024, then MAXRECLEN will also have to be set to the same value as LRECL.