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: 10291
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: 10291
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 Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts How do you create Eclipse based dialogs jasorn IBM Tools 0 Thu Aug 03, 2017 5:05 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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