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.
Read-Only TopicGo
Search
Notify
Admin
New PM!
Member posted September 29, 2008 09:53 AM
Hi, I have created a pipe delimited file. However with the format as alpha I do not get column headers and have a footer to show the end of the file? TABLE FILE CAR PRINT COUNTRY DELIMITER CAR DELIMITER SALES ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT ALPHA END
Posts: 4 | Location: Winston-Salem, NC | Registered: August 20, 2007
IP
Expert Doresa,
As a new poster, could you please check the Friendly Reminders, 'update your signatures' and update your profile signature with your products, releases and platforms so that we may better help you.
Are you trying to create a pipe-delimited file or read one? Please clarify.
Ginny --------------------------------- Prod: WF 7.7.01 Dev: WF 7.6.9-11 Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006
IP
Virtuoso If you're creating a pipe-delimited file, why do you need column headers? And what is the intended use of the footer. Most tools will know the end of a file when they get there without you having to specify 'end of file.'
Without much to go on, try ON TABLE PCHOLD FORMAT WP.
Regards, Darin In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
IP
Platinum Member Doresa,
I have created pipe have recently created a pipe delimeted report. The code below does have a heading for the report. If you look closely you'll be able to figure out how to put fotings on the report.
Good Luck,
Timothy
-PRODUCETXT
-*
-IF ('&COUNTNUM.EVAL' LT 1) AND ('&TXTFLAG.EVAL' EQ 'Y') GOTO NOTXTDATA;
-IF &TXTFLAG NE 'Y' THEN GOTO SKIPTXT;
DEFINE FILE DISSUBREG
PIPE/A1 = '|';
MASKSSN/A09 = IF disbusprnssn = ' ' THEN ' ' ELSE EDIT(disbusprnssn, '$$$$$*****9999');
END
-RUN
-*
-*****************************************************
-*THIS IS TO PRODUCE HEADING OF THE TEXT REPORT ONLY *
-*****************************************************
TABLE FILE DISSUBREG
PRINT disacqid NOPRINT
COMPUTE P_ACQUIRER/A75 = 'Discover Submitted Registration Report';
PIPE
COMPUTE P_BANK/A4 = ' ';
PIPE
COMPUTE P_DISACCTNBR/A17 = '';
PIPE
COMPUTE P_OPERATOR/A61 = '';
PIPE
COMPUTE P_DATASRCDESC/A250 = '';
PIPE
COMPUTE P_SUBREGDT/A20 = '';
PIPE
COMPUTE P_RECTYPDESC/A250 = '';
PIPE
COMPUTE P_CNVACCTNBR/A27 = '';
PIPE
COMPUTE P_MCC/A4 = '';
PIPE
COMPUTE P_MCHSTATDESC/A250 = '';
PIPE
COMPUTE P_MERCHSTATDT/A17 = '';
PIPE
COMPUTE P_MCHTYPDESC/A250 = '';
PIPE
COMPUTE P_POS_DWN_IND/A250 = '';
PIPE
COMPUTE P_DBANAME/A40 = '';
PIPE
COMPUTE P_DBADR1/A40 = '';
PIPE
COMPUTE P_DBADR2/A40 = '';
PIPE
COMPUTE P_DBACITY/A28 = '';
PIPE
COMPUTE P_DBASTATE/A9 = '';
PIPE
COMPUTE P_DBAZIP/A15 = '';
PIPE
COMPUTE P_DBACTRY/A8 = '';
PIPE
COMPUTE P_DBAPHON/A15 = '';
PIPE
COMPUTE P_DBAEMAIL/A100 = '';
PIPE
COMPUTE P_WEBSITE/A100 = '';
PIPE
COMPUTE P_BUSTYPDESC/A250 = '';
PIPE
COMPUTE P_HQACCTNBR/A15 = '';
PIPE
COMPUTE P_BUSCONFRST/A22 = '';
PIPE
COMPUTE P_BUSCONLAST/A22 = '';
PIPE
COMPUTE P_BUSPRNFRST/A22 = '';
PIPE
COMPUTE P_BUSPRNLAST/A22 = '';
PIPE
COMPUTE P_BUSPRNTITLE/A19 = '';
PIPE
COMPUTE P_BUSPRNHMADR1/A40 = '';
PIPE
COMPUTE P_BUSPRNHMADR2/A40 = '';
PIPE
COMPUTE P_BUSPRNHMCITY/A28 = '';
PIPE
COMPUTE P_BUSPRNHMSTATE/A24 = '';
PIPE
COMPUTE P_BUSPRNHMZIP/A22 = '';
PIPE
COMPUTE P_BUSPRNHMCTRY/A23 = '';
PIPE
COMPUTE P_BUSPRNSSN/A17 = '';
PIPE
COMPUTE P_TAXID/A9 = '';
PIPE
COMPUTE P_LEGBUSNM/A40 = '';
PIPE
COMPUTE P_BUSADR1/A40 = '';
PIPE
COMPUTE P_BUSADR2/A40 = '';
PIPE
COMPUTE P_BUSCITY/A28 = '';
PIPE
COMPUTE P_BUSTATE/A9 = '';
PIPE
COMPUTE P_BUSZIP/A15 = '';
PIPE
COMPUTE P_BUSCTRY/A28 = '';
PIPE
WHERE RECORDLIMIT EQ 1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HDG1 FORMAT FOCUS
END
-RUN
-IF (&FOCERRNUM NE 0) THEN GOTO WRITE_ERROR;
-*****************************************************
-*THIS IS TO PRODUCE THE DATE OF THE TEXT VERSION *
-*****************************************************
TABLE FILE DISSUBREG
PRINT disacqid NOPRINT
COMPUTE SOURCEDTM/A20 = HCNVRT(discredtm,'(HMDYYS)',20,'A20'); NOPRINT
COMPUTE P_ACQUIRER/A75 = 'Report Date: ' | '&RPT_TODAY' | ' Source File Timestamp: ' | SOURCEDTM;
PIPE
COMPUTE P_BANK/A4 = '';
PIPE
COMPUTE P_DISACCTNBR/A17 = '';
PIPE
COMPUTE P_OPERATOR/A61 = '';
PIPE
COMPUTE P_DATASRCDESC/A250 = '';
PIPE
COMPUTE P_SUBREGDT/A20 = '';
PIPE
COMPUTE P_RECTYPDESC/A250 = '';
PIPE
COMPUTE P_CNVACCTNBR/A27 = '';
PIPE
COMPUTE P_MCC/A4 = '';
PIPE
COMPUTE P_MCHSTATDESC/A250 = '';
PIPE
COMPUTE P_MERCHSTATDT/A17 = '';
PIPE
COMPUTE P_MCHTYPDESC/A250 = '';
PIPE
COMPUTE P_POS_DWN_IND/A250 = '';
PIPE
COMPUTE P_DBANAME/A40 = '';
PIPE
COMPUTE P_DBADR1/A40 = '';
PIPE
COMPUTE P_DBADR2/A40 = '';
PIPE
COMPUTE P_DBACITY/A28 = '';
PIPE
COMPUTE P_DBASTATE/A9 = '';
PIPE
COMPUTE P_DBAZIP/A15 = '';
PIPE
COMPUTE P_DBACTRY/A8 = '';
PIPE
COMPUTE P_DBAPHON/A15 = '';
PIPE
COMPUTE P_DBAEMAIL/A100 = '';
PIPE
COMPUTE P_WEBSITE/A100 = '';
PIPE
COMPUTE P_BUSTYPDESC/A250 = '';
PIPE
COMPUTE P_HQACCTNBR/A15 = '';
PIPE
COMPUTE P_BUSCONFRST/A22 = '';
PIPE
COMPUTE P_BUSCONLAST/A22 = '';
PIPE
COMPUTE P_BUSPRNFRST/A22 = '';
PIPE
COMPUTE P_BUSPRNLAST/A22 = '';
PIPE
COMPUTE P_BUSPRNTITLE/A19 = '';
PIPE
COMPUTE P_BUSPRNHMADR1/A40 = '';
PIPE
COMPUTE P_BUSPRNHMADR2/A40 = '';
PIPE
COMPUTE P_BUSPRNHMCITY/A28 = '';
PIPE
COMPUTE P_BUSPRNHMSTATE/A24 = '';
PIPE
COMPUTE P_BUSPRNHMZIP/A22 = '';
PIPE
COMPUTE P_BUSPRNHMCTRY/A23 = '';
PIPE
COMPUTE P_BUSPRNSSN/A17 = '';
PIPE
COMPUTE P_TAXID/A9 = '';
PIPE
COMPUTE P_LEGBUSNM/A40 = '';
PIPE
COMPUTE P_BUSADR1/A40 = '';
PIPE
COMPUTE P_BUSADR2/A40 = '';
PIPE
COMPUTE P_BUSCITY/A28 = '';
PIPE
COMPUTE P_BUSTATE/A9 = '';
PIPE
COMPUTE P_BUSZIP/A15 = '';
PIPE
COMPUTE P_BUSCTRY/A28 = '';
PIPE
WHERE RECORDLIMIT EQ 1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HDG2 FORMAT FOCUS
END
-RUN
-******************************************
-*THIS IS THE ACTUAL DATA FOR THE REPORT *
-******************************************
TABLE FILE DISSUBREG
PRINT disacqid NOPRINT
COMPUTE P_ACQUIRER/A75 = 'Acquirer ID';
PIPE
COMPUTE P_BANK/A4 = 'Bank';
PIPE
COMPUTE P_DISACCTNBR/A17 = 'Discover Acct Nbr';
PIPE
COMPUTE P_OPERATOR/A61 = 'Operator';
PIPE
COMPUTE P_DATASRCDESC/A250 = 'Data Source - Desc';
PIPE
COMPUTE P_SUBREGDT/A20 = 'Reg Submit Date';
PIPE
COMPUTE P_RECTYPDESC/A250 = 'Record Type - Desc';
PIPE
COMPUTE P_CNVACCTNBR/A27 = 'Converted Discover Acct Nbr';
PIPE
COMPUTE P_MCC/A4 = 'MCC';
PIPE
COMPUTE P_MCHSTATDESC/A250 = 'Merchant Status - Desc';
PIPE
COMPUTE P_MERCHSTATDT/A17 = 'Merch Status Date';
PIPE
COMPUTE P_MCHTYPDESC/A250 = 'Merchant Type - Desc';
PIPE
COMPUTE P_POS_DWN_IND/A250 = 'POS Download Indicator';
PIPE
COMPUTE P_DBANAME/A40 = 'DBA Name' ;
PIPE
COMPUTE P_DBADR1/A40 = 'DBA Addr 1';
PIPE
COMPUTE P_DBADR2/A40 = 'DBA Addr 2';
PIPE
COMPUTE P_DBACITY/A28 = 'DBA City';
PIPE
COMPUTE P_DBASTATE/A9 = 'DBA State';
PIPE
COMPUTE P_DBAZIP/A15 = 'DBA Zip';
PIPE
COMPUTE P_DBACTRY/A8 = 'DBA Ctry';
PIPE
COMPUTE P_DBAPHON/A15 = 'DBA Phone';
PIPE
COMPUTE P_DBAEMAIL/A100 = 'DBA Email';
PIPE
COMPUTE P_WEBSITE/A100 = 'Merch Website';
PIPE
COMPUTE P_BUSTYPDESC/A250 = 'Bus Type - Desc';
PIPE
COMPUTE P_HQACCTNBR/A15 = 'HQ Acct Nbr';
PIPE
COMPUTE P_BUSCONFRST/A22 = 'Bus Contact First';
PIPE
COMPUTE P_BUSCONLAST/A22 = 'Bus Contact Last';
PIPE
COMPUTE P_BUSPRNFRST/A22 = 'Bus Principal First';
PIPE
COMPUTE P_BUSPRNLAST/A22 = 'Bus Principal Last';
PIPE
COMPUTE P_BUSPRNTITLE/A19 = 'Bus Principal Title';
PIPE
COMPUTE P_BUSPRNHMADR1/A40 = 'Bus Principal Home Addr 1';
PIPE
COMPUTE P_BUSPRNHMADR2/A40 = 'Bus Principal Home Addr 2';
PIPE
COMPUTE P_BUSPRNHMCITY/A28 = 'Bus Principal Home City';
PIPE
COMPUTE P_BUSPRNHMSTATE/A24 = 'Bus Principal Home State';
PIPE
COMPUTE P_BUSPRNHMZIP/A22 = 'Bus Principal Home Zip';
PIPE
COMPUTE P_BUSPRNHMCTRY/A23 = 'Bus Principal Home Ctry';
PIPE
COMPUTE P_BUSPRNSSN/A17 = 'Bus Principal SSN';
PIPE
COMPUTE P_TAXID/A9 = 'Tax ID';
PIPE
COMPUTE P_LEGBUSNM/A40 = 'Legal Bus Name';
PIPE
COMPUTE P_BUSADR1/A40 = 'Bus Addr 1';
PIPE
COMPUTE P_BUSADR2/A40 = 'Bus Addr 2';
PIPE
COMPUTE P_BUSCITY/A28 = 'Bus City';
PIPE
COMPUTE P_BUSTATE/A9 = 'Bus State';
PIPE
COMPUTE P_BUSZIP/A15 = 'Bus Zip';
PIPE
COMPUTE P_BUSCTRY/A28 = 'Bus Ctry';
PIPE
WHERE RECORDLIMIT EQ 1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HDG3 FORMAT FOCUS
END
-RUN
-******************************************
-*THIS IS THE ACTUAL DATA FOR THE REPORT *
-******************************************
TABLE FILE DISSUBREG
PRINT disacqid NOPRINT
COMPUTE SOURCEDTM/A20 = HCNVRT(discredtm,'(HMDYYS)',20,'A20'); NOPRINT
COMPUTE MRCHSTATDT/A10 = HCNVRT(dismrchstatupdt,'(HMDYY)',20,'A10'); NOPRINT
COMPUTE P_ACQUIRER/A75 = disacqid;
PIPE
COMPUTE P_BANK/A4 = disbank;
PIPE
COMPUTE P_DISACCTNBR/A17 = dismchnum;
PIPE
COMPUTE P_OPERATOR/A61 = discreuser;
PIPE
COMPUTE P_DATASRCDESC/A250 = disupsrccd;
PIPE
COMPUTE P_SUBREGDT/A20 = SOURCEDTM;
PIPE
COMPUTE P_RECTYPDESC/A250 = disrectype;
PIPE
COMPUTE P_CNVACCTNBR/A27 = disconvmrch;
PIPE
COMPUTE P_MCC/A4 = dismcc;
PIPE
COMPUTE P_MCHSTATDESC/A250 = dismrchstatcd;
PIPE
COMPUTE P_MERCHSTATDT/A17 = MRCHSTATDT;
PIPE
COMPUTE P_MCHTYPDESC/A250 = dismrchtype;
PIPE
COMPUTE P_POS_DWN_IND/A250 = dispdwnld;
PIPE
COMPUTE P_DBANAME/A40 = disdbanam;
PIPE
COMPUTE P_DBADR1/A40 = disdbaress1;
PIPE
COMPUTE P_DBADR2/A40 = disdbaress2;
PIPE
COMPUTE P_DBACITY/A28 = disdbacity;
PIPE
COMPUTE P_DBASTATE/A9 = disstate;
PIPE
COMPUTE P_DBAZIP/A15 = disdbazip;
PIPE
COMPUTE P_DBACTRY/A8 = disdbactry;
PIPE
COMPUTE P_DBAPHON/A15 = disdbaphn;
PIPE
COMPUTE P_DBAEMAIL/A100 = disemail;
PIPE
COMPUTE P_WEBSITE/A100 = disurl;
PIPE
COMPUTE P_BUSTYPDESC/A250 = disbustyp;
PIPE
COMPUTE P_HQACCTNBR/A15 = dishdqacct;
PIPE
COMPUTE P_BUSCONFRST/A22 = disbusfrnam;
PIPE
COMPUTE P_BUSCONLAST/A22 = disbusltnam;
PIPE
COMPUTE P_BUSPRNFRST/A22 = disbusprnfnam;
PIPE
COMPUTE P_BUSPRNLAST/A22 = disbusprnlnam;
PIPE
COMPUTE P_BUSPRNTITLE/A19 = disbusprntinam;
PIPE
COMPUTE P_BUSPRNHMADR1/A40 = disbusprnress1;
PIPE
COMPUTE P_BUSPRNHMADR2/A40 = disbusprnress2;
PIPE
COMPUTE P_BUSPRNHMCITY/A28 = disbusprncity;
PIPE
COMPUTE P_BUSPRNHMSTATE/A24 = disbusprnstate;
PIPE
COMPUTE P_BUSPRNHMZIP/A22 = disbusprnzip;
PIPE
COMPUTE P_BUSPRNHMCTRY/A23 = disbusprnctry;
PIPE
COMPUTE P_BUSPRNSSN/A17 = MASKSSN;
PIPE
COMPUTE P_TAXID/A9 = distaxid;
PIPE
COMPUTE P_LEGBUSNM/A40 = dislegalnam;
PIPE
COMPUTE P_BUSADR1/A40 = disbusress1;
PIPE
COMPUTE P_BUSADR2/A40 = disbusress2;
PIPE
COMPUTE P_BUSCITY/A28 = disuscity;
PIPE
COMPUTE P_BUSTATE/A9 = disbusstate;
PIPE
COMPUTE P_BUSZIP/A15 = disbuszip;
PIPE
COMPUTE P_BUSCTRY/A28 = disbusctry;
PIPE
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS DATAOUT FORMAT FOCUS
END
-RUN
-IF (&FOCERRNUM NE 0) THEN GOTO WRITE_ERROR;
-* ****************************************************************************
-* Combine all records above into a single file *
-* ****************************************************************************
USE
HDG1 AS HDG1
HDG2 AS HDG1
HDG3 AS HDG1
DATAOUT AS HDG1
END
TABLE FILE HDG1
PRINT
P_ACQUIRER
PIPE
P_BANK
PIPE
P_DISACCTNBR
PIPE
P_OPERATOR
PIPE
P_DATASRCDESC
PIPE
P_SUBREGDT
PIPE
P_RECTYPDESC
PIPE
P_CNVACCTNBR
PIPE
P_MCC
PIPE
P_MCHSTATDESC
PIPE
P_MERCHSTATDT
PIPE
P_MCHTYPDESC
PIPE
P_POS_DWN_IND
PIPE
P_DBANAME
PIPE
P_DBADR1
PIPE
P_DBADR2
PIPE
P_DBACITY
PIPE
P_DBASTATE
PIPE
P_DBAZIP
PIPE
P_DBACTRY
PIPE
P_DBAPHON
PIPE
P_DBAEMAIL
PIPE
P_WEBSITE
PIPE
P_BUSTYPDESC
PIPE
P_HQACCTNBR
PIPE
P_BUSCONFRST
PIPE
P_BUSCONLAST
PIPE
P_BUSPRNFRST
PIPE
P_BUSPRNLAST
PIPE
P_BUSPRNTITLE
PIPE
P_BUSPRNHMADR1
PIPE
P_BUSPRNHMADR2
PIPE
P_BUSPRNHMCITY
PIPE
P_BUSPRNHMSTATE
PIPE
P_BUSPRNHMZIP
PIPE
P_BUSPRNHMCTRY
PIPE
P_BUSPRNSSN
PIPE
P_TAXID
PIPE
P_LEGBUSNM
PIPE
P_BUSADR1
PIPE
P_BUSADR2
PIPE
P_BUSCITY
PIPE
P_BUSTATE
PIPE
P_BUSZIP
PIPE
P_BUSCTRY
PIPE
&FMTTXTOUT (='s to ON TABLE PCHOLD FORMAT ALPHA)
END
-RUN Prod: WebFOCUS 7.6.10 MRE Oracle/Sybase Test: DevStudio 7.6.6 WF Server 7.6.6 Report Caster 7.6.6 Web Server - Tomcat MS Windows XP SP2 Output: HTML, Excel 2000 , PDF, CSV, DOC
<JG> posted September 30, 2008 02:47 AM
I think it is much simpler just to -WRITE the header and trailer -* ALLOCATE the output file using append FILEDEF OUTFILE DISK OUTFILE.FTM (APPEND -RUN -* write the header row -WRITE OUTFILE COUNTRY|CAR|SALES -RUN generate the data rows DEFINE FILE CAR DELIMITER/A1='|'; END TABLE FILE CAR PRINT COUNTRY DELIMITER CAR DELIMITER SALES ON TABLE NOTOTAL ON TABLE HOLD AS OUTFILE FORMAT ALPHA END -RUN -* generate the trailer row -WRITE OUTFILE No of Records|&LINES|. -RUN -* recreate the master with a single column of the correct max row length !DEL OUTFILE.MAS FILEDEF Master DISK OUTFILE.MAS (APPEND -RUN -WRITE Master FILENAME=OUTFILE , SUFFIX=FIX , $ -WRITE Master SEGMENT=OUTFILE, SEGTYPE=S0, $ -WRITE Master FIELDNAME=RECLINE, ALIAS=E01, USAGE=A34, ACTUAL=A34, $ -* present the data TABLE FILE OUTFILE PRINT * ON TABLE PCHOLD FORMAT ALPHA END
Please Wait. Your request is being processed...
Read-Only TopicCopyright © 1996-2020 Information Builders