× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



   Hi all:
   Please check the program below:
   5722WDS V5R3M0 030905 SEU SOURCE LISTING 11/11/04 11:17:03 MCL2000 PAGE 1
   SOURCE FILE . . . . . . . CBSLIB/QRPGLESRC
   MEMBER . . . . . . . . . BMBCUS
   SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+...
   7 ...+... 8 ...+... 9 ...+... 0
   100 HNOMAIN
   200 FCUSWEB IF E K DISK USROPN
   300 FBMBCUSPF O A E K DISK USROPN
   400 DCustList S 10 Inz('CUSTLIST')
   500 DFMT S 10 Inz('FORMAT')
   600 Drc S 6 0
   700 *
   800 D salesRep S Like(ALCHNB)
   900 * Customer list subfile record
   1000 DCustRec DS
   1100 D SflRep Like(ALCHNB)
   1200 D SflCo Like(ALAENB)
   1300 D SflID Like(ALCANB)
   1400 D SflName Like(ALCLTX)
   1500 D SflState Like(ALBYCD)
   1600 D SflCity Like(ALCPTX)
   1700 D SflPhone Like(ALCRTX)
   1800 D SflFax Like(ALCSTX)
   1900 *
   2000 * Return structure for customer information
   2100 D CustInfo E DS Extname(CUSWEB)
   2200 *
   2300 * Get customer detail info
   2400 DGetCustRec PR ExtProc('GetCustRec')
   2500 D info LikeDS(CustInfo)
   2600 *
   2700 * Proc. to fill the subfile
   2800 Dbldsfl PR
   2900 D salesRep Like(ALCHNB)
   3000 *
   3100 * Return customer number
   3200 *
   3300 Dreadc PR ExtProc('readc')
   3400 D salesRep Like(ALCHNB)
   3500 D custno Like(ALCANB)
   3600 /Copy WEBPRC/QRPGLESRC,SUBFILEPR2
   3700 *---------------------------------------------------------------
   3800 * BldSfl
   3900 *
   4000 * Build the subfile
   4100 *
   4200 * Fill the subfile with all records from the customer database
   4300 *
   4400 *---------------------------------------------------------------
   4500 PBldSfl B
   4600 D BldSfl PI
   4700 D salesRep Like(ALCHNB)
   4800 * ----------
   4900 *
   5000 * Open file and get the first record
   5100 C Open CUSWEB
   5200 C salesRep READE CUSWEB
   5300 *
   5400 * For every record in the file ....
   5500 C DoW NOT %EOF
   5600 *
   5700 C Eval SflRep = ALCHNB
   5800 C Eval SflCo = ALAENB
   5900 C Eval SflID = ALCANB
   6000 C EVAL SflName = ALCLTX
   6100 C EVAL SflState = ALBYCD
   6200 C EVAL SflCity = ALCPTX
   6300 C Eval SflPhone = ALCRTX
   6400 C Eval SflFax = ALCSTX
   6500 C Eval rc = appendSF(custlist:
   6600 C %Addr(custrec):
   6700 C %Size(custrec))
   6800 *
   6900 * Read next record
   7000 C salesRep READE CUSWEB
   7100 *
   7200 C ENDDO
   7300 *
   7400 C CLOSE CUSWEB
   7500 *
   7600 PBldSfl E
   7700 *------------------------------------------------------------*
   7800 * Cleanup - Called when the subfile page is unloaded *
   7900 *------------------------------------------------------------*
   8000 PCLUP B export
   8100 D CLUP PI
   8200 D spcname 10A
   8300 *
   8400 C Return
   8500 *
   8600 PCLUP E
   8700 *
   8800 *--------------------------------------------------------------- *
   8900 * INIT - Initialize the subfile *
   9000 * This procedure is called by the subfile VCT before the page *
   9100 * is actually displayed. *
   9200 * This procedure will intialize, clear then fill the subfile *
   9300 * with all items in the customer table *
   9400 *--------------------------------------------------------------- *
   9500 PINIT B export
   9600 DINIT PI
   9700 D spcl 10
   9800 *
   9900 C Eval rc = initSF(CustList:
   10000 C %Addr(Fmt):
   10100 C %Size(CustRec))
   10200 C Eval rc = clearSF(CustList)
   10300 C CallP BldSfl(salesRep)
   10400 C Return
   10500 *
   10600 PINIT E
   10700 *--------------------------------------------------------------
   10800 * GetCustRec
   10900 *
   11000 * Process the user's request
   11100 *
   11200 * Note: We accept only the first selected value.
   11300 * If no record is selected, the forward parameter is
   11400 * set to indicate which page to display.
   11500 *--------------------------------------------------------------
   -------
   11600 PGetCustRec B export
   11700 D GetCustRec pi
   11800 D userinfo likeDS(CustInfo)
   11900 *
   12000 * Read the selected record from the CUSTLIST subfile
   12100 C Eval rc=readcSF(CustList:
   12200 C %Addr(CustRec):
   12300 C %Size(CustRec):
   12400 C 1)
   12500 *
   12600 * Get the customer record
   12700 C Open CUSWEB
   12800 C KEYFLD KLIST
   12900 C KFLD SflRep
   13000 C KFLD SflCo
   13100 C KFLD SflID
   13200 C KEYFLD Chain CUSWEB
   13300 C Close CUSWEB
   13400 C Eval userinfo = custinfo
   13500 *
   13600 PGetCustRec E
   13700 *
   13800 *----------------------------------------------------------
   13900 * readc
   14000 *
   14100 * Return Customer Number
   14200 *----------------------------------------------------------
   14300 *
   14400 Preadc B export
   14500 D readc pi
   14600 D salesRep Like(ALCHNB)
   14700 D custno Like(ALCANB)
   14800 *
   14900 C OPEN BMBCUSPF
   15000 C EVAL REPNO = salesRep
   15100 C EVAL CANB = custno
   15200 C WRITE BMBCUSAA
   15300 C CLOSE BMBCUSPF
   15400 *
   15500 C EVAL rc=readcSF(CustList:
   15600 C %Addr(CustRec):
   15700 C %Size(CustRec):
   15800 C 1)
   15900 *
   16000 C If rc > 0
   16100 C Eval salesRep = SflID
   16200 C Eval custno = SflRep
   16300 C Endif
   16400 *
   16500 *
   16600 Preadc E
   16700 *
   * * * * E N D O F S O U R C E * * * *
   Regards,
   Hrishikesh.
   On 11 Nov 2004 at 11:13, Hrishikesh wrote:
   > Hi San:
   >
   > I will try to write the readc procedure as you have described. But to
   > begin with, I have added these statements into my readc procedure:
   >
   > Preadc            B                   export      
   > D readc           pi                              
   > D salesRep                            Like(ALCHNB)
   > D custno                              Like(ALCANB)
   >  *                                  
   > C                   OPEN      BMBCUSPF            
   > C                   EVAL      REPNO = salesRep    
   > C                   EVAL      CANB  = custno      
   > C                   WRITE     BMBCUSAA            
   > C                   CLOSE     BMBCUSPF            
   >  *                                  
   >
   > Here, I expect to write the Sales rep number and customer number
   > parameters that are being passed to my ILE program. But every time I
   > run the web application the Output.jsp comes up with an empty subfile
   > and there are no records added to BMBCUSPF. Does this mean that the
   > readc procedure is not being called from the Web application?
   >
   > Regards,
   > Hrishikesh.
   >
   > On 11 Nov 2004 at 10:00, San Su wrote:
   >
   > >
   > >
   > >
   > >
   > > Within your readc procedure, you can populate the subfile. Call the
   > > QdtsClearSF() and QdtsInitSF() to clear and initialize the subfile
   > > first. Then call QdtsAppendSF() to append records to the subfile.
   > > Your web interaction should use the JSP containing the subfile as
   > > the output page. So the way the web app will work is, you will enter
   > > the salesRep on the input page. When you press submit, your readc
   > > procedure will be invoked and populate the subfile. When the readc
   > > procedure returns, the output page will display the subfile.
   > >
   > > >From your original, it appears you have defined some parameters for
   > > >the
   > > subfile in the attributes view. If you use the method described, you
   > > should not need to define those parameters.
   > >
   > > _________________________________________
   > > San Su
   > > IBM Toronto Labs
   > > 8200 Warden Ave, Toronto, ON, L6G, 1C7
   > > Canada
   > > Tel: +1 905 413 3107 / Tie-line: 969 - 3107
   > > Notes ID: San Su/Toronto/Contr/IBM@IBMCA
   > > email: sansu@xxxxxxxxxx
   > >
   > >
   > >
   > >
   > >
   > >
   > >              "Hrishikesh"                                  
   > >              <Hrishikesh@minic                                
   > >              ircuits.com>                                   To Sent
   > >              by:                  Websphere Development Studio
   > >              Client wdsci-l-bounces@m         for iSeries
   > >              <wdsci-l@xxxxxxxxxxxx>  idrange.com                   
   > >              
   > >                          cc
   > >                                  wdsci-l@xxxxxxxxxxxx,             
   > >                                  wdsci-l-bounces@xxxxxxxxxxxx      
   > >                                 
   > >              11/10/2004 04:31                                
   > >              Subject PM                        Re: [WDSCI-L] Passing
   > >              parameters to
   > >                                  Subfile                           
   > >                                 
   > >
   > >              Please respond to                                  
   > >                  Websphere                                  
   > >                 Development                                  
   > >              Studio Client for                                  
   > >                   iSeries                                  
   > >
   > >
   > >
   > >
   > >
   > >
   > > Hi:
   > >
   > > I think I have some issues with the ILE program & the session
   > > variables. I would like to know how this "subfile" concept works in
   > > the Web application. In the web
   > >
   > > interaction, I have specified 'salesRep' as input parameter and
   > > 'custno' as output parameter for the ILE program. Also, I have the
   > > entry point as 'readc'. In the ILE program I have specified these
   > > parameters as follows:
   > >
   > > Preadc            B                   export
   > > D readc           pi
   > > D salesRep                                   Like(ALCHNB)
   > > D custno                                   Like(ALCANB)
   > >  *
   > >
   > > Again: my purpose is to pass the sales rep number to the subfile
   > > program and the subfile should get populated with customers
   > > associated with this sales rep.
   > >
   > > I have been successful in using the web tutorial for displaying a
   > > subfile on the web. But this tutorial example had only output
   > > parameter as customer number. It did not have any input parameters
   > > to deal with. It would be helpful to get another example with input
   > > parameters.
   > >
   > > Hope I am not asking for toooo muchhh. Any help is appreciated!
   > >
   > > Thanks in advance.
   > >
   > > Regards,
   > > Hrishikesh.
   > >
   > >
   > >
   > >
   > > On 10 Nov 2004 at 15:01, San Su wrote:
   > >
   > > >
   > > >
   > > >
   > > >
   > > > You have to save the value of the input field SALESREP into a
   > > > session variable named "salesRep". In the Web interaction wizard,
   > > > when you map the input fields to the input parameters, there
   > > > should be an option for you to save the input field to a session
   > > > variable. For SALESREP, specify that you want to save it to a
   > > > session variable named "salesRep".
   > > >
   > > >
   > > > _________________________________________
   > > > San Su
   > > > IBM Toronto Labs
   > > > 8200 Warden Ave, Toronto, ON, L6G, 1C7
   > > > Canada
   > > > Tel: +1 905 413 3107 / Tie-line: 969 - 3107
   > > > Notes ID: San Su/Toronto/Contr/IBM@IBMCA
   > > > email: sansu@xxxxxxxxxx
   > > >
   > > >
   > > >
   > > >
   > > >
   > > >
   > > >              "Hrishikesh"
   > > >              <Hrishikesh@minic
   > > >              ircuits.com>                                   To
   > > >              Sent by:                  wdsci-l@xxxxxxxxxxxx
   > > >              wdsci-l-bounces@m                                 
   > > >              cc idrange.com
   > > >                                Subject
   > > >                                [WDSCI-L] Passing parameters to
   > > >
   > > >              11/10/2004 01:32          Subfile
   > > >                  PM
   > > >
   > > >
   > > >              Please respond to
   > > >                  Websphere
   > > >                 Development
   > > >              Studio Client for
   > > >                   iSeries
   > > >
   > > >
   > > >
   > > >
   > > >
   > > >
   > > >    Hi All:
   > > >    I am trying to do the following:
   > > >    As Input from my PriceInquiryInput.jsp, I want to pass SALESREP
   > > >    as a parameter to my ILE Service program (that has the subfile
   > > >    logic) and the Output.jsp should display the customer list for
   > > >    that Sales Rep. I am getting the following error: [11/10/04
   > > >    13:02:24:969 EST] 5f45ee8a SystemOut     O 305586:2:24.969 0
   > > > >**
   > > >    Subfile Error ** : the value for parameter name, [salesRep]
   > > >    cannot be found in the associated session variable, [salesRep].
   > > >    check the name of the session variable name defined in
   > > >    'Parameters' page of Subfile Table and the corresponding
   > > >    session variable name of the input field defined Web
   > > >    Interaction Wizard. Any advise is welcome. Regards,
   > > >    Hrishikesh.Regards, Hrishikesh Kotwal Senior Systems Analyst
   > > >    Mini-Circuits Phone - (718) 934 4500 x 5308
   > > > _______________________________________________
   > > > This is the Websphere Development Studio Client for iSeries
   > > > (WDSCI-L) mailing list To post a message email:
   > > > WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list
   > > > options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
   > > > or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take
   > > > a moment to review the archives at
   > > > http://archive.midrange.com/wdsci-l.
   > > >
   > > >
   > > > _______________________________________________
   > > > This is the Websphere Development Studio Client for iSeries
   > > > (WDSCI-L) mailing list To post a message email:
   > > > WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list
   > > > options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
   > > > or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take
   > > > a moment to review the archives at
   > > > http://archive.midrange.com/wdsci-l.
   > >
   > > Regards,
   > >
   > > Hrishikesh Kotwal
   > > Senior Systems Analyst
   > > Mini-Circuits
   > > Phone - (718) 934 4500 x 5308
   > >
   > > _______________________________________________
   > > This is the Websphere Development Studio Client for iSeries
   > > (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx
   > > To subscribe, unsubscribe, or change list options, visit:
   > > http://lists.midrange.com/mailman/listinfo/wdsci-l or email:
   > > WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a moment to
   > > review the archives at http://archive.midrange.com/wdsci-l.
   > >
   > >
   > > _______________________________________________
   > > This is the Websphere Development Studio Client for iSeries
   > > (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx
   > > To subscribe, unsubscribe, or change list options, visit:
   > > http://lists.midrange.com/mailman/listinfo/wdsci-l or email:
   > > WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a moment to
   > > review the archives at http://archive.midrange.com/wdsci-l.
   >
   > Regards,
   >
   > Hrishikesh Kotwal
   > Senior Systems Analyst
   > Mini-Circuits
   > Phone - (718) 934 4500 x 5308
   >
   > _______________________________________________
   > This is the Websphere Development Studio Client for iSeries  (WDSCI-L)
   > mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To
   > subscribe, unsubscribe, or change list options, visit:
   > http://lists.midrange.com/mailman/listinfo/wdsci-l or email:
   > WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a moment to
   > review the archives at http://archive.midrange.com/wdsci-l.
   Regards,
   Hrishikesh Kotwal
   Senior Systems Analyst
   Mini-Circuits
   Phone - (718) 934 4500 x 5308

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.