Sorting a stem
Posted: Tue Nov 30, 2021 12:05 am
I am not sure the best way to read and sort data from the columns when using REXX.
My Data set looks like this
I need to create compound variables for each activity
Such as, if the activity is p get all data for p and put it in a compound variable or stem “array” and do it for each activity
This is what I have so far.
My Data set looks like this
Code: Select all
name pay_ rate start_date empy_id activity
John 30.00 11/11/1990 1 p
Philp 45.00 08/23/2020 2 x
James 26.00 07/10/1999 3 c
Such as, if the activity is p get all data for p and put it in a compound variable or stem “array” and do it for each activity
This is what I have so far.
Code: Select all
/*READ FILE IN*/
ALLOC FI (DDNAME) DA(“A05671.TABLE.TESTFILE”)SHR REUSE
“EXECIO * DISKR DDNAME (FINIS STEM TESTFILE.”
I = 0
DO WHILE I <= TESTFILE.0
/*THIS IS WHERE I AM NOT SURE HOW TO HANDLE ASSIGNING TO A COMPOUND VARIABLE */
IF SUBSTR(TESTFILE.0, 1, 3) == “ACTIVITY”
SELECT
WHEN
END
“FREE F(DDNAME)”