Results 1 to 4 of 4

Thread: C String Compare of 2 different length fields.

  1. #1
    New Member
    Join Date
    Dec 2017
    Posts
    16

    Question C String Compare of 2 different length fields.

    Hello,

    I am needing to compare the returned value from the GetUDC (Description001) that contains a single value in the first position to a "Y". Everything I've tried fails with errors related to CHAR issues.

    Thank you in advanced,
    Frank

  2. #2
    Senior Member johndanter's Avatar
    Join Date
    Sep 2003
    Location
    Cork, Ireland
    Posts
    1,304
    Errors in the C?

    Maybe you can use the other already written BSFNs to do this?
    Last edited by johndanter; 12-12-2017 at 03:57 AM.
    John Danter
    You don't go out looking for a job dressed like that do you, on a weekday?

    E900 TR 9.1.5.3 Unix

  3. #3
    Member craig_welton's Avatar
    Join Date
    Oct 2000
    Location
    Litchfield, CT
    Posts
    923
    It would help to see your code, but it should look something like this:

    Code:
    /*assuming dsUDC is the data structure used in the X0005 call*/
    
    if (dsUDC.szDescription001[0] == _J('Y'))
    {
        /* First CHAR in szDescription001 is Y.  In C "strings" are arrays of characters */
    }
    Craig Welton
    PatWel Group Inc.
    http://www.patwel.com
    Home of the FREE JDE Object Browser, JDETrace and NERDup Tools

    E1 9.0 8.98.4.2 Wintel SQL 2008
    E1 9.2 9.2.1.4 iSeries

  4. #4
    New Member
    Join Date
    Dec 2017
    Posts
    16
    Yes, using the X0005....and that did work. Thank you......

    Frank

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.