OpenVMS Source Code Demos

system_demo.c

// =========================================================
// title   : system_demo.c
// author  : Neil Rieck
// edit    : 2023-08-10
// platform: DEC-C on OpenVMS-8.4
// notes   : since OpenVMS then the script must be valid DCL
// =========================================================
#include <stdio.h>
#include <stdlib.h>

int main(void) {
  long rc = 0;
  printf("-i-step-1: calling system\n"); 
  rc = system("dir *.c/col=1/width=file=50/date/size");
  printf("-i-step-2: back in main\n");
  printf("-i-system-rc: %ld\n", rc);
  return 0;
}