× 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.


  • Subject: Fwd: Use of DTW_EDIT_CODES
  • From: Mark Bauman <mlbauman@xxxxxxxxxxxx>
  • Date: Mon, 11 May 1998 16:24:27 -0500 (CDT)


 From: George Silber on 05/08/98 02:32 PM 


   To implicitly pass a variable to an LE,  DTW_SQL in this case,  it 
 must be listed in the ENVIRONMENT statement for that LE in your INI 
 file.  You apparently have one, because the default INI file that is
used does 
 include DTW_EDIT_CODES, along with all the others.  Here is an ENVIRONMENT 
 statement that includes all the variables that DTW_SQL LE on the AS/400 
 looks for on each call: 

 (Note that there is a restriction that the entire statement be on a single 
 line in the INI file. For readability, my example will span multiple lines.) 

 ENVIRONMENT(DTW_SQL) /QSYS.LIB/QTCP.LIB/QTMHSQL.SRVPGM (IN DATABASE, 
 LOGIN,PASSWORD,TRANSACTION_SCOPE,SHOWSQL,DB_CASE,DTW_SET_TOTAL_ROWS, 
 START_ROW_NUM,RPT_MAX_ROWS,NULL_RPT_FIELD,DTW_EDIT_CODES, 
 OUT DTWTABLE,SQL_CODE,SQL_STATE,TOTAL_ROWS) 


  One user did complain about having to set the DTW_EDIT_CODES prior to
each DTW_SQL function that produced a report, because it was used every
time.  The solution here was quite simple.  Do not list it on the
ENVIRONMENT statement in the INI file.  This way it is not implicitly
passed and defaults are assumed.  Now you need to merely set the value
of DTW_EDIT_CODES and explicitly pass it as an IN parameter to only the
DTW_SQL functions that you wish to apply edit codes to. 


 EXAMPLE: ( With DTW_EDIT_CODES not on the ENVIRONMENT statement in the INI 
 file.) 

 %{ Note that edit codes are used to build edit masks for columns in the
report. 
    They are valid only for PACKED, ZONED and BINARY data types.  Therefore, a 
    blank or a '*' (or any other character) is treated the same for
columns that 
    are not of those types.  They are ignored.  %} 

 %define DTW_EDIT_CODES = "JJJ****1    Y"" 


 %{ Note too that DTW_SQL LE looks for DTW_EDIT_CODES by name, so do not
pass it 
 as 'editCodes' for instance %} 

 %FUNCTOIN(DTW_SQL) report1(IN DTW_EDIT_CODES){ 
 select * from some.file 
 %} 

 %FUNCTOIN(DTW_SQL) report2(){ 
 select * from some.file 
 %} 

 %FUNCTOIN(DTW_SQL) report3(IN DTW_EDIT_CODES){ 
 select * from someOther.file 
 %} 

 %HTML(reports){ 
 <center> 
 <H1>Report Number 1</H1><br> 
 @report1(DTW_EDIT_CODES) 
 <p> 
 <hr> 
 <H1>Report Number 2</H1><br> 
 @report2() 
 <p> 
 <hr> 
 <H1>Report Number 3</H1><br> 
 @report1("*****JPY*****8") 
 <p> 
 <hr> 
 <H1>Report Number 1 again</H1><br> 
 @DTW_ASSIGN(DTW_EDIT_CODES,"JPJ****J****8") 
 @report1(DTW_EDIT_CODES) 
 <p> 
 <hr> 
 </center> 
 %} 



  From: Barry Wright <Barry.Wright@tasb.org> 


  I have been playing around with Net.Data. Since getting back from COMMON 
  in New Orleans, I have able to put together some macros and really get 
  some neat results.  I really think that it has value in my organization. 


  However, there are some things that I have not been able to figure out. 
  One is how to use the DTW_EDIT_CODES variable.  I am trying to put 
  commas in a numeric field using the "1" or "J" edit codes and no matter 
  where I put the DTW_ASSIGN or the DEFINE statements, I cannot get it to 
  edit the fields.  Can anyone give me a hint?  I can send a copy of my 
  macro if it would help. 

  Thanks, 
  Barry Wright 


 Regards, 
 George Silber    
 Internet Technologies,  IBM Rochester, MN. 




+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.