[Migrated content. Thread originally posted on 18 October 2011]
Net Express 5.1/Windows XP Pro SP3File status codes do not appear to be being returned.
I'm using standard code lifted straight from MF examples:
file-control.
select artist-file
....
file-status ws-artist-file-status
....
working-storage section.
01 ws-artist-file-status.
03 status-key-1 pic x.
03 status-key-2 pic x.
03 binary-status redefines status-key-2
pic 99 comp-x.
...
01 file-error-message.
03 filler pic x(24)
value "Error processing file : ".
03 status-key-1-display pic x.
03 filler pic x(3).
03 status-key-2-display pic 9(3).
procedure division.
....
invalid-key-process.
move status-key-1 to status-key-1-display
if status-key-1 not equal 9
move status-key-2 to status-key-2-display
else
move binary-status to status-key-2-display
end-if
move file-error-message to message-line
perform display-message.On an 'invalid key' condition status-key-1 and status-key-2 contain nothing.
Since status-key-1 contains nothing ('spaces') and is, therefore, not = 9 then the program errors out with '163 illegal character in numeric field' on the next sentence.
I'm puzzled ;-) (of course, I may be missing something also.)
