From 78ea32b3d9b8df42a20e8ad40e71ac4f795ff9de Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sun, 8 Feb 2026 14:59:34 +0000 Subject: [PATCH] get the errno value --- jcl/TXTWKR01.jcl | 2 +- src/TXTWKR01.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jcl/TXTWKR01.jcl b/jcl/TXTWKR01.jcl index 58c762a..e533f66 100644 --- a/jcl/TXTWKR01.jcl +++ b/jcl/TXTWKR01.jcl @@ -4,4 +4,4 @@ //* Compile and Go Step //STEP1 EXEC GCCCG,INFILE='@05054.SRCLIB.C(TXTWKR01)' //GO.TESTDD DD DSN=@05054.DATA(TESTMEM),DISP=SHR -// \ No newline at end of file +// diff --git a/src/TXTWKR01.c b/src/TXTWKR01.c index 5546b6a..6097b81 100644 --- a/src/TXTWKR01.c +++ b/src/TXTWKR01.c @@ -1,4 +1,5 @@ #include +#include #define BUFFER_SIZE 256 @@ -18,7 +19,7 @@ int main() if (fp == NULL) { perror("fopen failed."); - printf("errno = %d\n", errno); + printf("errno = %d\n", __errno()); return 1; }