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     [CLOSED]paymnet amount , payment method and line no are not getting printed correctly

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]paymnet amount , payment method and line no are not getting printed correctly
 Login/Join
 
Gold member
posted
Hi all,

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
 


and mass file is as below

  
FILE=arphpp_r ,SUFFIX=FIX
SEGNAME=FIRST
 FIELDNAME=MKT_CODE     ,ALIAS=        ,FORMAT=A3     ,ACTUAL=A3    ,$
 FIELDNAME=FILLER0      ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=REC_BAN      ,ALIAS=        ,FORMAT=I9     ,ACTUAL=I4    ,$
 FIELDNAME=ROWID        ,ALIAS=        ,FORMAT=A18    ,ACTUAL=A18   ,$
 FIELDNAME=DEP_DATE     ,ALIAS=        ,FORMAT=A8     ,ACTUAL=A8    ,$
 FIELDNAME=BAN_CODE     ,ALIAS=        ,FORMAT=A10    ,ACTUAL=A10   ,$
 FIELDNAME=PYM_METH     ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=SUB_METH     ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=BAN_CODE1    ,ALIAS=        ,FORMAT=A10    ,ACTUAL=A10   ,$
 FIELDNAME=ACC_NO       ,ALIAS=        ,FORMAT=A20    ,ACTUAL=A20   ,$
 FIELDNAME=CHECK_NO     ,ALIAS=        ,FORMAT=A24    ,ACTUAL=A24   ,$
 FIELDNAME=CAR_NO       ,ALIAS=        ,FORMAT=A20    ,ACTUAL=A20   ,$
 FIELDNAME=DBT_VOUC     ,ALIAS=        ,FORMAT=P12    ,ACTUAL=P6    ,$
 FIELDNAME=GIF_NO       ,ALIAS=        ,FORMAT=A9     ,ACTUAL=A9    ,$
 FIELDNAME=ORI_AMT      ,ALIAS=        ,FORMAT=P11.2  ,ACTUAL=P5    ,$
 FIELDNAME=FILLER1      ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=ORI_BAN      ,ALIAS=        ,FORMAT=I9     ,ACTUAL=I4    ,$
 FIELDNAME=SUB_NO       ,ALIAS=        ,FORMAT=A20    ,ACTUAL=A20   ,$
 FIELDNAME=AMT_DUE      ,ALIAS=        ,FORMAT=P11.2  ,ACTUAL=P5    ,$
 FIELDNAME=SOU_TYPE     ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=SOU_ID       ,ALIAS=        ,FORMAT=A8     ,ACTUAL=A8    ,$
 FIELDNAME=FILLER2      ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=SEQ_NO       ,ALIAS=        ,FORMAT=I5     ,ACTUAL=I11   ,$
 FIELDNAME=BATCH_NO     ,ALIAS=        ,FORMAT=I5     ,ACTUAL=I11   ,$
 FIELDNAME=LIN_NO       ,ALIAS=        ,FORMAT=I4     ,ACTUAL=I11   ,$
 FIELDNAME=COM_CODE     ,ALIAS=        ,FORMAT=A5     ,ACTUAL=A5    ,$
 FIELDNAME=PYM_REFE     ,ALIAS=        ,FORMAT=A8     ,ACTUAL=A8    ,$
 FIELDNAME=PYM_REFE1    ,ALIAS=        ,FORMAT=A8     ,ACTUAL=A8    ,$
 FIELDNAME=FILLER3      ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=REC_ID       ,ALIAS=        ,FORMAT=I9     ,ACTUAL=I4    ,$
 FIELDNAME=RUN_NO       ,ALIAS=        ,FORMAT=I3     ,ACTUAL=I2    ,$
 FIELDNAME=STO_ID       ,ALIAS=        ,FORMAT=A4     ,ACTUAL=A4    ,$
 FIELDNAME=FILLER4      ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=REF_ID       ,ALIAS=        ,FORMAT=I9     ,ACTUAL=I4    ,$
 FIELDNAME=ACT_TYPE     ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=EXP_DATE     ,ALIAS=        ,FORMAT=A8     ,ACTUAL=A8    ,$
 FIELDNAME=PRO_TYPE     ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=DES_TYPE     ,ALIAS=        ,FORMAT=A2     ,ACTUAL=A2    ,$
 FIELDNAME=ROWID1       ,ALIAS=        ,FORMAT=A18    ,ACTUAL=A18   ,$
 FIELDNAME=AUT_CODE     ,ALIAS=        ,FORMAT=A20    ,ACTUAL=A20   ,$
 FIELDNAME=AUT_TYPE     ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=FILLER5      ,ALIAS=        ,FORMAT=A1     ,ACTUAL=A1    ,$
 FIELDNAME=REF_NO       ,ALIAS=        ,FORMAT=I9     ,ACTUAL=I4    ,$
 FIELDNAME=PYM_AMT      ,ALIAS=        ,FORMAT=P11.2  ,ACTUAL=P5    ,$
 FIELDNAME=FILLER6      ,ALIAS=        ,FORMAT=A1807  ,ACTUAL=A1807 ,$
    
$Total Length: 2100




Thanks in advance

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS, Linux
Excel, CSV
 
Posts: 62 | Registered: May 23, 2017Report This Post
Virtuoso
posted Hide Post
Genius

I searched your code for PYM_AMY, PAYMENT_TYP and did not find those fields referenced anywhere including in the master file.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
quote:
PYM_AMY

S/B read as : PYM_AMT

But PAYMENT_TYP does not exist.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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     [CLOSED]paymnet amount , payment method and line no are not getting printed correctly

Copyright © 1996-2020 Information Builders