Random Shuffling of input stream data in DS MVS jobs
Posted: Thu Aug 31, 2006 12:18 am
Hi there,
I am trying to explore the following features in Datastage MVS Edition (7.5x2) for Mainframes:
1) A routine to generate Random number. In Server Jobs or Parallel Jobs, we have random routines which generate random numbers, but I am unable to find the same in MVS jobs ( or did I not check it properly? ). One option is to code this in COBOL. Since I am not a Pro in COBOL, it will take sometime for me to learn and code it.
Before doing this can anybody tell me whether there are any extra plug-ins for DS that I can install which has these routines?
2) I want to shuffle the input stream in some random order using Datastage MVS Jobs.
Ex:
Input:
CustId,Name
0001,Steve
0002,Bush
0003,Tony
0004,Stalin
I will shuffle CustId and Name separately.
If I run the job once the output would look like:
CustId,Name
0003,Bush
0001,Stalin
0004,Steve
0002,Tony
If I run the job for the second time the output would be entirely different from the 1st run:
CustId,Name
0002,Stalin
0004,Bush
0003,Steve
0001,Tony
i.e., the output would be randomly shuffled. I am unable to do this in Datastage, and hence we thought of doing this in COBOL ( Even COBOL seems to be having some serious limitations ). Is there any way this could be done in DS MVS?
I am trying to explore the following features in Datastage MVS Edition (7.5x2) for Mainframes:
1) A routine to generate Random number. In Server Jobs or Parallel Jobs, we have random routines which generate random numbers, but I am unable to find the same in MVS jobs ( or did I not check it properly? ). One option is to code this in COBOL. Since I am not a Pro in COBOL, it will take sometime for me to learn and code it.
Before doing this can anybody tell me whether there are any extra plug-ins for DS that I can install which has these routines?
2) I want to shuffle the input stream in some random order using Datastage MVS Jobs.
Ex:
Input:
CustId,Name
0001,Steve
0002,Bush
0003,Tony
0004,Stalin
I will shuffle CustId and Name separately.
If I run the job once the output would look like:
CustId,Name
0003,Bush
0001,Stalin
0004,Steve
0002,Tony
If I run the job for the second time the output would be entirely different from the 1st run:
CustId,Name
0002,Stalin
0004,Bush
0003,Steve
0001,Tony
i.e., the output would be randomly shuffled. I am unable to do this in Datastage, and hence we thought of doing this in COBOL ( Even COBOL seems to be having some serious limitations ). Is there any way this could be done in DS MVS?