I want to find the 50th city code.how?

cobol interview questions

Moderator: Moderator Group

Post Reply
akhil
Member
Posts: 12
Joined: Thu Mar 04, 2010 11:07 am

I want to find the 50th city code.how?

Post by akhil » Sat Mar 20, 2010 7:09 pm

plz suggest me anyone...
akhil kumar k

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Mar 23, 2010 2:45 pm

You need to provide more explnation about your query.
Regards,
Anuj

sambit_mech
Member
Posts: 9
Joined: Wed Jul 14, 2010 11:17 am
Location: India

Post by sambit_mech » Wed Jul 14, 2010 11:21 am

I think you need to read the 50th record from a PS file. If that is the case here's how:

Read infile and add 1 to ws-record-read variable until ws-record-read = 50.
"By failiing to prepare, you are preparing to fail." - Benjamin Franklin

fredrick andrews
Member
Posts: 15
Joined: Thu Feb 23, 2012 6:55 am

Post by fredrick andrews » Thu Feb 23, 2012 7:26 am

I think this is a DB2 interview question.

Table (City,city code)

He wants the city code for the city that is the 50th retrieved row.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Feb 23, 2012 9:23 am

Fredrick Andrews,

i realize that you are trying to increase your post count,
but try to pick on questions that are not 2 years old

besides, any idiot that says nth row anything without an established ORDER BY
simply does not understand DB2
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others