IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

interview question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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
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
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
Reply with quote

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

Global Moderator


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

PostPosted: Thu Jun 02, 2005 5:45 pm
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

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Mon Jun 06, 2005 1:54 pm
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: 463

PostPosted: Wed Jun 15, 2005 12:06 pm
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top