- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Incrementing in a script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 11:55 AM
тАО02-05-2009 11:55 AM
5995|0|1|JobApplicantCenterIssues.doc|5995_0_1.doc|
5996|2|1|test.doc|5996_2_1.doc|
177|0|2|Capacity Standards.doc|177_0_2.doc|
177|0|3|Capacity Standards.doc|177_0_3.doc|
177|0|1|Mentor Luncheon Conversations - Nov 07.doc|177_0_1.doc|
5996|0|1|Job Postings.doc|5996_0_1.doc|
177|0|4|Capacity Standards.doc|177_0_4.doc|
5997|0|1|test.txt|5997_0_1.txt|
177|0|5|AGENDA%20January%2019,%202009.pdf|177_0_5.pdf|
177|0|6|Empl_Verification_ssn.doc|177_0_6.doc|
177|0|7|Email Payroll Vouchers Custom.doc|177_0_7.doc|
COLUMN1 = appID
COLUMN2 = IterID (ALWAYS '0' Zero)
COLUMN3 = docID (may have multiples per appID)
COLUMN4 = Descriptive File Name(string)
COLUMN5 = stored File name
Column 5 = appID_IterID_docID.ext
The School is staging documents in a "staging area" that will be in the following Format:
EXAMPLE: Transcript1_
EXAMPLE: LOR1_
EXAMPLE: LOR2_
EXAMPLE: Review2009_< appid>_0_
For each document loaded to the staging location I need to check the docID in the SQL output and increment the docID beginning at 6 up to 100 so each record re-inserted will be unique.
I am looking for a way to define a counter for this and create an entry into a flat file like the one above, and copy the file and rename with the incremented docID.
I am using the "original file name" to base the "storename"
I am using an awk -F_ '{print $#}' to define each piece of the file name as a variable..
I wanted to pick brains again on this incrementing.
Any ideas appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 12:53 PM
тАО02-05-2009 12:53 PM
Re: Incrementing in a script
Might help if you posted the awk you've got to date as well....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 12:59 PM
тАО02-05-2009 12:59 PM
Re: Incrementing in a script
Sorry for the confusion..
The table contains information about Documents..
The unique identifier is docID.
I need to get information from the table for each
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:24 PM
тАО02-05-2009 01:24 PM
Re: Incrementing in a script
From the process I need to begin incrementing at number 6, if number 6 is taken, on to number 7 and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:30 PM
тАО02-05-2009 01:30 PM
Re: Incrementing in a script
EXAMPLE: Transcript1_
EXAMPLE: LOR1_
EXAMPLE: LOR2_
EXAMPLE: Review2009_< appid>_0_
Where in the flat file illustrated do you find LOR1 TRANSCRIPT...et all....I still see no connection between the data illustrated and the examples given
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:33 PM
тАО02-05-2009 01:33 PM
Re: Incrementing in a script
5996|2|1|test_5996_2_1.doc|5996_2_1.doc|
177|0|2|Capacity Standards_177_0_2.doc|177_0_2.doc|
177|0|3|Capacity Standards_177_0_3.doc|177_0_3.doc|
177|0|1|Mentor Luncheon Conversations - Nov 07_|177_0_1.doc|
5996|0|1|Job Postings_5996_0_1.doc|5996_0_1.doc|
177|0|4|Capacity Standards_177_0_4.doc|177_0_4.doc|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:35 PM
тАО02-05-2009 01:35 PM
Re: Incrementing in a script
The String for "Descriptive Name" may vary, this is something that will fill a database field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:38 PM
тАО02-05-2009 01:38 PM
Re: Incrementing in a script
right..i got that...i got all the other stuff...but note of the EXAMPLES correspond to the DATA???? I know YOU know what/where DESCRIPTIVE NAME comes from....but I don't see it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:41 PM
тАО02-05-2009 01:41 PM
Re: Incrementing in a script
docID for 177 is 2 and 3 so far, there are two sources for this, slots 1-5 are loaded by a web client but 6-99 will be staged by the client through a scanning process.
177|0|2|Capacity Standards_177_0_2.doc|177_0_2.doc
177|0|3|Capacity Standards_177_0_3.doc|177_0_3.doc
SO for any new documents scanned for 177 I would need to increment record as follows:
177|0|6|Capacity Standards_177_0_6.doc|177_0_6.doc
for NEXT
177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc
Hope this makes more sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2009 01:43 PM
тАО02-05-2009 01:43 PM
Re: Incrementing in a script
The application stores the document as "storename" so it strips off the front string. God only knows why.. That is out of my control.
I need to just take what they give me increment, but a flat file to load back into informix.