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.
I have below webfocus code . which is printing data from input report to generate another output report. but i have issue PYM_AMY, PAYMENT_TYPe and no of payments are not getting printed correctly.
If someone can help me with this. code is as below
-SET &ECHO=ALL;
-SET DATA_NAME = FGETENV(14,'EXT_SHORT_NAME',14,'A14');
-SET REP_NAME = FGETENV(14,'LAY_SHORT_NAME',14,'A14');
-SET GET_FILE = FGETENV(9,'DATA',45,'A45');
-* Linux Migration Start Change
-SET &WORKDIR=FGETENV(128,'TLG_SHORTNAME_DIR',128,'A128');
-SET &UNAME_RESULT = FGETENV(12,'UNAME_RESULT',20,'A20');
-* Linux Migration End Change
-* Linux Migration Start Change
-SET DATA_FILE = (&WORKDIR || '/'||&DATA_NAME);
-IF &UNAME_RESULT EQ 'Linux' THEN GOTO L1782511 ;
-SET DATA_FILE = ('../'||&DATA_NAME);
-L1782511
-* Linux Migration End Change
-* Linux Migration Start Change
-SET &&REP_FILE = (&WORKDIR || '/'||&REP_NAME);
-IF &UNAME_RESULT EQ 'Linux' THEN GOTO L1782591 ;
-SET &&REP_FILE = ('../'||&REP_NAME);
-L1782591
-* Linux Migration End Change
-*
-*---------------------* Initialize parameters *-----------------------*
-*
-SET &REPCODE = 'ARPR-02-SUM';
-SET &REPNAME = 'P A Y M E N T R E C E I P T S U M M A R Y R E P O R T';
-*
-&&
-*-----------------* Connect to the Oracle database *------------------*
-*
EX apcon
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*-------* Create file that contains decode for Payment Method *-------*
-*
DEFINE FILE M_PYMMTD
-*
PMDESC/A10 = ''''|METHOD_SHORT_DESC|'''';
SPACE1/A2 = ' ';
PYMETHOD/A4 = ''''|PYM_METHOD|'''';
END
-*
TABLE FILE M_PYMMTD
-*
PRINT PYMETHOD SPACE1 PMDESC
ON TABLE SAVE AS PMSAVE
END
-*
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*-----* Create file that contains decode for Payment Sub Method *-----*
-*
DEFINE FILE M_PYMSMT
-*
PSMDESC/A10 = ''''|PSM_SHRT_DESC|'''';
SPACE1/A2 = ' ';
PYMSMETH/A4 = ''''|PYM_SUB_METHOD|'''';
END
-*
TABLE FILE M_PYMSMT
-*
PRINT PYMSMETH SPACE1 PSMDESC
ON TABLE SAVE AS PSMSAVE
END
-*
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*----------------* Close the connection to the Database *-------------*
-*
EX dbdis
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*-----* Define report parameters, output file and page settings *-----*
-*
-SET &I=1;
-SET &&APPARTXT.&I='File Name';
-SET &&APPARVAL.&I=&GET_FILE;
-*
FILEDEF OFFLINE DISK &&REP_FILE
OFFLINE
-INCLUDE gnrpdef.fex
-*
-*-----------------------* Define input file *-------------------------*
-*
-*FILEDEF arphpp_r DISK &DATA_FILE ( LRECL 2100 RECFM F
-* start change U2L
FILEDEF arphpp_r DISK &DATA_FILE ( RECFM F LRECL 2100
-* end change U2L
-RUN
-*
-*-----------------------* Field definitions *-------------------------*
DEFINE FILE ARPHPP_R
-*
PM_DCOD/A8=DECODE PYM_METH(PMSAVE);
PYMMETH/A11=IF PYM_METH EQ ' ' THEN ' '
ELSE PYM_METH||'-'||PM_DCOD;
-*
PSM_DCOD/A8=DECODE SUB_METH(PSMSAVE);
PYMSMTHD/A11=IF SUB_METH EQ ' ' THEN ' '
ELSE SUB_METH||'-'||PSM_DCOD;
-*
LINENO/I6C WITH REC_BAN = 1;
ROWID/A1 = ' ';
-*
DESIGTYPE/A12=IF DES_TYPE EQ 'D' THEN 'D - Deposit'
ELSE IF DES_TYPE EQ 'B' THEN 'B - Billing'
ELSE 'None';
SOU_EX/A9 =SOU_TYPE|SOU_ID ;
NMKT_CODE/A4 =MKT_CODE;
NDESIGTYPE/A12 =DESIGTYPE;
NPYMMETH/A11=PYMMETH;
NPYMSMTHD/A11=PYMSMTHD ;
-* start change U2L
SEQ_NO/A5=EDIT(SEQ_NO,'99999');
-* End change U2L
-*
END
-*
-*------------------* Check status of DEFINE section *-----------------*
-*
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*-----------------------* Report definition *-------------------------*
TABLE FILE ARPHPP_R
-*
-*-----------------------* Page heading lines *------------------------*
HEADING
-*
-INCLUDE gnrphdr.fex
-*
" "
"<44 File Source: <SOU_TYPE><SOU_ID> File Seq #: <FST.SEQ_NO>"
" "
-*
"Market <12 Payment-Type Method Sub Method Total Amount
<+4 Number of "
"<68 Payments"
"-----------------------------------------------------------------
<+0 --------------"
SUM
SOU_EX NOPRINT
FST.SEQ_NO NOPRINT
NMKT_CODE NOPRINT
NDESIGTYPE NOPRINT
NPYMMETH NOPRINT
NPYMSMTHD NOPRINT
PYM_AMT AS '' IN 49
LINENO AS '' IN 62
BY ROWID NOPRINT
BY MKT_CODE AS '' IN 4
BY DESIGTYPE AS '' IN 12
BY PYMMETH AS '' IN 26
BY PYMSMTHD AS '' IN 39
-*
ON MKT_CODE SUBFOOT
"<52 ------------ <66 --------------"
"<15 Sub-Total <49 <ST.PYM_AMT> <62 <ST.LINENO>"
" "
-*
ON ROWID SUBFOOT
"<15 ---------------------------- <52 ------------ <66 --------------"
"<15 Total <49 <TOT.PYM_AMT> <62 <ST.LINENO>";
" "
-*
FOOTING BOTTOM
-IF &&NOCSV GOTO NO_CSV_SET;
-WRITE DDTTL 'File Source','File Seq #','Market','Payment-Type',,
-'Method','Sub Method','Total Amount','Number of Payments'
-SET &NOT_PRINT1 =MKT_CODE ;
-SET &NOT_PRINT2 =DESIGTYPE;
-SET &NOT_PRINT3 =PYMMETH;
-SET &NOT_PRINT4 =PYMSMTHD;
-SET &STOP_FIELD =LINENO ;
-NO_CSV_SET
-INCLUDE gnrpftr.fex
-*
END
-*------------------* Check status of REPORT section *-----------------*
-*
-RUN
-IF &FOCERRNUM NE 0 GOTO ERR;
-*
-*---------------------* Display empty report text *-------------------*
-INCLUDE gnrpempt.fex
-*
-*-----------------------* Exit returning status *---------------------*
-* Linux Migration Start Change
-IF &UNAME_RESULT EQ 'Linux' THEN GOTO LINUX_OS;
-QUIT FOCUS 0
-* Linux Migration End Change
-*
-ERR
-* Linux Migration Start Change
-IF &UNAME_RESULT EQ 'Linux' THEN GOTO LINUX_OS;
-QUIT FOCUS &FOCERRNUM
-LINUX_OS
-EXIT
-* Linux Migration End Change
END