fix file access issue
Some checks failed
MVS Delete Members / delete-members (push) Failing after 14s
MVS Submit & Execute / upload-and-run (push) Successful in 53s

This commit is contained in:
Greg Gauthier 2026-02-08 14:50:44 +00:00
parent 7fd140595a
commit cf443e62b5
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,7 @@
//TXTWKR01 JOB (GCC),'File I/O Example', //TXTWKR01 JOB (GCC),'File I/O Example',
// NOTIFY=@05054,CLASS=A,MSGCLASS=H, // NOTIFY=@05054,CLASS=A,MSGCLASS=A,
// MSGLEVEL=(1,1),REGION=4M,TIME=1440 // MSGLEVEL=(1,1),REGION=4M,TIME=1440
//* Compile and Go Step //* Compile and Go Step
//STEP1 EXEC GCCCG,INFILE='@05054.SRCLIB.C(TXTWKR01)' //STEP1 EXEC GCCCG,INFILE='@05054.SRCLIB.C(TXTWKR01)'
//GO.TESTDD DD DSN=@05054.DATA(TESTMEM),DISP=OLD //GO.TESTDD DD DSN=@05054.DATA(TESTMEM),DISP=SHR
// //

View File

@ -14,10 +14,11 @@ int main()
/* Open the file in update mode (read and write). */ /* Open the file in update mode (read and write). */
/* The filename is "dd:DDNAME" where DDNAME is defined in JCL. */ /* The filename is "dd:DDNAME" where DDNAME is defined in JCL. */
fp = fopen("dd:TESTDD", "r+"); fp = fopen("dd:TESTDD", "a+");
if (fp == NULL) if (fp == NULL)
{ {
perror("fopen failed. Insure the member exists."); perror("fopen failed.");
printf("errno = %d\n", errno);
return 1; return 1;
} }