hi is there any means of deletin a record from a ps usin
cobol
not using jcl?eg if i am reading a record and if some
condition is matched tat particular record must be deletd
fom the ps
Answers were Sorted based on User's Feedback
Answer / manikandan
The above answer is do it with the JCL, if you want to do
the same with COBOL, you should be having two files, one is
input and the other one with new output file. Otherwise i
suppose we can't do it.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / nagesh
Fine I would like go with answer #2, since physical deletion
is not possible with ps datasets , all you can do is exclude
the records meeting the condition while writing it to new ps
datasets.
let me remind once again that Deletion is not possible with
ps data sets.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / saikat
take the infile and outfile same in the jcl but in 2 dd
statement. Declare one ainput file to read and other as
output file to write in cobol program. Then read the file
and srore the file contents in an array/table. after
reading the full file write the file from the array records.
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / mani
If you open the dataset in io mode can't we delete the
record, i think we can.
If it is a flat file or vsam file i think we can delete the
record but the space being used for that will not be recovered.
Please check it.
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / manikandan
Ofcourse you can do it. You can do it by a simple sort.
You can use either INCLUDE COND or EXCLUDE COND in the
sysin part.
Ex: If you want to delete a record whose first 4 characters
are 'BBBB', you can do it with the following sysin card,
SORT FIELDS=COPY
INCLUDE COND=(1,4,CH,NE'BBBB')
OR
SORT FIELDS=COPY
EXCLUDE COND=(1,4,CH,EQ'BBBB')
Is This Answer Correct ? | 2 Yes | 9 No |
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
i need a program by giving input as a abcd in any randem order but i need a output as 1234 related to abcd. i.e,. a for 1,b=2,c.....etc..
Why we need to use redefine clause when we can define the variable seperately... what is actual need....
How to display string in the reverse order using occurs clause?
What is static and dynamic call in cobol?
if you give cylinder(1,1)how many cylinders it will be allocate?
What is COMP-1? COMP-2?
Why we are using comp and comp-3 in real time projects?
If we use GO BACK instead of STOP RUN in cobol?
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)