PL/I delete command



IBM's cross-platform compiler PL/I for MVS, VM & VSE, OS/390 and Enterprise PL/I for z/OS

PL/I delete command

Postby danilo » Tue Mar 18, 2008 11:19 pm

Hello !!

I am new at this forum, I tried to search for this and I found nothing, so if anyone knows about a similar topic please tell me.

Well, I am trying to use the delete command into a PL/I program to manipulate a sequential dataset, but even the manuals I found don't have much information about this.

Does anyone know how to use this command ??
danilo
 
Posts: 2
Joined: Tue Mar 18, 2008 11:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: PL/I delete command

Postby dick scherrer » Wed Mar 19, 2008 2:11 am

Hello,

If i understand what you want to do (delete one or more records from a sequential file), you cannot do this. You need to read the input and selectively copy the "good" records to a new file which will "delete" the unneeded records.

If that is not what you are looking for, please clarify.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: PL/I delete command

Postby danilo » Thu Mar 20, 2008 11:33 pm

Thanks for the answer !

But this is one way of doing that, but i want to know how to use the DELETE command.

I know that it works with indexed files but i don't know if it is possible to use it with sequential datasets

I tried but with no success...

If anyone know please answer..
danilo
 
Posts: 2
Joined: Tue Mar 18, 2008 11:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: PL/I delete command

Postby dick scherrer » Thu Mar 20, 2008 11:43 pm

Hello,

If i understand what you want to do (delete one or more records from a sequential file), you cannot do this.


As i posted before, you cannot delete records from the sequential file using the DELETE that you mention. Was something in that reply unclear?

If you look at the documentation for DELETE, it should tell you that you need an INDEXed file. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to PL/I