steeltown89
MIS
I have a file with the data similar to below:
stidm;Jul;15,;2003
franc;Aug;8,;2003
mracekd;Jul;15,;2003
adast;Sep;30,;2003
Many more records in this file but you get the point.
I need to convert the month to a numeric value and get this data into a file that looks like this:
stidm;07;15,;2003
franc;08;8,;2003
mracekd;07;15,;2003
adast;09;30,;2003
Would I use the Case command? If so, how do I pluck out part of the line, test against "Jul" (or whatever) and reinsert 07 (or corresponding value) back into another file with all the above information? (need data to look like adast;09;30,;2003 instead of adast;Sep;30,;2003)
The reason I am doing this is to delete users who have not logged into the system within the last 3 months. I'm pulling the current date and time as such: 11;2004
My plan was to compare against the year and month and send records older than 3 months or so to a file to be deleted. I did not want this to be static so I am trying to make it dynamic by pulling the current month and year and comparing my list of userids with last logins against it.![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)
stidm;Jul;15,;2003
franc;Aug;8,;2003
mracekd;Jul;15,;2003
adast;Sep;30,;2003
Many more records in this file but you get the point.
I need to convert the month to a numeric value and get this data into a file that looks like this:
stidm;07;15,;2003
franc;08;8,;2003
mracekd;07;15,;2003
adast;09;30,;2003
Would I use the Case command? If so, how do I pluck out part of the line, test against "Jul" (or whatever) and reinsert 07 (or corresponding value) back into another file with all the above information? (need data to look like adast;09;30,;2003 instead of adast;Sep;30,;2003)
The reason I am doing this is to delete users who have not logged into the system within the last 3 months. I'm pulling the current date and time as such: 11;2004
My plan was to compare against the year and month and send records older than 3 months or so to a file to be deleted. I did not want this to be static so I am trying to make it dynamic by pulling the current month and year and comparing my list of userids with last logins against it.
![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)