access records from bottom onwards
-
- Posts: 7
- Joined: Mon May 24, 2010 6:13 pm
- Skillset: fresher in Mainframe
- Referer: Subramani
access records from bottom onwards
I have 50 records in vsam , i want access records from bottom onwards. what is the logic for that?
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: interview question???
What kind of VSAM data set?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: interview question???
And what do you mean by, "access records from bottom onwards?" I suspect the interviewer (as opposed to the interviewee) doesn't know very much!
-
- Posts: 7
- Joined: Mon May 24, 2010 6:13 pm
- Skillset: fresher in Mainframe
- Referer: Subramani
Re: interview question???
sequential data... he wan to read the data from bottom to top? by default reading processes starts from top 2 bottom..
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: interview question???
If it is known that there are only fifty records, read the ESDS into an array (table, etc.) and then process it in a loop from 50 to 1 by -1.
When you tell the interviewer that, raise one eyebrow in a supercilious fashion and tell him in a patronizing tone of voice, "Of course, no real application needs to do that; is this an inept attempt to determine my VSAM knowledge or an inept attempt to determine my problem-solving ability?"
When you tell the interviewer that, raise one eyebrow in a supercilious fashion and tell him in a patronizing tone of voice, "Of course, no real application needs to do that; is this an inept attempt to determine my VSAM knowledge or an inept attempt to determine my problem-solving ability?"
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Posts: 93
- Joined: Thu Mar 22, 2012 10:02 am
- Skillset: COBOL
CICS
JCL
DB2
VSAM
IMS - Referer: INTERNET
Re: interview question???
Move high values to KEY and then issue READ PREV command.
Hig values will make the keys point after last record
Read previous will make it start reading from last to first
Hig values will make the keys point after last record
Read previous will make it start reading from last to first
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
- MrSpock
- Global moderator
- Posts: 809
- Joined: Wed Jun 06, 2007 9:37 pm
- Skillset: REXX, JCL, DFSORT, Syncsort, Axway MFT, Connect:Direct, FTP, SFTP
- Referer: ibmmainframes.com
- Location: Raleigh NC USA
- Contact:
Re: interview question???
I'm not a COBOL guy, but I believe that's incorrect. I don't think there is a READ PREV in COBOL.
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: interview question???
Not in Enterprise Cobol,
-
- Posts: 341
- Joined: Thu Feb 24, 2011 12:05 am
- Skillset: 30 years on IBM mainframes
- Referer: Searched for Frank Yeager
Re: interview question???
So probably the question comes from someone not using IBM Enterprise COBOL. Since it's "COBOL", the answer is to use READ PREV. Sad that the person taking the test will get the wrong answer for the right reason.
I guess the smart thing to do is to find out ahead of time which version of COBOL is being used at the job site. My MicroFocus COBOL manual has "READ PREV" as a valid option.
I guess the smart thing to do is to find out ahead of time which version of COBOL is being used at the job site. My MicroFocus COBOL manual has "READ PREV" as a valid option.
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: interview question???
Since this is a MAINFRAME forum, the presumption should be use of Enterprise COBOL (or one of its predecessors). And in Enterprise COBOL, the answer is that it cannot be done in batch (although CICS supports it).
I use Open COBOL on my Linux and Windows platforms and it, too, has READ PREVIOUS as an option.
I use Open COBOL on my Linux and Windows platforms and it, too, has READ PREVIOUS as an option.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1
- 1258
-
by sergeyken
View the latest post
Wed Feb 07, 2024 11:48 pm
-
- 0
- 1636
-
by aarvalar1
View the latest post
Mon Sep 09, 2024 7:21 pm
-
-
Insert records from File1 between records of File2
by Daouchiche » Wed Nov 10, 2021 6:37 am » in DFSORT/ICETOOL/ICEGENER - 6
- 2338
-
by sergeyken
View the latest post
Thu Nov 11, 2021 12:43 am
-
-
- 6
- 2350
-
by sergeyken
View the latest post
Thu Dec 09, 2021 8:10 pm
-
- 3
- 3715
-
by naveenkumar sudha
View the latest post
Mon May 09, 2022 10:15 pm