<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Incrementing in a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353075#M684075</link>
    <description>Oldschool, &lt;BR /&gt;&lt;BR /&gt;6 being the lowest value yes. &lt;BR /&gt;an easier thing would be to create a new load file, since the other records already exist there is no reason to load them a second time or dump them from the table. &lt;BR /&gt;&lt;BR /&gt;SO in the example for appID 177 &lt;BR /&gt;then next record into the flat load file would look like &lt;BR /&gt;177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Feb 2009 21:57:27 GMT</pubDate>
    <dc:creator>rmueller58</dc:creator>
    <dc:date>2009-02-05T21:57:27Z</dc:date>
    <item>
      <title>Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353063#M684063</link>
      <description>I have another flat file output result from Informix DB delimited with a pipe '|' &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;5995|0|1|JobApplicantCenterIssues.doc|5995_0_1.doc|&lt;BR /&gt;5996|2|1|test.doc|5996_2_1.doc|&lt;BR /&gt;177|0|2|Capacity Standards.doc|177_0_2.doc|&lt;BR /&gt;177|0|3|Capacity Standards.doc|177_0_3.doc|&lt;BR /&gt;177|0|1|Mentor Luncheon Conversations - Nov 07.doc|177_0_1.doc|&lt;BR /&gt;5996|0|1|Job Postings.doc|5996_0_1.doc|&lt;BR /&gt;177|0|4|Capacity Standards.doc|177_0_4.doc|&lt;BR /&gt;5997|0|1|test.txt|5997_0_1.txt|&lt;BR /&gt;177|0|5|AGENDA%20January%2019,%202009.pdf|177_0_5.pdf|&lt;BR /&gt;177|0|6|Empl_Verification_ssn.doc|177_0_6.doc|&lt;BR /&gt;177|0|7|Email Payroll Vouchers Custom.doc|177_0_7.doc|&lt;BR /&gt;&lt;BR /&gt;COLUMN1 = appID &lt;BR /&gt;COLUMN2 = IterID (ALWAYS '0' Zero) &lt;BR /&gt;COLUMN3 = docID (may have multiples per appID)&lt;BR /&gt;COLUMN4 = Descriptive File Name(string)&lt;BR /&gt;COLUMN5 = stored File name &lt;BR /&gt;&lt;BR /&gt;Column 5 = appID_IterID_docID.ext &lt;BR /&gt;&lt;BR /&gt;The School is staging documents in a "staging area" that will be in the following Format: &lt;BR /&gt;EXAMPLE: Transcript1_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext &lt;BR /&gt;EXAMPLE: LOR1_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;EXAMPLE: LOR2_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;EXAMPLE: Review2009_&amp;lt; appid&amp;gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;I am using the "original file name" to base the "storename" &lt;BR /&gt;&lt;BR /&gt;I am using an awk -F_ '{print $#}' to define each piece of the file name as a variable.. &lt;BR /&gt;&lt;BR /&gt;I wanted to pick brains again on this incrementing. &lt;BR /&gt;&lt;BR /&gt;Any ideas appreciated&lt;/DOCID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;</description>
      <pubDate>Thu, 05 Feb 2009 19:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353063#M684063</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T19:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353064#M684064</link>
      <description>I'm afraid I'm not following how you want to transform this...ie: i don't see any relation from whats in the flat file and what in the EXAMPLE columns (they appear to be disjoint, at least to me). &lt;BR /&gt;&lt;BR /&gt;Might help if you posted the awk you've got to date as well....</description>
      <pubDate>Thu, 05 Feb 2009 20:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353064#M684064</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-05T20:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353065#M684065</link>
      <description>OLDSCHOOL, &lt;BR /&gt;Sorry for the confusion.. &lt;BR /&gt; &lt;BR /&gt;The table contains information about Documents..&lt;BR /&gt;&lt;APPID&gt;|&lt;ITERID&gt;|&lt;DOCID&gt;|&lt;DESC&gt;|&lt;STORENAME&gt;&lt;BR /&gt;&lt;BR /&gt;The unique identifier is docID. &lt;BR /&gt;&lt;BR /&gt;I need to get information from the table for each &lt;APPID&gt; and beginning at number 6 increment the &lt;DOCID&gt; by +1 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/STORENAME&gt;&lt;/DESC&gt;&lt;/DOCID&gt;&lt;/ITERID&gt;&lt;/APPID&gt;</description>
      <pubDate>Thu, 05 Feb 2009 20:59:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353065#M684065</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T20:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353066#M684066</link>
      <description>There will likely be multiples for each appID, the only uniq identifier for each is the docID. &lt;BR /&gt;From the process I need to begin incrementing at number 6, if number 6 is taken, on to number 7 and so on. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:24:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353066#M684066</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353067#M684067</link>
      <description>Given:&lt;BR /&gt;EXAMPLE: Transcript1_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext &lt;BR /&gt;EXAMPLE: LOR1_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;EXAMPLE: LOR2_&lt;APPID&gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;EXAMPLE: Review2009_&amp;lt; appid&amp;gt;_0_&lt;DOCID&gt;.ext&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;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&lt;BR /&gt;&lt;BR /&gt;&lt;/DOCID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:30:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353067#M684067</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-05T21:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353068#M684068</link>
      <description>5995|0|1|JobApplicantCenterIssues_5995_0_1.doc|5995_0_1.doc|&lt;BR /&gt;5996|2|1|test_5996_2_1.doc|5996_2_1.doc|&lt;BR /&gt;177|0|2|Capacity Standards_177_0_2.doc|177_0_2.doc|&lt;BR /&gt;177|0|3|Capacity Standards_177_0_3.doc|177_0_3.doc|&lt;BR /&gt;177|0|1|Mentor Luncheon Conversations - Nov 07_|177_0_1.doc|&lt;BR /&gt;5996|0|1|Job Postings_5996_0_1.doc|5996_0_1.doc|&lt;BR /&gt;177|0|4|Capacity Standards_177_0_4.doc|177_0_4.doc|&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:33:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353068#M684068</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353069#M684069</link>
      <description>OldSchool, &lt;BR /&gt;&lt;BR /&gt;The String for "Descriptive Name" may vary, this is something that will fill a database field. &lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:35:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353069#M684069</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353070#M684070</link>
      <description>The String for "Descriptive Name" may vary, this is something that will fill a database field.&lt;BR /&gt;&lt;BR /&gt;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</description>
      <pubDate>Thu, 05 Feb 2009 21:38:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353070#M684070</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-05T21:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353071#M684071</link>
      <description>IN the file name: &lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;177|0|2|Capacity Standards_177_0_2.doc|177_0_2.doc&lt;BR /&gt;177|0|3|Capacity Standards_177_0_3.doc|177_0_3.doc&lt;BR /&gt;&lt;BR /&gt;SO for any new documents scanned for 177 I would need to increment record as follows: &lt;BR /&gt;177|0|6|Capacity Standards_177_0_6.doc|177_0_6.doc&lt;BR /&gt;&lt;BR /&gt;for NEXT &lt;BR /&gt;177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc&lt;BR /&gt;&lt;BR /&gt;Hope this makes more sense.</description>
      <pubDate>Thu, 05 Feb 2009 21:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353071#M684071</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353072#M684072</link>
      <description>the "DESCRIPTIVE NAME" the original file name.. &lt;BR /&gt;&lt;BR /&gt;The application stores the document as "storename" so it strips off the front string. God only knows why.. That is out of my control. &lt;BR /&gt;&lt;BR /&gt;I need to just take what they give me increment, but a flat file to load back into informix. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353072#M684072</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353073#M684073</link>
      <description>My 1st example file was a POS from their test data, sorry about that..</description>
      <pubDate>Thu, 05 Feb 2009 21:44:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353073#M684073</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353074#M684074</link>
      <description>so, within an appid, you need to take the Highest doc#, 6 being the MINIMUM, and increment it up from there?&lt;BR /&gt;&lt;BR /&gt;I assume you want to add the new lines to the flat file, but what are you using to feed this as input.  do you run it once for every newly found document or what?</description>
      <pubDate>Thu, 05 Feb 2009 21:54:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353074#M684074</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-05T21:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353075#M684075</link>
      <description>Oldschool, &lt;BR /&gt;&lt;BR /&gt;6 being the lowest value yes. &lt;BR /&gt;an easier thing would be to create a new load file, since the other records already exist there is no reason to load them a second time or dump them from the table. &lt;BR /&gt;&lt;BR /&gt;SO in the example for appID 177 &lt;BR /&gt;then next record into the flat load file would look like &lt;BR /&gt;177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 21:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353075#M684075</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T21:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353076#M684076</link>
      <description>if there are multiples, &lt;BR /&gt;&lt;BR /&gt;177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc&lt;BR /&gt;177|0|8|Capacity Standards_177_0_8.doc|177_0_8.doc&lt;BR /&gt;177|0|9|Capacity Standards_177_0_9.doc|177_0_9.doc&lt;BR /&gt;&lt;BR /&gt;and so on.. &lt;BR /&gt;&lt;BR /&gt;I check the value in the database on each run prior to creating a new load file. &lt;BR /&gt;&lt;BR /&gt;This is a hack of a document management system.. This thing has had a real bad case of scope creep since it's inception 5 years ago.. I've been bandaidding things together and am revisiting the original and re-doing it and trying to do it right from the outset of the vendors new web application that can't handle scanned documents. &lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2009 22:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353076#M684076</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-05T22:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353077#M684077</link>
      <description>ok, but again, what are you using for input??  You've got the existing flat file, but how are you telling the awk script to you need to add X number of docs to application Y???&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2009 15:24:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353077#M684077</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-06T15:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353078#M684078</link>
      <description>Old School, &lt;BR /&gt;I need to rethink how I ask this question sorry. &lt;BR /&gt;&lt;BR /&gt;the previous version of this package simply moved files from one location to the next, it had no database operation to index the documents. &lt;BR /&gt;&lt;BR /&gt;Simply said, job applicant files are scanned, named and placed in &lt;STAGING&gt; &lt;BR /&gt;for each &lt;APPID&gt; files are moved from staging to APPLICANT/&lt;APPID&gt; folder. via existing scripting &lt;BR /&gt;&lt;BR /&gt;My script initially looks at the files in the STAGING with this script section&lt;BR /&gt;rm -f flatfile&lt;BR /&gt;for file in `find /upload_resumes/mpsplustest/ -name "*.*"  -print  |awk '{print substr($1,29,60)}'` &lt;BR /&gt;&lt;BR /&gt;do  &lt;BR /&gt;field1=`echo $file | cut -d"_" -f1`&lt;BR /&gt;field2=`echo $file | cut -d"_" -f2`&lt;BR /&gt;field3=`echo $file | cut -d"_" -f3 |cut -d"." -f1`&lt;BR /&gt;ext=`echo $file|cut -d"." -f2`&lt;BR /&gt;newfile=JAC2_${field1}_0_${field3}.${ext}&lt;BR /&gt;storename=${field1}_0_${field3}.${ext}&lt;BR /&gt;#echo $newfile&lt;BR /&gt;echo $field1"|"0"|"$field3"|"${newfile}"|"${storename}&amp;gt;&amp;gt;flatfile &lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;more flatfile &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the Second part builds an SQL template, executes a query, returns the value in a &lt;BR /&gt;"|" delimited file. &lt;BR /&gt;&lt;BR /&gt;#STAGEDFILES=/mps-docs/mps-docs/mpsplustest/staging/&lt;BR /&gt;STAGEDFILES=/mps-docs/mps-docs/mpsplustest/applicant/&lt;BR /&gt;cd $STAGEDFILES &lt;BR /&gt;rm -f /tmp/jac.txt&lt;BR /&gt;touch /tmp/jac.txt&lt;BR /&gt;&lt;BR /&gt;##### LOCAL FILE NAME EXTRACT #####&lt;BR /&gt;for fn1 in `find -type f -mmin -360000 -print` &lt;BR /&gt;do&lt;BR /&gt;export fn=`echo $fn1| awk '{print substr($1,3,22)}'` &lt;BR /&gt;for appid in  `echo $fn |awk -F_ '{print $2}'`&lt;BR /&gt;    do&lt;BR /&gt;        export distID=`echo $fn |awk -F_ '{print $1}'`&lt;BR /&gt;        export appID=`echo $fn |awk -F_ '{print $2}'` &lt;BR /&gt;        export docID=`echo $fn |awk -F_ '{print $3}'|cut -d. -f1` &lt;BR /&gt;        export ext=`echo $fn |awk -F_ '{print $3}'|cut -d. -f2` &lt;BR /&gt;&lt;BR /&gt;        export ITERID=`echo 0`&lt;BR /&gt;&lt;BR /&gt;echo $distID &amp;gt;&amp;gt; /tmp/jac.txt&lt;BR /&gt;done &lt;BR /&gt;done&lt;BR /&gt;##### END LOCAL FILE NAME EXTRACT ##### &lt;BR /&gt;COUNT=`wc -l /tmp/jac.txt`&lt;BR /&gt;echo $COUNT&lt;BR /&gt;##### BEGIN TEMPLATE BUILD #####&lt;BR /&gt;        sort /tmp/jac.txt |uniq &amp;gt; /tmp/jac1.txt&lt;BR /&gt;        echo 'unload to /tmp/jacload.txt' &amp;gt; /tmp/TEMPLATE&lt;BR /&gt;        echo 'select * from jac_attachment where id in ('$(sed -e "s/^\\|\$/'/g" /tmp/jac1.txt | paste -d, -s)');' &amp;gt;&amp;gt; /tmp/TEMPLATE &lt;BR /&gt;        more /tmp/TEMPLATE &lt;BR /&gt;        cd &lt;BR /&gt;##### END TEMPLATE BUILD #####&lt;BR /&gt;&lt;BR /&gt;##### BEGIN INITIAL SQL EXECUTION #####&lt;BR /&gt;        sudo -u USER scp -B /tmp/TEMPLATE user@IP:/tmp/jac.sql &lt;BR /&gt;        sudo -u USER ssh user@IP'/usr/local/bin/jacload.sh'&lt;BR /&gt;        sudo -u USER scp -B connect@10.3.253.6:/tmp/jacunload.txt /tmp/&lt;BR /&gt;&lt;BR /&gt;What I need to do, is take the items in SECTION 1 FLATFILE compare against section two &lt;BR /&gt;and increment the &lt;DOCID&gt; in a flat file to return to the Informix DB and Insert with the incremented values, as the third part of this script I will copy and move files from the staged location to the permanent storage area(s). &lt;BR /&gt;&lt;BR /&gt;I hope this helps.. &lt;BR /&gt;&lt;BR /&gt;Comparing the two flat files is what needs to occur. &lt;BR /&gt;Also for items inserted the records need to begin as #6 and increase. &lt;BR /&gt;&lt;BR /&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/APPID&gt;&lt;/STAGING&gt;</description>
      <pubDate>Fri, 06 Feb 2009 15:57:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353078#M684078</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-06T15:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353079#M684079</link>
      <description>I'm afraid I really don't understand what you are driving at....&lt;BR /&gt;&lt;BR /&gt;You've got some files (thus file names) and those have the appid and docid already in them?  or you need to assign names to the files incrementing the docid within the appid?  &lt;BR /&gt;&lt;BR /&gt;can you explain one step at a time, what you've got, where, and what needs to be checked / generated.  We've got a real disconnect here, and I think part of the problem is that you're so close to the problem that you're overlooking details in the explaination (as they're obvious to you).&lt;BR /&gt;&lt;BR /&gt;I've got a feeling that this won't take long to sort out once understood.&lt;BR /&gt;&lt;BR /&gt;and what, if any, relationship is there to the names of the files and the data in the example flat file?&lt;BR /&gt;&lt;BR /&gt;sorry if this seems pigheaded on my part</description>
      <pubDate>Fri, 06 Feb 2009 16:00:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353079#M684079</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-06T16:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353080#M684080</link>
      <description>old School, Thanks for the try, the worst of this little buggar child is I don't understand my self half the time.. I am a systems guy not a programmer. But the expectations of my director and districts is I did it before I can again "raise the dead" and "walk on water" &lt;BR /&gt;&lt;BR /&gt;I can scab together some rudimentary scripting, I need to take a step back close this thread and rethink a few things so when I have questions I can be coherent about it all. I apologize. &lt;BR /&gt;&lt;BR /&gt;When I get to a point I can do this I will re-ask a more coherent question about a particular section of this cluster_flop. &lt;BR /&gt;&lt;BR /&gt;Thanks again.. I and closing this for now and will come back later when I have is more in a group.. Sorry.</description>
      <pubDate>Fri, 06 Feb 2009 16:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353080#M684080</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-06T16:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353081#M684081</link>
      <description>skip my previous post...i was typing while you were posting.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so... you're parsing values out of an existing filename and you have no control over the original filename? if so, does not that mean that&lt;BR /&gt;&lt;BR /&gt;177|0|7|Capacity Standards_177_0_7.doc|177_0_7.doc&lt;BR /&gt;177|0|8|Capacity Standards_177_0_8.doc|177_0_8.doc&lt;BR /&gt;177|0|9|Capacity Standards_177_0_9.doc|177_0_9.doc&lt;BR /&gt;&lt;BR /&gt;could also be something like:&lt;BR /&gt;177|0|7|Capacity Standards_177_0_5.doc|177_0_7.doc&lt;BR /&gt;177|0|8|Capacity Standards_177_0_9.doc|177_0_8.doc&lt;BR /&gt;177|0|9|Capacity Standards_177_0_11.doc|177_0_9.doc&lt;BR /&gt;&lt;BR /&gt;i still don't see what, if any relationship exists between the data existing in the flat file, the data to be added to the flat file, and the name of the file being examined.</description>
      <pubDate>Fri, 06 Feb 2009 16:13:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353081#M684081</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-02-06T16:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Incrementing in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353082#M684082</link>
      <description>Old School, &lt;BR /&gt;&lt;BR /&gt;the Control I have over the Old File name is behavioral. I it will be a "practice" to name the file as &lt;BR /&gt;&lt;DESCRIPTIVE_0_&gt;_&lt;DOCID&gt;.&lt;EXT&gt; &lt;BR /&gt;&lt;BR /&gt;I need to compare files in staging against the contents of the table, if an entry in the table exist, increment the value of &lt;DOCID&gt; &lt;BR /&gt;&lt;BR /&gt;If you look at each Flat file it contains the values&lt;BR /&gt;&lt;APPID&gt;|0|&lt;DOCID&gt;|FullFilename_&lt;APPID&gt;_0_&lt;DOCID&gt;.&lt;EXT&gt;|&lt;APPID&gt;_0_&lt;DOCID&gt;.&lt;EXT&gt;&lt;BR /&gt;&lt;BR /&gt;I need to build an insert record that looks as the sql output and if a file exist in staging to increment it.. &lt;BR /&gt;&lt;BR /&gt;The comparison is between what physical files are being staged with a consistent naming convention against the value in the table. &lt;BR /&gt;&lt;BR /&gt;File A - Staged files &lt;BR /&gt;File B - SQL output&lt;/EXT&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/EXT&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/APPID&gt;&lt;/DOCID&gt;&lt;/EXT&gt;&lt;/DOCID&gt;&lt;/DESCRIPTIVE_0_&gt;</description>
      <pubDate>Fri, 06 Feb 2009 16:26:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/incrementing-in-a-script/m-p/4353082#M684082</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2009-02-06T16:26:22Z</dc:date>
    </item>
  </channel>
</rss>

