Automated Archives for March, 30th 2025
This post was automatically generated.
Chess For the Day
Record: 1-0-2
Net Elo Change: -4
Games Played
Blog Posts On This Day
- March 30, 2024 (1 post)
- March 30, 2023 (2 posts)
- March 30, 2022 (3 posts)
Example COBOL Program
After coming across an article about the COBOL code used in government and banking, I decided to go see what its code looked like. It's, as expected, very old. And this code takes me back to my earliest days of programming, though I never wrote COBOL.
**********************************************************
* COBCALC *
* *
* A simple program that allows financial functions to *
* be performed using intrinsic functions. *
* *
**********************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. COBCALC.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 PARM-1.
05 CALL-FEEDBACK PIC XX.
01 FIELDS.
05 INPUT-1 PIC X(10).
01 INPUT-BUFFER-FIELDS.
05 BUFFER-PTR PIC 9.
05 BUFFER-DATA.
10 FILLER PIC X(10) VALUE "LOAN".
10 FILLER PIC X(10) VALUE "PVALUE".
10 FILLER PIC X(10) VALUE "pvalue".
10 FILLER PIC X(10) VALUE "END".
05 BUFFER-ARRAY REDEFINES BUFFER-DATA
OCCURS 4 TIMES
PIC X(10).
PROCEDURE DIVISION.
DISPLAY "CALC Begins." UPON CONSOLE.
MOVE 1 TO BUFFER-PTR.
MOVE SPACES TO INPUT-1.
* Keep processing data until END requested
PERFORM ACCEPT-INPUT UNTIL INPUT-1 EQUAL TO "END".
* END requested
DISPLAY "CALC Ends." UPON CONSOLE.
GOBACK.
* End of program.
*
* Accept input data from buffer
*
ACCEPT-INPUT.
MOVE BUFFER-ARRAY (BUFFER-PTR) TO INPUT-1.
ADD 1 BUFFER-PTR GIVING BUFFER-PTR.
* Allow input data to be in UPPER or lower case
EVALUATE FUNCTION UPPER-CASE(INPUT-1) CALC1
WHEN "END"
MOVE "END" TO INPUT-1
WHEN "LOAN"
PERFORM CALCULATE-LOAN
WHEN "PVALUE"
PERFORM CALCULATE-VALUE
WHEN OTHER
DISPLAY "Invalid input: " INPUT-1
END-EVALUATE.
*
* Calculate Loan via CALL to subprogram
*
CALCULATE-LOAN.
CALL "COBLOAN" USING CALL-FEEDBACK.
IF CALL-FEEDBACK IS NOT EQUAL "OK" THEN
DISPLAY "Call to COBLOAN Unsuccessful.".
*
* Calculate Present Value via CALL to subprogram
*
CALCULATE-VALUE.
CALL "COBVALU" USING CALL-FEEDBACK.
IF CALL-FEEDBACK IS NOT EQUAL "OK" THEN
DISPLAY "Call to COBVALU Unsuccessful.".
| Share to:
Zero Day (2025) - 4 of 5 Hackers
A painfully on the nose mini-series of a the current political era mystery/thriller. I didn't love it all, but I found it entertaining. And I liked the ending.
| Share to:March 28th, 2025
Random note from 3 weeks ago that I have no recollection of and no idea what it means: "Presidents speak to the dead."
I assume this was a story idea but I have no idea where it came from or what the actual idea was.
| Share to:March 27th, 2025
The Residence (2025) - 5 of 5 Purple Grackle
Quite enjoyed the show, it was sold to me as 'Knives Out' at the Whitehouse. And it's definitely in the same branch of the tree, but it's not the same show. I would definitely like to see a few more seasons of Detective Cupp.
| Share to:March 26th, 2025
March 25th, 2025
"The Best Presidential Biographies"
A collection of ratings and reviews of Presidential biographies for (nearly) every US President.
From the author's about page:
Given my fascination with the presidency and love of great writing, in 2010 I began collecting the best biographies of each of the presidents. In late 2012 I embarked on a quest to read them all – beginning with George Washington.
This site was initially created to log my journey and organize my thoughts. But 260 presidential biographies later it has evolved into something a bit larger…
I finished my first pass through the presidents on Presidents’ Day 2019 – after six fascinating years. Now I’m reading presidential biographies from my follow-up list as well as great biographies of non-presidents.
Describing the rating methodology:
| Share to:Ratings are on a scale of 0 to 5 stars, with equal weight given to my subjective assessment of: (1) how enjoyable the biography was to read and (2) the biography’s historical value (including comprehensive coverage and critical analysis of its subject).