Reading work file from a unix named pipe

I have 2 large work files I need to read as one work file concatenated together. Seems like Unix named pipes are the way to go. But when I try to read a work file that is a named pipe, I get this error:

NAT6220 Internal error when reading work file.

My Unix script is:

mkfifo $PWD/catpipe
cat File1.txt File2.txt >$PWD/catpipe &
echo ONE-WAY,BERGESL,passwd >cmobjin.txt
echo LBRDWK >cmsynin.txt
echo FIN >>cmsynin.txt
natural parm=nputeb33 bp=bpteuuat etid=$$ BATCHMODE auto=off\
    CMSYNIN=cmsynin.txt CMOBJIN=cmobjin.txt natlog=all\
    CMPRINT=cmprint.txt CMWRK01=$PWD/catpipe

The Natural program LBRDWK is:

1 #IN (A50)

We’re running Natural 8.3.7 on AIX

Anyone have any ideas on how to get this to work?


The basic problem here is, imho, that natural can’t determine the workfile type, did you set it in your natparm ?

I can get it to “work” when I add a DEFINE WORK TYPE “ASCII” (using two simple lf text files in my test),
but “working” is relative, there’s no error, but no data read/printed either. When I feed the pipe interactively
from a 2nd shell it sits there waiting until I “read” it from the natural program, then the cat process ends.

The documentation doesn’t give a clue if this is a supported scenario, so this calls for an incident
asking for clarification, I’d say.

A few years ago, a client of mine (AIX platform) researched this and was told by Support that named pipes were not officially supported, although it could be made to work under specific circumstances. I tried an Empower search, but couldn’t find any references to this inquiry.