I have written a routine
to get records passed from that stage
for auditing purpose,but how can use this routine?
I know in master SEQ i can call the routine,but not exactly sure where and how to use this routine?
My requirement is to write a routine and get count ,Write counts to a seq/flatfile
routine is as below
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate RoutineName to 'StageRowCount'
Handle = DSAttachJob ("JobName", DSJ.ERRNONE)
Count = DSGetLinkInfo(Handle, "StageName", "LinkName", DSJ.LINKROWCOUNT)
Ans = Count
how to use routine?
Moderators: chulett, rschirm, roy
Re: how to use routine?
1. To know how many records to that file alone?qutesanju wrote:My requirement is to write a routine and get count ,Write counts to a seq/flatfile
If you use the link to get the counts may not be correct all the times. If the records got rejected due to any reasons may not be reflect in the link.
Rather than that, you can use a wc -l kind of OS command to get the number of records in the file.
Code: Select all
FileName ="FILEPATH"
CMD = "wc -l" : FileName : " > filename.txt"
Command = CMD
SystemReturnCode = 0
Call DSExecute (Shell, Command, Output, SystemReturnCode)
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.