Sorting a stem

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
User avatar
Bill Board
New Member
Posts: 2
Joined: Mon Nov 29, 2021 11:07 pm

Sorting a stem

Post by Bill Board »

I am not sure the best way to read and sort data from the columns when using REXX.
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
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.

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)”


Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”