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:
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\
The Natural program LBRDWK is:
DEFINE DATA LOCAL
1 #IN (A50)
READ WORK FILE 1 #IN
We’re running Natural 8.3.7 on AIX 220.127.116.11
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.