Can i rewrite a sequential file in tape




















Record-name can define a floating point or DBCS item. General Rules for All Formats All Files The file associated with record-name must be a disk file and must be open in the I-O mode at the time of execution of this statement. For files in the sequential access mode the last input-output statement executed for the associated file prior to the execution of the REWRITE statement must have been a successfully executed READ statement. The operating system logically replaces the record that was accessed by the READ statement.

General Rules for Formats 1 and 2 Sequential Files The number of character positions in the record referenced by record-name must be equal to the number of character positions in the record being replaced. General Rules for Format 1 Line SequentialFiles The REWRITE statement can be used and is considered successful whenever the record being written after compacting by removing trailing spaces, tab compression and null insertion is less than or equal to the length of the original compacted record.

When a record is read, nulls and tab characters in the record can be expanded and this makes the record longer. But the job is not abending but it is not wrting files to output. Posted: Thu Oct 04, am. Regards, Alex. Alex, Quote:. Posted: Thu Oct 04, pm.

But still some where in mind, it is saying we can achived this by using multiple open statements and close statement. Like If you want to rewrite the record then open the file in I-O mode and after rewriting close the file. When you want write a new record open the file in extend mode and close the file after writing the record. Can any one throw me some light whether this will work. Posted: Fri Oct 05, am. Hello, Good design will not have the code opening and closing the file repeatedly.

Is there some reason that the original sequential file cannot be read and a new output file created. If i understand what you want to do and i may not , you could "change the record read and write the modified record in the new file.

If new records need to be written, just write them. If you show some sample inpujt and what you need for output, we can better offer suggestions. Posted: Fri Oct 05, pm. You can add them to the end of a disk file. Does either of these apply to what you're trying? But in my requirement I need to process the same sequential file through 4 programs.

If I have to create new file in each and every step the process is going to be big. Hello, Depends on how you define "big". The jcl to create the output file rather than re-write would be one dd statement "bigger". Without doing any testing, i'd say that reading the file and creating a "new" output will perform as well probably better than opening and closing the file repeatedly.

Opens and closes require much more system sork than a read or a write. If you want to do a little test, you might create some test code that in one case opens a file reads a record and closes the file times. Then do the same thing, but only open the file one time, read records, and close the file. The difference should demonstrate what i've mentioned. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for. Search instead for. Did you mean:. Sign In. How many times I can reuse a Tape media. Go to solution. JJara Level 3. Insert the tape 2. Inventory 3. Quick Delete 4. Label First question, is this steps the Recommended for reuse a tape??? And my second question is how many times I can reuse the tapes?? Best regards. Labels: Labels: All forum topics Previous Topic Next Topic.

Accepted Solutions. VIP Certified.



0コメント

  • 1000 / 1000