Skip to Content

Need help on how to load Unique sequential number to DSO

We are installing a new content, PBF. The consultant wrote down the functional spec on how to load data to DSO. On the spec, the object, which I will call RECORD5. For the records created, populate the RECORD5 with a unique sequential number. I am trying to figure how to populate the RECORD5. Also, the data will be deleted for every load and I want to able to start with number 1 here.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    Posted on Jan 16, 2013 at 04:27 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 16, 2013 at 03:36 AM

    Hi Glenn,

    What you need to read about is Number ranges. Please browse and read about it on SCN.

    Thanks,

    Ranga.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2013 at 05:49 AM

    Hi Glenn,

    I am not able to understand your exact requirement, can you explain it with example.

    Regards,

    Saurabh Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 16, 2013 at 07:40 AM

    Hi Glenn,

    In the start routine or end routine you can loop through the DataPacket and for each record add the value of the "DataPacket" field times the size of the DataPacket to the value of the "RecordNumber" field.

    RECORD5 = ( ( DataPacketNumber - 1 ) * SizeOfDataPacket ) + RecordNumber

    This will give you a 1 based numeric counter that is unique to the records being loaded into the DataStore.

    Kind regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 16, 2013 at 01:51 PM

    What I am trying to load the master data into the DSO. For every record in the Master Data, create 2 records. What I will do is create 2 transformation/DTP for each Code.

    Position Date Code Record5 1 1/1/2013 A 1 1 1/1/2013 B 2 2 1/2/2013 A 3 2 1/2/2013 B 4

    We do the one time load every year, and I have to delete the DSO and reset the Record5 number (back to 1). I know number range is good idea but it doesn't allow us to start a new count.

    I was looking at John's post: RECORD5 = ( ( DataPacketNumber - 1 ) * SizeOfDataPacket ) + RecordNumber. Can I use that code on the 2nd transformation (Code B) to do both code A and B count or it will do only on Code B count?

    I am trying to explore the option here.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.