Recent content by anandknr

  1. anandknr

    Question Import from a dynamic CSV

    I am trying to read a csv file which can be of 'n' number of columns. My requirement to read first column and then based on its value I need to consider/ignore that row. At the end, I will create a new csv file which have same columns as first one, but only with selected rows. Issue I am Facing...
  2. anandknr

    Question Replace Exact Words

    Hi All, Is there a function available in progress which will replace only exact words but not portion of it. I believe there is not. define variable pcString as character no-undo. define variable pcErrorWord as character no-undo. assign pcString = "customer is abbreviated as cust."...
  3. anandknr

    Question Decimal formatting

    Hi all, A basic question here - I have some difficulty in understanding a format usage of ">" Vs "9". For example; why below two statement outputs different values ? string(3.1634567,'>>>>>.99<<<<<') is 3.163457 and string(3.1634567,'>>>>>.999<<<<') is 3.1634567
  4. anandknr

    Question contains operator

    Thanks Stefan, But I was looking for a programmatic work around :(
  5. anandknr

    Question contains operator

    Hey all, I have a query on CONTAINS operator. define temp-table ttTest no-undo field textFld as character format "x(30)" index idx as word-index textFld. /* Entered below data into ttTest, each line each record. hello world hello planet hello ??? y is a word y/n is a word */ for each...
  6. anandknr

    Non unique index as primary index

    Hello all, I am writing a query to list all tables with no unique and primary index defined. define var havePrimary as logical. define var haveUnique as logical. for each _file where _file._tbl-type = "T": assign haveUnique = can-find(first _Index where _index._file-recid = recid(_file)...
  7. anandknr

    Question Inbuilt Functions

    Hi All, Just want to confirm if any inbuilt function (or a better version of user function) available for below tasks. Check is a given word is in UPPER case or not? function checkIfUpperCase returns logical (input inputString as character): define variable isInUpper as logical...
  8. anandknr

    Question spell checker

    Hello All, I am planning to add a spelling validator (spell checker) in my 4GL code. Can I do that? I browsed through a few "Spell Check" posts here and almost all of them are pointing to Microsoft Word Spell checker. I have my application in an unix enviroment and hence I cannot do that :( I...
  9. anandknr

    Question Schema analyzer

    Thanks all. Thanks Cringer, I got a starting point.
  10. anandknr

    Question Schema analyzer

    Basically, I have to do this validation even before the DB creation. :(
  11. anandknr

    Question Schema analyzer

    Hi All, I have to programmatically parse the schema defeniton file (.df file) to analyze various things. (For example, list all fields with HELP is missing, spell check all field names). Is there any way to acheive the same? Basically I am planning to write a progress procedure which will...
  12. anandknr

    Question Schema Parser / Validator

    Is there any API available to programatically parse / validate / analyze the schema file (.df). My need is like to, check if field help is missing, check and confirm field naming standards etc:-.
  13. anandknr

    Question catch 915 error

    I would like to know if there is any way to catch the error: Lock table overflow, increase -L on server (915) Below is an example I am using to create such an error condition. I know this will be a bad example, but all i need was to produce 915 error. def buffer bacctg for acctg. do...
  14. anandknr

    Confused on Record Bleeding

    I came across something similar recently. define buffer x-customer for customer. find customer where cust-num = 53000021 no-lock . find x-customer where recid (x-customer) = recid (customer) exclusive-lock. customer.cust-sh-na = "test". customer.cust-sh-na was actually a typo for...
  15. anandknr

    Get Time from DateTime

    Not sure if any inbult function to extract the hour from a datetime, but you can write a custom function to find that by parsing the datetime.The point that you shouldn't forget is that both DateTimes should be in same format .
Top