You can find a banner example program (PCL ) in the source file QSAMPLE in library FAX. The program is named BANNER and can be changed at will. Important - note - you must restart the subsystem every time a fix is made.
This is caused by the fact, that CMN is very sensitive and can NOT handle an opening of the program each time it is used. The program is thus found in Main Storage after the first time it is used and CMN must be closed when recompile.
Use WRKFAXVAL to indicate a "Banner Program" - and the program to be called in the header of each page. The programmer can in this case fix the following to get a username as sender instead of company name.
And if the programmer then register company name on all sender in text line 2 on Fax user (WRKFAXUSR) it should solve "the Amphenol question".
.....................................................................
: :
: Change User Profile :
: :
: Type information, press Enter. :
: :
: User Profile . . . . . . . : BENT Name, *DFT :
: User ID . . . . . . . . . . BENT Name :
: User Address . . . . . . . . Name :
: Description . . . . . . . . *USRPRF :
: My Company :
: :
: :
: :
: Voice Phone . . . . . . . . *DFT :
: :
.....................................................................
There are also a more dynamic solution. The programmer can e.g. edit the BANNER program such that the Keyword USER from the RTVCPGA command - containing the send user - are used to fetch correct company name for a given customer ( e.g. via a database ). Or he could choose "Hard Copy" solution e.g.:
.....................................................................
: :
: If (&FrmUser = 'BENT') Then(ChgVar &FrmName 'Agent Data ApS') :
: If (&FrmUser = 'KAJ') Then(ChgVar &FrmName 'My Company') :
: :
.....................................................................
Enclosed is the BANNER program as it is found in QSAMPLE.
Re: Can I change the company name in the banner line?
You can find a banner example program (PCL ) in the source file QSAMPLE in library FAX. The program is named BANNER and can be changed at will. Important - note - you must restart the subsystem every time a fix is made.
This is caused by the fact, that CMN is very sensitive and can NOT handle an opening of the program each time it is used. The program is thus found in Main Storage after the first time it is used and CMN must be closed when recompile.
Use WRKFAXVAL to indicate a "Banner Program" - and the program to be called in the header of each page. The programmer can in this case fix the following to get a username as sender instead of company name.
........................................................................... : : : /* Retrive Fax user informations */ : : RtvFaxUsr UsrPrf(&FrmUser) + : : Name(&FrmAtt) + : : Name2(&FrmName) + : : FaxNo(&FrmFaxNo) : : : : /* From information - Left ajusted - : : -------------------------------- */ : : WrtCpgTxt &Sts Xpos(50) Ypos(13) FontSize(6) + : : LineSpace(&LineSpce) Justify(*Left) + : : Text('From:' !> &FrmName !< ',' !> &FrmAtt !> 'Fax:' !> &FrmFaxNo) : : : ...........................................................................And if the programmer then register company name on all sender in text line 2 on Fax user (WRKFAXUSR) it should solve "the Amphenol question".
There are also a more dynamic solution. The programmer can e.g. edit the BANNER program such that the Keyword USER from the RTVCPGA command - containing the send user - are used to fetch correct company name for a given customer ( e.g. via a database ). Or he could choose "Hard Copy" solution e.g.:
Enclosed is the BANNER program as it is found in QSAMPLE.
.................................................................................. : : : /* ------------------------------------------------------------- */ : : /* Company . . . : Agent Data ApS */ : : /* Design . . . : Niels Liisberg */ : : /* Funktion . . : Basic Coverpage program */ : : /* */ : : /* ------------------------------------------------------------- */ : : Pgm : : : : Dcl &MsgId *Char (7) : : Dcl &MsgDta *Char (80) : : Dcl &MsgF *Char (10) : : Dcl &Sts *Dec 3 : : Dcl &LineSpce *Dec (7 2) : : Dcl &RcpName *Char 30 : : Dcl &RcpAttn *Char 30 : : Dcl &RcpFax *Char (20) : : Dcl &CurPage *Char (5) : : Dcl &OfPages *Char (5) : : Dcl &CurDate *Char (15) : : Dcl &CurTime *Char (5) : : Dcl &FrmUser *Char (10) : : Dcl &FrmName *Char (30) : : Dcl &FrmAdr1 *Char (30) : : Dcl &FrmAdr2 *Char (30) : : Dcl &FrmFaxNo *Char (20) : : Dcl &FrmAtt *Char (50) : : Dcl &Retrans *Char (1) : : : : /* Global Error handling + : : --------------------- */ : : MonMsg Cpf0000 Exec(Goto Error) : : : : /* Get Coverpage header information - : : -------------------------------- */ : : RtvCpgA RcpName(&RcpName) + : : RcpAttn(&RcpAttn) + : : RcpFaxNo(&RcpFax) + : : CurDate(&CurDate) + : : CurTime(&CurTime) + : : CurPagA(&CurPage) + : : TotPagA(&OfPages) + : : User(&FrmUser) + : : FrmName(&FrmName) + : : FrmAdr1(&FrmAdr1) + : : Retrans(&Retrans) : : /* Retrive Fax user informations */ : : RtvFaxUsr UsrPrf(&FrmUser) + : : Name(&FrmAtt) + : : FaxNo(&FrmFaxNo) : : : : /* From information - Left ajusted - : : -------------------------------- */ : : WrtCpgTxt &Sts Xpos(50) Ypos(13) FontSize(6) + : : LineSpace(&LineSpce) Justify(*Left) + : : Text('From:' !> &FrmName !< ',' !> &FrmAtt !> 'Fax:' !> &FrmFaxNo) : : : : /* Recipient info in the middel - : : ---------------------------- */ : : WrtCpgTxt &Sts Xpos(864) Ypos(13) FontSize(6) + : : LineSpace(&LineSpce) Justify(*Center) + : : Text('To:' !> &RcpName !> '| Attn:' !> &RcpAttn ) : : : : /* And page count etc on the right side - : : ------------------------------------ */ : : WrtCpgTxt &Sts Xpos(1650) Ypos(13) FontSize(6) + : : LineSpace(&LineSpce) Justify(*Right) + : : Text('Date:' !> &CurDate !> '|' !> + : : 'Time:' !> &CurTime !> '|' !> + : : 'Page:' !> &CurPage !> + : : 'of' !> &OfPages ) : : /* If Retransmission - Write RETRANSMISSION - : : ---------------------------------------- */ : : if (&Retrans = '1') Then(Do) : : WrtCpgTxt &Sts Xpos(864) Ypos(30) FontSize(8) + : : LineSpace(&LineSpce) Justify(*Center) + : : Text('********** R E T R A N S M I S S I O N **********') : : EndDo : : /* Thats all - : : --------- */ : : return : : : : /* ----------------------------------------------------------------- */ : : /* : : /* ----------------------------------------------------------------- */ : : Error: : : SndPgmMsg MsgId(Cpf9898) MsgF(Qcpfmsg) MsgDta('Banner Error') + : : ToPgmQ(*Same) Msgtype(*Escape) : : MonMsg Cpf0000 : : return : : EndPgm : : : ..................................................................................