Results 1 to 10 of 10

Thread: Find First File Matching Wildcard BSFN

  1. #1

    Find First File Matching Wildcard BSFN

    Hi List,

    I used the BSFN "Find First File Matching Wildcard"-(B9600471) on one of my UBEs to retrieve the complete Text File Name from a specific path by passing an incomplete File name followed by Wildcard(*). The BSFN works absolutely fine on the FAT Machine. Once deployed on the Server it fails to retrieve the filename.

    After some investigation I came to know that it is a CLIENT ONLY BSFN. I copied the BSFN and made it a Client / Server (2), build / deployed it on the Server but still the results didnt show up. After going through the codes, i found out that some of the APIs embedded within seem to be working only on WINDOWS Client and mine is an AS/400 server.

    I Build / Deployed the UBEs and the BSFN on one of my Windows Transfer Server. Still it FAILS!! Does anybody know what am i missing to make it run on the SERVER.
    How can i make the same BSFN work on AS / 400 Server?

    Is there any other method which can give me the complete filename if i specify a part of the filename followed by a wildcard? I need to read all the filenames that matches the incomplete filename with wildcard!

    Thanks in advance.


  2. #2
    Member
    Join Date
    Dec 2000
    Location
    Hungary
    Posts
    181

    Re: Find First File Matching Wildcard BSFN

    Hi,
    First of all your AS/400 enterprise server should see a windows file system... and this is the general problem.
    Flat file operations that use STDIO call will work on win and unix, windows only calls only on win, but none of them on AS/400. As far as I know this bsfn uses a windows library function.
    Regards
    Gergely Pongrácz

  3. #3

    Re: Find First File Matching Wildcard BSFN

    Hi Gergely

    Thanks for the information. These are the APIs _findfirst,_findnext,_finddata_t in the BSFN and looks like they are Windows compatible ONLY.

    Is it possible to make it run on the Windows SERVER if i create a copy of this Business Function and turn ON the Client / Server Option?

    What else can be a possible solution for my requirement?

    Thanks in Advance!

  4. #4
    Member
    Join Date
    Nov 2000
    Location
    Denver, Colorado
    Posts
    624

    Re: Find First File Matching Wildcard BSFN

    First, what do you mean you built and deployed the UBE... on the Windows Transfer Server...did you OCM map it to run on the Windows Transfer Server? Just because you deployed it on a machine, it will still run on the default machine unless you override it, right?

    If you want it to run on the AS400 you need to rewrite the Windows APIs functionality on the AS400 and have it accommodate the AS400 file structure (or whatever the proper term is).

    Ben again,

  5. #5
    Member
    Join Date
    Mar 2002
    Location
    Minneapolis, MN
    Posts
    778

    Re: Find First File Matching Wildcard BSFN

    If you have a windows server with JDE services running on it, you should be able to make a copy of that function, define it as a client/server function, and run it on the windows server. Use OCM mappings to direct it to the windows box.

    If you want it to run on the AS/400, you will have to find IFS-specific apis that mimic what the windows-specific apis are doing. Take a look here: IFS API's

    Also, I recommend submitting a question to the following forum: IFS Forum Ask if there is any IFS equivalent of those windows functions and be sure to tell them you are using the c-language.

    Good luck and please let us know what you find.
    Jeremy
    E1 Consultant
    Minneapolis, MN

  6. #6

    Re: Find First File Matching Wildcard BSFN

    Hi All,

    Thanks a lot for your valuable suggestions. It was difficult for me to check for an equivalent API in IFS for the Windows APIs _findfirst and _findnext. Nevertheless, my issue is resolved as I made the Business Function run on the Windows Server rather than AS400. It works perfectly fine. Thanks a lot again for all your inputs!!!!!

  7. #7
    Senior Member ArturoGuiu's Avatar
    Join Date
    Nov 2003
    Location
    ZARAGOZA - SPAIN
    Posts
    102

    Re: Find First File Matching Wildcard BSFN

    Hello,

    I have the same problem but with a linux server. Anyone know how I can find files with wildcard characters in a linux server?. I try to found a BSFN, but all are about Windows servers.

    Thanks in advance..
    AS-400
    E1 8.11 SP1 E1 8.12 Tools 8.98
    E1 9.0 E1 9.1 Tools 9.1
    WIN2000

  8. #8
    Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    165

    Re: Find First File Matching Wildcard BSFN

    Hi Arturo,

    For unix try using the fnmatch api. Setup a pointer to the directory and pass the api the wilcard you want to search against. You'll need to include dirent.h and fnmatch.h. I'll try and post some code if I get a chance.

    Regards

    Neil
    Sys: E1 9.0, TR 8.98.4.14
    Ent: Win 2008 R2 64Bit
    Web: WAS 8.5.0.5 on RedHat Linux 5.10
    DB: Oracle 11.2.0.4

  9. #9
    Senior Member Chan Rana's Avatar
    Join Date
    Aug 2005
    Location
    PA,USA
    Posts
    1,022

    Re: Find First File Matching Wildcard BSFN

    Not sure with Linux but i think a one line shell script will do the job

    Chan
    Chandrakant Rana
    E1 Xe-9.0, AS/400, XML, BSSV
    E1 Integration,C,HTML,Java,CreateForm 3.0

  10. #10

    Need Help

    Quote Originally Posted by AlanParsons View Post
    Hi All,

    Thanks a lot for your valuable suggestions. It was difficult for me to check for an equivalent API in IFS for the Windows APIs _findfirst and _findnext. Nevertheless, my issue is resolved as I made the Business Function run on the Windows Server rather than AS400. It works perfectly fine. Thanks a lot again for all your inputs!!!!!
    Hi Alan,

    Any chance you have the copy of BSFN you made to run on the Win Server, if you can attach it would be great, I tried copying the BSFN and make it Client server but it is giving me error.

    Thanks in advance

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.