IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Split the file into two files based on SSN id?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sureet Mookherjee

New User


Joined: 08 May 2009
Posts: 19
Location: India

PostPosted: Thu Jun 04, 2009 10:58 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 04, 2009 11:03 am
Reply with quote

Quote:
we cannot use division,subtract,MOD or any oter functions


who set the stupid requirement ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 04, 2009 2:06 pm
Reply with quote

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
View user's profile Send private message
GlobalGyan

New User


Joined: 31 Jan 2006
Posts: 28

PostPosted: Thu Jun 04, 2009 2:50 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 04, 2009 6:15 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 04, 2009 7:17 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top