final tweaks
All checks were successful
MVS Upload & Execute / upload-and-run (push) Successful in 15s

This commit is contained in:
Greg Gauthier 2025-10-19 15:10:35 +01:00
parent a1cb23c13f
commit 4f09dc3ed0
3 changed files with 57 additions and 3 deletions

View File

@ -67,10 +67,8 @@ jobs:
run: |
echo "=== Debug: Starting upload/submit ==="
echo "File: ${{ steps.files.outputs.file }}"
echo $(/usr/bin/stat ${{ steps.files.outputs.file }})
echo $(nc -h)
echo "Member: ${{ steps.files.outputs.member }}"
python3 mvs_job.py "${{ steps.files.outputs.file }}" "@05054.SRCLIB.C" "${{ steps.files.outputs.member }}" "COMPILE"
python3 mvs_job.py "${{ steps.files.outputs.file }}" "@05054.SRCLIB.C" "${{ steps.files.outputs.member }}" "${{steps.files.outputs.member}}"
echo "=== Debug: Upload/submit complete ==="
env:
MVS_HOST: "oldcomputernerd.com"

7
jcl/SIEVE03.jcl Normal file
View File

@ -0,0 +1,7 @@
//GMG0002 JOB (GCC),'C Program Example',
// NOTIFY=@05054,
// CLASS=A,MSGCLASS=H,
// MSGLEVEL=(1,1),
// REGION=4M,TIME=1440
//STEP1 EXEC GCCCG,INFILE='@05054.SRCLIB.C(SIEVE03)'
//

49
src/SIEVE03.c Normal file
View File

@ -0,0 +1,49 @@
#include<stdio.h>
#define LIMIT 10000
#define PRIMES 1000
// Sieve of Eratosthenes
// Author: Greg Gauthier
// Date: 2016-01-20
int main()
{
int i,j,numbers[LIMIT];
int primes[PRIMES];
for (i=0;i<LIMIT;i++)
{
numbers[i]=i+2;
}
for (i=0;i<LIMIT;i++)
{
if (numbers[i]!=-1)
{
for (j=2*numbers[i]-2;j<LIMIT;j+=numbers[i])
numbers[j]=-1;
}
}
j = 0;
for (i=0;i<LIMIT&&j<PRIMES;i++)
if (numbers[i]!=-1)
primes[j++] = numbers[i];
printf("\n");
printf("PRIME NUMBERS BETWEEN 1 AND %d\n",LIMIT);
printf("TOTAL PRIMES FOUND: %d\n\n",PRIMES);
printf("LIST OF PRIMES:\n\n");
for (i=0;i<PRIMES;i++)
if (i % 20 == 0)
{
printf("\n %4d ",primes[i]);
}
else
{
printf("%4d ",primes[i]);
}
return 0;
}