View previous topic :: View next topic
|
Author |
Message |
Sureet Mookherjee
New User
Joined: 08 May 2009 Posts: 19 Location: India
|
|
|
|
My requirement is odd SSN id will be moved to file A and even SSN id will move to file B.Since there was a program which generates these files, they decided to modify the program, instead going for another extra steps
we cannot use division,subtract,MOD or any oter functions how to accomplish this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
we cannot use division,subtract,MOD or any oter functions |
who set the stupid requirement ? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Though I echo Enrico -- however, I might like to ask a stupid question... what does odd/even refer to here? "Occurence of SSN" or the "value of SSN itself"? |
|
Back to top |
|
|
GlobalGyan
New User
Joined: 31 Jan 2006 Posts: 28
|
|
|
|
looks like an interview question.
maybe some sort card answer was expected (if modifcation was to be in JCL).
in program, have a counter/flags, and set them prior to writing the file.
IF FIRSTIME OR ODD-FLAG
WRITE ODD-NUMBER
SET EVEN-FLAG TO TRUE
ELSE
WRITE EVEN
SET ODD-FLAG TO TRUE
END |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if odd/even is the relative record number,
then it could be done as showed by flipping and testing flags
if odd/even is some value contained within the record... noo way ( given the requirement ) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
we cannot use division,subtract,MOD or any oter functions how to accomplish this? |
Fine -- let's start what you can use? List down the options please. |
|
Back to top |
|
|
|