Obviously, I haven’t learned the syntax yet; so the examples are beyond me. I don’t know what “void f(String x, String y)” means, for example. But for the other part, this is how it would look in Easytrieve Plus:
IF X = Y
“int b = ((Integer)((ArrayList) foo.get(“key”)).get(4)).parsetInt();” seems to be parsing a string and assigning the found value to “int b”. But it’s Greek to me.
I started reading the JavaScript book last night. It’s ©1996, and talks about Netscape 3.0. It hints about “fixes” in upcoming newer versions of JavaScript. Thinking in Java, the book I got in the company seminar a couple/three years ago, is ©1998.
About “null” versus “space”. Some of the data we received in my last job had nulls in it that would cause the program to fail. When editing the file (in TSO) the null would look like a space. When browsing the file (again, in TSO – that was our system) the null appeared as a decimal point. EZ+ numeric fields must be numeric in order to perform arithmetical operations on them, so nulls or spaces would cause the program to crash.
Here is an example of what I’m used to. It right-justifies an accounts receivable aging bucket by searching for spaces and decimals in ASCII and in Hex:
//*[programmer identifier]* JOB (*[account number]*,1),' ',
// MSGCLASS=A,TIME=1, RESTART=
// NOTIFY=*[programmer identifier]*,PRTY=12
/*ROUTE PRINT Q
/*JOBPARM ROOM=5001,P=PROC14,L=9999
//JOBLIB DD DSN=*[job library name]*,DISP=SHR
// DD DSN=SYSP.PAN.LOADMOD,DISP=SHR
//*
//CLEANUP EXEC DELDS
//STEP01 EXEC PGM=EZTPA00
//*TEP01 EXEC PGM=EASYTREV
//SYSPRINT DD SYSOUT=*
//EZTVFM DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK01 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK02 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK03 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK04 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK05 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SORTWK06 DD UNIT=SORTDA,SPACE=(CYL,(90,10),RLSE)
//SYSOUT DD SYSOUT=*
//FILEA DD DSN=*[input file name]*,DISP=OLD
//FILEB DD DSN=*[output file name]*,DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(250,50),RLSE),
// DCB=(RECFM=FB,LRECL=400,BLKSIZE=23200)
//SRTMSG DD SYSOUT=*
//SYSIN DD *
*********************************************************************
** custno **
** **
** JOHNNY L.A. **
** / / **
*********************************************************************
FILE FILEA
INPUT-REC 1 400 A
AR-NUM 12 17 A
FIELD-BYTE-IN1 AR-NUM 1 A INDEX SUB1
AR-NUM-A-OUT 12 12 A
FILE FILEB
OUTPUT-RECORD 1 400 A
**********************************************************************
** WORKING STORAGE RIGHT-JUSTIFYING FIRST AR-NUM FIELD **
**********************************************************************
WS-AR-NUM-A-IN W 17 A
FIELD-BYTE-IN1B WS-AR-NUM-A-IN 1 A INDEX SUB1B
WS-AR-NUM-A W 12 A
JOB INPUT(FILEA)
PERFORM RIGHT-JUST
PUT FILEB FROM FILEA
RIGHT-JUST. PROC
WS-AR-NUM-A-IN = '000000000'
SUB1 = 17
SUB1B = 11
DO WHILE SUB1 GE 0
IF FIELD-BYTE-IN1 = ' ' X'3F' X'00' '.'
SUB1 = SUB1 - 1
ELSE
FIELD-BYTE-IN1B = FIELD-BYTE-IN1
SUB1 = SUB1 - 1
SUB1B = SUB1B - 1
END-IF
END-DO
MOVE WS-AR-NUM-A-IN TO AR-NUM
END-PROC
By making the logic a “proc” instead of writing it into a larger program, I could copy RIGHT-JUST. PROC into the bottom of a larger program and just call it with the PERFORM step and adding the appropriate variable-names to the Library (“definition”) section. I did that with most of my “generic” procs, and added them to programs as they were brought to my attention.
It’s a huge savings in time when the user doesn’t have to have the data contributor re-send corrected data – especially when the contributor often has no programming staff. (Often they’ll hire someone to get their AR program written, and will have to hire them again to fix problems.) I’ve saved millions of lines of data and untold hours and days with these little procs. (Well, some of them aren’t so little.)
The new VP of that department came from a different part of the company. In her previous department, data was required to be in the correct (industry standard) format. The part of the company I worked for was much smaller, and accepted data in any format the customer used because we wanted the lines of data for the database. I heard that the new VP is now insisting that my former department will no longer reformat customers’ data, and that they must give it to us in our format. No more new Easytrieves. (Not that she could have any more written, since she got rid of everyone who knew how to write them.) But data will still come in in different formats; so rather than have us – we, who knew the data intimately – use the new Ascential DataStage tool to reformat it the company hired the (ironically-named) Indian company Tata to write DataStage reformats. Weird. “All data must be in our format, or it will not be accepted. If the data is not in our format, it will be reformatted.” 
Okay, I haven’t had enough coffee. Please excuse the rambling.