View previous topic :: View next topic
|
Author |
Message |
keerthi
New User
Joined: 23 Mar 2005 Posts: 25
|
|
|
|
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 |
|
|
Kandasamy
New User
Joined: 21 May 2005 Posts: 3
|
|
|
|
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 |
|
|
atpcdraj
New User
Joined: 21 May 2005 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
yogesh
New User
Joined: 27 May 2005 Posts: 21
|
|
|
|
display file status code 97 |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
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 |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
prakash_0411
New User
Joined: 05 Jun 2005 Posts: 1 Location: chennai
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|