Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Split the file into two files based on SSN id?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Split the file into two files based on SSN id?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jun 04, 2009 11:03 am    Post subject: Reply to: Split the file into two files based on SSN id?
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

Senior Member


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

PostPosted: Thu Jun 04, 2009 2:06 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jun 04, 2009 6:15 pm    Post subject: Reply to: Split the file into two files based on SSN id?
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

Senior Member


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

PostPosted: Thu Jun 04, 2009 7:17 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us