Need a small help. I need to add a dummy record to a VSAM file using DFSORT.
The file is VSAM fixed length KSDS with length 425. The file is created in a job and in next step a program uses that file in IO mode. But as the file is empty, the program abends. So I wanted to add a dummy record to the file.
The record should be -
000DUMMY-HEADER0000000
I tried using REPROing this record using instream data, but job abended because the job uses PROC and instream data is not allowed in PROCS.
Please let me know how this can be acheived through DFSORT.
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
hy Vinodc,
note:
if you have a KSDS defined,
the index part is not physically present.
You must insert first a dummy record,
for that index part is created, after
you can delete this dummy record,
but the index part remains existing,
even it is empty.
Hi BruceC,
Thanks so much for your response. Your way uses the instream data, though through override from JCL. But , my limitation is I cant use it as it cant be used in PROC and I dont want to give override in JCL.
Hi martin9,
Thanks for explaining the cause of abend. But problem still remains to add the dummy record.
Isnt there any way to insert the dummy record through SORT parameters (Like the way it is used to insert header in reports using OUTFIL HEADER1
)?
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
hy Vinodc,
try to use IDCAMS this is the better utility to do it.
therefore create any sequential dataset with the same lrecl as the vsam cluster. make a repro with this dataset (which has only one string).
note: the seq. dataset should be recfm=vb...