Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10231
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: 10231
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us