Sequence number within the Job
Moderators: chulett, rschirm, roy
Sequence number within the Job
Hi,
We have a requirement where we need to send a file on a daily basis and on the header part of that file we need to include a sequence number in the following format:
'000000001' and it should increment for every run.
Is there any easier way to implement this with in a job?
Any help is appreciated.
Sue
We have a requirement where we need to send a file on a daily basis and on the header part of that file we need to include a sequence number in the following format:
'000000001' and it should increment for every run.
Is there any easier way to implement this with in a job?
Any help is appreciated.
Sue
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Assuming you are calling it from a sequencer, you can give the output file name as
Code: Select all
pYourOutputFileName : '_' : Fmt(OConv(@Date,'DJ'),"6'0'R")
True, FMT would be another option. I don't recall what '%' means off the top of my head, I would usually specify a zero as the pad character:
Code: Select all
FMT(DSLink34.SEQ_NO,"R'0'9")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers