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
 

 

interview question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
keerthi

New User


Joined: 23 Mar 2005
Posts: 25

PostPosted: Wed Jun 01, 2005 11:59 am    Post subject: interview question
Reply with quote

1.Assume that I opened a file without closing that file I am trying to do some read\write operation on that file means what will happen?

2. How can I read a file in reverse order?
Back to top
View user's profile Send private message

Kandasamy

New User


Joined: 21 May 2005
Posts: 3

PostPosted: Wed Jun 01, 2005 6:42 pm    Post subject:
Reply with quote

Hi
IF the file is opened without proper close, you will get File status code 97 .
So before use the file, verify the integitity of the file by VERIFY command.
This VERIFY command is IDCAMS utility.Any more clarification let me know.
Back to top
View user's profile Send private message
atpcdraj

New User


Joined: 21 May 2005
Posts: 3
Location: Chennai

PostPosted: Thu Jun 02, 2005 2:44 am    Post subject: interview question
Reply with quote

hi

i've doubt, i'm not close the file properly and then i try to open the same file it will open or display file status code 97 only?
Back to top
View user's profile Send private message
yogesh

New User


Joined: 27 May 2005
Posts: 21

PostPosted: Thu Jun 02, 2005 5:00 pm    Post subject:
Reply with quote

display file status code 97
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Jun 02, 2005 5:45 pm    Post subject: Re: interview question
Reply with quote

keerthi wrote:
2. How can I read a file in reverse order?

Read it from Tape. Can't be done for a disk file.
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Mon Jun 06, 2005 1:54 pm    Post subject:
Reply with quote

using Jcl you can reverse the file first and then read it through your program.
u have to append SEQNUM at the end of record and sort in the descending order to reverse the file.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Wed Jun 15, 2005 12:06 pm    Post subject: Re: interview question
Reply with quote

Hi,

If you open a file in browse or view mode and same time trying read/write option it will work and write the records, but if you open a file in edit mode it will give error.

Thanks & Regards
Rupesh.Kothari
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Wed Jun 15, 2005 2:03 pm    Post subject: Re: interview question
Reply with quote

Here is the JCL for reverse reading

//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT FILE,
// DISP=SHR
//SORTOUT DD DSN=OUTPUT REVERSED FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(5,5),RLSE)
//SYSIN DD *
INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTREC FIELDS=(1,80)
/*

Thanks
Venkat
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Jun 17, 2005 7:15 am    Post subject:
Reply with quote

Usually the system will cose files at step termination if you don't.

You can read files backward in CICS and in an Assempler pgm. Batch COBOL doesn't allow it. Don't know about COBOL and tape files.
Back to top
View user's profile Send private message
prakash_0411

New User


Joined: 05 Jun 2005
Posts: 1
Location: chennai

PostPosted: Sun Jun 19, 2005 2:28 pm    Post subject: Re: interview question
Reply with quote

hi all ...

can anyone explain in detail about this

INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTREC FIELDS=(1,80)

Thanks,

Prakash M.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jun 20, 2005 8:28 am    Post subject:
Reply with quote

Go to the top of the page you're reading and press the manuals button.
Scroll down to DFSORT/ICETOOL Manuals and look in the index or the TOC. You'll find all the info you need.
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 Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm
No new posts Where can i find Interview questions ... Elixir Mainframe Interview Questions 4 Sat Feb 20, 2016 12:38 am


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