MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
avid_lrner Beginner Joined: 15 Apr 2005 Posts: 21 Topics: 9
Posted: Mon May 30, 2005 1:13 am Post subject: Inserting a new record - help needed!!!
Hey there,
Have a small situation.
Following is an example of records in my file.
rec001
rec002
rec003
cnt001
cnt002
IF <some condition>
insert a new record rec004 just after rec003
else
write records as they are into the output file.
END-IF.
Currently, the condition is getting satisfied and rec004 is getting inserted just after rec003....but, am losing the values of cnt001...
Current output:
rec001
rec002
rec003
rec004
cnt002
This is happening because, am inserting rec004, after reading cnt001...so, am losing the values of cnt001.
Any help would be appreciated.
thanks,
avid_lrner.
Back to top
rony&ruby Beginner Joined: 27 May 2005 Posts: 12 Topics: 1 Location: China
Posted: Mon May 30, 2005 3:54 am Post subject:
Hi, avid_Irner:
What kind of your file? Only sequential?
Maybe you can change your file type in to KSDS, and read , insrt.
If you were insisted to carter for QSAM, I thought the only thing you can do is to maintain the sequenced records, as linked-table.
Wish help! _________________ Ron Yang
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum