/* Generated by cobc 3.1.2.0 */ /* Generated from hellocobol_variables.cob */ /* Generated at Aug 04 2025 19:18:38 */ /* GnuCOBOL build date Jul 15 2023 12:00:00 */ /* GnuCOBOL package date Dec 23 2020 12:04:58 UTC */ /* Compile command cobc -x -g -o hellocobol_variables hellocobol_variables.cob */ #include #include #define COB_KEYWORD_INLINE __inline #include #define COB_SOURCE_FILE "hellocobol_variables.cob" #define COB_PACKAGE_VERSION "3.1.2" #define COB_PATCH_LEVEL 0 #define COB_MODULE_FORMATTED_DATE "Aug 04 2025 19:18:38" #define COB_MODULE_DATE 20250804 #define COB_MODULE_TIME 191838 /* Global variables */ #include "hellocobol_variables.c.h" /* Function prototypes */ static int _02_VARIABLES (); static int _02_VARIABLES_ (const int); static void _02_VARIABLES_module_init (cob_module *module); /* Main function */ int main (int argc, char **argv) { cob_init (argc, argv); cob_stop_run (_02_VARIABLES ()); } /* Functions */ /* PROGRAM-ID '02_VARIABLES' */ /* ENTRY '_02_VARIABLES' */ static int _02_VARIABLES () { return _02_VARIABLES_ (0); } static int _02_VARIABLES_ (const int entry) { /* Program local variables */ #include "hellocobol_variables.c.l.h" /* Start of function code */ /* CANCEL callback */ if (unlikely(entry < 0)) { if (entry == -10) goto P_dump; if (entry == -20) goto P_clear_decimal; goto P_cancel; } /* Check initialized, check module allocated, */ /* set global pointer, */ /* push module stack, save call parameter count */ if (cob_module_global_enter (&module, &cob_glob_ptr, 0, entry, 0)) return -1; /* Set address of module parameter list */ module->cob_procedure_params = cob_procedure_params; /* Set frame stack pointer */ frame_ptr = frame_stack; frame_ptr->perform_through = 0; frame_ptr->return_address_ptr = &&P_cgerror; frame_overflow = frame_ptr + 255 - 1; /* Initialize rest of program */ if (unlikely(initialized == 0)) { goto P_initialize; } P_ret_initialize: /* Increment module active */ module->module_active++; /* Entry dispatch */ goto l_2; /* PROCEDURE DIVISION */ /* Line: 28 : Entry 02_VARIABLES : hellocobol_variables.cob */ l_2:; #line 28 "hellocobol_variables.cob" ENTRY_02_VARIABLES:; #line 100 "hellocobol_variables.c" #line 29 "hellocobol_variables.cob" SECTION_MAIN_20SECTION:; #line 103 "hellocobol_variables.c" #line 29 "hellocobol_variables.cob" cob_nop (); #line 106 "hellocobol_variables.c" /* Line: 29 : DISPLAY : hellocobol_variables.cob */ module->module_stmt = 0x0010001D; #line 29 "hellocobol_variables.cob" cob_trace_stmt (st_1); #line 112 "hellocobol_variables.c" cob_display (0, 1, 1, &f_8); /* Line: 30 : DISPLAY : hellocobol_variables.cob */ module->module_stmt = 0x0010001E; #line 30 "hellocobol_variables.cob" cob_trace_stmt (st_1); #line 119 "hellocobol_variables.c" cob_display (0, 1, 1, &f_16); /* Line: 32 : MOVE : hellocobol_variables.cob */ module->module_stmt = 0x00100020; #line 32 "hellocobol_variables.cob" cob_trace_stmt (st_2); #line 126 "hellocobol_variables.c" memcpy (b_17, "01", 2); /* Line: 33 : MOVE : hellocobol_variables.cob */ module->module_stmt = 0x00100021; #line 33 "hellocobol_variables.cob" cob_trace_stmt (st_2); #line 133 "hellocobol_variables.c" cob_move ((cob_field *)&c_1, &f_20); /* Line: 35 : DISPLAY : hellocobol_variables.cob */ module->module_stmt = 0x00100023; #line 35 "hellocobol_variables.cob" cob_trace_stmt (st_1); #line 140 "hellocobol_variables.c" cob_display (0, 1, 1, &f_17); /* Line: 36 : STOP RUN : hellocobol_variables.cob */ module->module_stmt = 0x00100024; #line 36 "hellocobol_variables.cob" cob_trace_stmt (st_3); #line 147 "hellocobol_variables.c" cob_stop_run (b_2); module->module_stmt = 0x00100026; /* Program exit */ /* Decrement module active count */ if (module->module_active) { module->module_active--; } /* Pop module stack */ cob_module_leave (module); /* Program return */ return b_2; P_cgerror: cob_fatal_error (COB_FERROR_CODEGEN); /* Program initialization */ P_initialize: cob_check_version (COB_SOURCE_FILE, COB_PACKAGE_VERSION, COB_PATCH_LEVEL); cob_module_path = cob_glob_ptr->cob_main_argv0; _02_VARIABLES_module_init (module); module->crt_status = NULL; /* Initialize cancel callback */ cob_set_cancel (module); /* Initialize WORKING-STORAGE */ b_2 = 0; memcpy (b_8, "lp", 2); *(cob_u8_ptr)(b_8 + 2) = 124; memcpy (b_8 + 3, " number", 10); *(cob_u8_ptr)(b_8 + 13) = 124; memcpy (b_8 + 14, " decimal", 10); *(cob_u8_ptr)(b_8 + 24) = 124; memcpy (b_8 + 25, " currency", 10); memset (b_16, 45, 80); memset (b_17, 48, 2); *(cob_u8_ptr)(b_17 + 2) = 124; cob_move ((cob_field *)&c_2, &f_20); *(cob_u8_ptr)(b_17 + 13) = 124; cob_move ((cob_field *)&c_3, COB_SET_FLD(f0, 11, b_17 + 14, &a_7)); *(cob_u8_ptr)(b_17 + 25) = 124; cob_move ((cob_field *)&c_4, COB_SET_FLD(f0, 11, b_17 + 26, &a_9)); if (0 == 1) goto P_cgerror; initialized = 1; goto P_ret_initialize; P_dump: return 0; /* CANCEL callback handling */ P_cancel: if (!initialized) return 0; if (module && module->module_active) cob_fatal_error (COB_FERROR_CANCEL); initialized = 0; P_clear_decimal: return 0; } /* End PROGRAM-ID '02_VARIABLES' */ /* Initialize module structure for 02_VARIABLES */ static void _02_VARIABLES_module_init (cob_module *module) { module->module_name = "02_VARIABLES"; module->module_formatted_date = COB_MODULE_FORMATTED_DATE; module->module_source = COB_SOURCE_FILE; module->module_entry.funcptr = (void *(*)())_02_VARIABLES; module->module_cancel.funcptr = (void *(*)())_02_VARIABLES_; module->module_ref_count = NULL; module->module_path = &cob_module_path; module->module_active = 0; module->module_date = COB_MODULE_DATE; module->module_time = COB_MODULE_TIME; module->module_type = 0; module->module_param_cnt = 0; module->ebcdic_sign = 0; module->decimal_point = '.'; module->currency_symbol = '$'; module->numeric_separator = ','; module->flag_filename_mapping = 1; module->flag_binary_truncate = 1; module->flag_pretty_display = 1; module->flag_host_sign = 0; module->flag_no_phys_canc = 1; module->flag_main = 1; module->flag_fold_call = 0; module->flag_exit_program = 0; module->flag_debug_trace = 0; module->flag_dump_ready = 0; module->module_stmt = 0; module->module_sources = st_source_files; } /* End functions */