× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is older code, last modified in 2014 - system at V7R1 and ptfs not
latest cume but just before latest (and yes - we know V7R1 is ancient).
The first section (unlink) works, but the open terminates the pgm and the
clp throws
There is a 27 minute gap between the call of the RPGLE and the failure.

Has anyone run into a problem delay like this?


Make sure we don't have an old file that might be in the way
(ENOENT means it didnt exist to begin with)
if unlink(%trim(filename)) < 0
eval err = errno
if err <> ENOENT
callp die('unlink(): ' + %str(strerror(err)))
endif
endif

Create a new file, and assign it a code page of 819:
eval fd = open(%trim(filename):
O_CREAT+O_WRONLY+O_CODEPAGE:
S_IWUSR+S_IRUSR+S_IRGRP+S_IROTH:
819)
if fd < 0
callp die('open(): ' + %str(strerror(errno)))
eval @errflag='Y'
endif
callp close(fd)

There is a 27 minute gap between the call of the RPGLE and the failure, but
the open is literally one of the first steps

*NONE Command 04/15/18 21:05:47.582462
QCLCLCPR QSYS 04CF MDC001C KRMMOD *STMT
To module . . . . . . . . . :
MDC001C
To procedure . . . . . . . :
MDC001C
Statement . . . . . . . . . :
6100
Message . . . . : 6100 - CALL
PGM(MDC005R) /* The CALL command
contains parameters
*/
CPF9897 Escape 40 04/15/18 21:32:44.530563
MDC005R KRMMOD *STMT MDC001C KRMMOD *STMT
From module . . . . . . . . :
MDC005R
From procedure . . . . . . :
DIE
Statement . . . . . . . . . :
4844
To module . . . . . . . . . :
MDC001C
To procedure . . . . . . . :
MDC001C
Statement . . . . . . . . . :
6100

Jim

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.