Hi all,
I faced few interview questions today can anyone help me with the correct answers?
1). One PS file is having 1000 records I want to read the records from last record to first record ?
2). PS file which is having millions of records and there are some duplicate records with word of "abcdef" in that file ...I don't know the length and position I want to delete the duplicate field from the file?
Mainframe interview questions I faced.
- Robert Sample
- Global Moderator
- Posts: 1900
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Mainframe interview questions I faced.
1. This question comes up fairly frequently. Mainframes do not have any way to read sequential data sets backwards, so without a significant amount of effort it cannot be done. (Sequential data sets can be on magnetic tape, for example, which only can be read in one direction.)
2. The problem description is so vague as to be farcical. You could use DFSORT to pull out the records with "abcdef" without knowing starting position. But what determines a duplicate record -- every byte is duplicated? the key is duplicated? some subset of bytes are duplicated? There's just not enough information available to do much about the question.
2. The problem description is so vague as to be farcical. You could use DFSORT to pull out the records with "abcdef" without knowing starting position. But what determines a duplicate record -- every byte is duplicated? the key is duplicated? some subset of bytes are duplicated? There's just not enough information available to do much about the question.
Re: Mainframe interview questions I faced.
Robert Sample" wrote: ↑Thu Feb 01, 2024 7:40 pm 1. This question comes up fairly frequently. Mainframes do not have any way to read sequential data sets backwards, so without a significant amount of effort it cannot be done. (Sequential data sets can be on magnetic tape, for example, which only can be read in one direction.)
2. The problem description is so vague as to be farcical. You could use DFSORT to pull out the records with "abcdef" without knowing starting position. But what determines a duplicate record -- every byte is duplicated? the key is duplicated? some subset of bytes are duplicated? There's just not enough information available to do much about the question.
I think the key was duplicated.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute