Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Accessing CSV file in IFS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Accessing CSV file in IFS
 Login/Join
 
Platinum Member
posted
Hi All, is there any support in webfocus to access a file (CSV) located in the Iseries integrated File system (IFS)?

This message has been edited. Last edited by: Lloyd,


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
Expert
posted Hide Post
As a csv is a text file, I can'e see why not.

Have you tried yet ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Tried..is such a subjective word....

I did scan the online help, and didn't come across any references to the IFS. I then looked at our DB2 client to see if there was anything there that might help and saw nothing help full. (Actually I tried to get to the IFS directory and it crashed!)

I haven't accessed a text file through WF, so I am pretty much a nubie there....


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
Expert
posted Hide Post
I'm not familiar with IFS, but if WebFOCUS can see the file and FILEDEF it, then it should be able to read it.

Because it is a CSV, you will need to create a master file for it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
OK, so I tried following a forum post for something simialr. But I am getting errors.
  
MASTER FILE:

FILENAME=SYNCRLM, SUFFIX=COM     , $
  SEGMENT=SYNCRLM, SEGTYPE=S0, $
    FIELDNAME=FACILITY, USAGE=A23, ACTUAL=A23, $
    FIELDNAME=RLMORD, USAGE=A14, ACTUAL=A14, $
    FIELDNAME=RLMLIN, USAGE=A6, ACTUAL=A6, $
    FIELDNAME=PCTL, USAGE=A10, ACTUAL=A10, $
    FIELDNAME=SKU, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=UPC, USAGE=A20, ACTUAL=A20, $
    FIELDNAME=RLMACT, USAGE=A7, ACTUAL=A7, $
    FIELDNAME=TOWVE, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=WAVED, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=PIKQTY, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=PAKQTY, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=PCKHLD, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=SHIPQTY, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=CANQTY, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=ORDQTY, USAGE=A11, ACTUAL=A11, $



  
FEX:

-SET &ECHO='ALL';
SET ASNAMES = ON
SET PCOMMA = ON

REMOTE DEST = MK400NEW
REMOTE USER=MK_APPS
REMOTE PASSWORD=mk@99$
-REMOTE BEGIN

-SET &FILEPATH = '//MKI7WHL/';

-SET &_FILE = 'DRV/ORDSTATUS2013101106.CSV';
-SET &FULLFILENAME = &FILEPATH | &_FILE;

FILEDEF SYNCRLM DISK "&FULLFILENAME"

TABLE FILE SYNCRLM
PRINT FACILITY
END
-RUN

-REMOTE END


  
RUN:

 SET ASNAMES = ON
 SET PCOMMA = ON
 REMOTE DEST = MK400NEW
 REMOTE USER=MK_APPS
 REMOTE PASSWORD=mk@99$
 -REMOTE BEGIN
 -SET &FILEPATH = '//MKI7WHL/';
 -SET &_FILE = 'DRV/ORDSTATUS2013101106.CSV';
 -SET &FULLFILENAME = //MKI7WHL/ | DRV/ORDSTATUS2013101106.CSV;
 FILEDEF SYNCRLM DISK "//MKI7WHL/DRV/ORDSTATUS2013101106.CSV"
 TABLE FILE SYNCRLM
 PRINT FACILITY
 END
 -RUN
 -REMOTE END
 (FOC229) ERROR READING EXTERNAL DATA FILE: SYNCRLM
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 (FOC1400) SQLCODE IS 229 (HEX: 000000E5)
 : ERROR READING EXTERNAL DATA FILE: SYNCRLM
 L    (FOC1405) SQL PREPARE ERROR.
 -*-MRNOEDIT END




The part I am not sure about is how do I access a file in the Iseries IFS. Any one know how to code this?

This message has been edited. Last edited by: Lloyd,


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
Platinum Member
posted Hide Post
Hi there,
I seem to recall that I did read a flat file on IFS many moons ago, but I cannot remember how.
Hopefully someone that uses WebFOCUS on IBM i will come to your rescue ;-)

Your Master File is on the right track - so obviously you need to overcome the "ERROR READING EXTERNAL DATA FILE: SYNCRLM"

Have a look at the "Adapter Administration" and "Server Administration" manuals on http://documentation.informati...ilders.com/wf77x.asp as a start. The Adapter Admin manual has references to accessing flat and delimited files on IFS.

I can't remember whether IBM i is case sensitive in terms of the "unix" file names. If it is, you may need to have a lowercase filename in your FILEDEF.

Have you tried the following type of filename convention?
/QSYS.LIB/MYLIBRARY.LIB/MYSRC.FILE

And then, another possible option just to get started: copy your CSV file into one of your APPS directories e.g. into BASEAPP.

Then try the following FILEDEF:
FILEDEF SYNCRLM DISK baseapp/ordstatus2013101106.csv


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
Hi,
I found this:

How to Access IFS Files
IFS access follows the standards of a number of other platforms for FILEDEF, USE, and
APPS, but is most like UNIX because the file names follow the same rules. The following is
a summary of the respective commands and conventions

FILEDEF ddname DISK filename [(options]

USE
filename [AS name]
END

APP MAP MYAPP directory

where:
ddname
Is the reference name for the file being opened.
filename
Is either the relative path or full path and the file name (for example, myfile.dat,
acctng/myfile.dat, or /home/iadmin/acctng/myfile.dat).
options
Are the available access options such as LRECL or RECFM.
For more information about FILEDEF options, see the Stored Procedures Reference.
name
Is the optional alternate name of the Master File.
directory
Is the full path name of the directory (for example, /home/iadmin/acctng).
Use of a relative path name is not recommended, since this varies with any given connection
to the server. Use of environment variables or shortcuts (for example, $HOME or ~) is not
supported in any context.


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
Hi I actually figured it out, over thinking made it seem harder than it actually was....

All I needed to do was reference the IFS folder and file name separated by FORWARD slashes.

  
-SET &YESTERDAY=AYMD(&YYMD,&DAYZ,'I8YYMD');
-SET &FULLFILENAME = '/FOLDER/FILENAME' | &YESTERDAY | '??.CSV';

FILEDEF SYNCFILE DISK "&FULLFILENAME"



This message has been edited. Last edited by: Lloyd,


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Accessing CSV file in IFS

Copyright © 1996-2020 Information Builders