View previous topic :: View next topic
|
Author |
Message |
lakshmibala
New User
Joined: 16 Jun 2004 Posts: 47
|
|
|
|
hi all,
Can any of my friend give the answer for the following question and clear my doubt
1. IN VSAM , SUPPOSE THERE R 1 BILLION RECORDS AND U WANT TO RETRIEVE LAST 10 RECORDS. HOW DO U CODE FOR THAT ?
2.IF TWO PERSONS R MAKING CHANGES TO THE SAME PROGRAM AND IF THEY SEND THOSE PROGRAMS TO THE PROJECT LEADER, WHOSE PROGRAM WILL BE CONSIDERED FIRST ?
3.WHAT FOR REVOLVE ? WHAT FOR U USED IT IN UR PROJECT ?
4.TELL ABOUT CURSOR IN UDB.
5.HOW DO U HANDLE IF U HAVE A SITUATION LIKE , U HAVE TO COMPLETE UR CODING IN 10 DAYS OUT OF THIS 7 DAYS GOT OVER, NOW IF UR LOGIC IS CHANGED , HOW DO U IMPLEMENT IT ?
6.WHAT IS COMPILATION ERROR U GET IF WE SPECIFY PIC ON RENAME ?
7.SUPPOSE THERE IS A COMPILATION ERROR. IN WHICH DATASET DO U FIND COMPILE LIST AND WHERE? And what kind of dataset is it?
8.WHAT OTHER OPTIONS YOU HAVE TO SET THE TIME OPTION OTHER THAN TIME PARAMETER IN JOB ST?
9.SUPPOSE IF I GIVE DIFFERENT PROGRAM-ID AND SAVE THE PROGRAM IN DIFFERENT NAME AND COMPILE THE PROGRAM. WHAT WILL I GET ANY ERROR?
10.SUPPOSE UR CICS MAP HANGS AND IT IS NOT ACCEPTING ANY CONTROL FROM KEYBOARD WHAT WILL U DO ?
bye with regards,
lakshmibala |
|
Back to top |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
1. IN VSAM , SUPPOSE THERE R 1 BILLION RECORDS AND U WANT TO RETRIEVE LAST 10 RECORDS. HOW DO U CODE FOR THAT ?
if u know the total # of recs it is easy thru idcams utility (repro infile outfile
skip(# of recs -10) )
7 ) SYSPRINT and should be sysout
9) you won't get any error (the name will be the member name of the load-module) |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
hi bluebird.
for question no:9,do you think program id bearing different name to that of program name affect anything when saved in endevor.
suppose there are two programs A and B. let us assume A has program id as B and B has program id as A. Am I confusing you.ok Now if you save these two programs in endevor though you may not get any error do we face any problem with loadmodules while expediting.
Thanks,
Anu |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
For question# 9, we face Link error in prgram HEWL. We use Endevor.
1. IN VSAM , SUPPOSE THERE R 1 BILLION RECORDS AND U WANT TO RETRIEVE LAST 10 RECORDS. HOW DO U CODE FOR THAT ?
If no of records are not sure -
i) Copy VSAM into sequential file.
ii) Sort the seq file in acsdending order based on the VSAM key.
iii) Use repro to copy first 10 records and use those.
5. I can not see any other options than staying office overnight. This is a very common situation in industry.
10.SUPPOSE UR CICS MAP HANGS AND IT IS NOT ACCEPTING ANY CONTROL FROM KEYBOARD WHAT WILL U DO ?
Open a new screen and logon with different ID and purge the transaction throwing the map. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Copy a billion recs VSAM file and sort them to get the last 10 recs? I don't think so. That may get you fired. I think that's why the ques was phrased that way.
If you have FileAid try that. It has a facility to point to the last rec in a file and read backwards.
If not, it may make sense to write a quickie CICS trans that issues a START BROWSE cmd with a GT or = high vals then do READ PREVs to get the last 10 recs.
Or you can brush up on your Assembler skills. It can read VSAM files backwards.
Regards, Jack. |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
Hi Jack,
File aid option is not feasible in practice , I think. In my shop I always get Out of Space error in opening and go to the last portion of records in such a big file.
I think writing a CICS program is always costly compared to some JCL steps in respect of time, effort, performance. Because programs always involve compiling and all those staffs. And so far performance is concerned, SORT is always accepted as compared to open, Close, read file as these operations involve disk read and consumes time.
Assembler is a good option but could you please put the code and then we will be in position to brush out our knowledge also.
Regards,
Sandip. |
|
Back to top |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
anuradha,
I was answering from strictly compile-cobol angle.
I'm not using ENDEVOR with cobol, I compile run and test my own pgms.
does ENDEVOR check program-id in the pgm itself or does it use parm passed by pgmer and/or member name ?
if ENDEVOR uses program-id FROM SOURCE (i.e reads from cobol source)
then you may have problems. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Sandip,
Have you tried this?
Code: |
//GET10 EXEC PGM=FILEAID
//DD01 DD DSN=ONE.BILLION.RECS,...
//DD01O DD DSN=TEN.RECS
//SYSIN DD *
$$DD01 COPYBACK OUT=10
|
As far as the CICS solution is concerned, could probably writ the xaction, test it, and execute in the time you could read the billion recs. :-)
There's no contest between sort execution and CICS/VASM read prev as far as exec times are concerned.
Regards, Jack. |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
Hi Jack,
Batch Fileaid is working fine.
But as per as Sort performance is concerned...I have tested it for reading 10 records and with SORT -
For read the Clock is 0.02 and for SORT it is 0.01. I think for more records this difference will be more.
regards,
Sandip. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Sandip,
I think you misunderstand my point.
If you write a CICS xaction to read the VSAM file backward you only read 10 recs. (And whatever ohead is needed to point to the last rec in the file). The START BROWSE cmd does that for you. From there you use READ PREV cmds to read the last 10 recs in the 1 billion rec file.
Using sort you must read ALL 1 billion recs in the file to get to the end of it.
It's not a per rec thing; it's the number of recs each technique must read.
Regards, Jack. |
|
Back to top |
|
|
|