View previous topic :: View next topic |
Author |
Message |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Thu Feb 01, 2007 11:55 am Post subject: Help needed - Creating a "pattern" dataset! |
|
|
HI,
I am encountering a specific requirement where in I am supposed to create datasats based on a pattern. Let me explain:
1. The dataset should be like mydataset.USERID.V1.
2. The next time when the REXX TOOL is run, the version number should increase. Once the Version has reached 10, then the version#1 has to be over-written.
3. I am not supposed to use GDG for resolving this.
4. As I would be appending records using a routine while populating the dataset, I am bound to open the dataset in MOD option.
Please let me know if I am confusing.
I appreciate your valued comments and suggestions.
Thanks and Regards,
Vivek G |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 01, 2007 12:16 pm Post subject: |
|
|
How do you plan to store the details of the last version used? Will there be some sort of external log to track this detail? Will there be some sort of pointer file (i.e. version V0 stores the last version location)? |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Fri Feb 02, 2007 4:12 am Post subject: |
|
|
superk,
I would check for existence of the mydataset.USERID.V10; If its present, then I would start re-writing mydataset.USERID.V1.
I will be using SYSDSN function to check for existence.
Regards,
Vivek G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Sat Feb 03, 2007 5:05 am Post subject: |
|
|
Doesn't your requirement 2 (overwrite) and 4 (mod) contradict? |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Feb 03, 2007 1:05 pm Post subject: |
|
|
Kevin's point is that after V10, you will have V1-V10 all in existence so you will never know which one was used last. You need to have some external indicator. |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Tue Feb 06, 2007 10:44 am Post subject: |
|
|
Kevin,
I am planning to have an external file to keep track of the version that is to be overwritten in case of the threshold (10) exceeding.
Dibakar,
I meant that the dataset that is being created (or overwirtten) is populated not at a stretch. Meaning, it is populated in particular streams. (One at a time.) So that's y i meant the file should be appended with data.
Thanks and Regards,
Vivek G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
|
|