· 7 years ago · Feb 13, 2019, 08:32 PM
1*****************************************************************************************
2* Program....: CLSRAOUT.PRG
3* Date.......: 03/30/07 Roger L. Nettler TR 1016323
4* Abstract...: Return Auth Outbound
5*****************************************************************************************
6#Include SYSTEM.h
7
8DEFINE CLASS BPoReturnOutBound AS BaseBusiness
9 NAME = "BPoReturnOutBound"
10
11 lErrorState = .F.
12 oFrmOutput = NULL && Object handle for print dialog form
13 cCaption = ""
14 lOnlyUnProcessed = .F. && All or unProcessed
15 lFlagProcessed = .F.&& Set flag
16 nOutHandle = 0
17 cTempKeysTable = "#GetName"
18 cOutboundDir = ""
19 cOutputFile = ""
20 nCount = 0
21 cJobID = "ZZNRAOUT"
22
23 *--- TR 1025036 20-JUN-2007 HNISAR
24 lCSVHeaderRow = true
25 *=== TR 1025036 20-JUN-2007 HNISAR
26
27***********************************************************************************
28 PROCEDURE ProcessRAOut
29 LPARAMETERS pcSQLFilterString, tlOnlyUnProcessed, tlFlagProcessed
30
31 LOCAL llRetVal, lcProcessType, lcSyslockTablePath, lcSQLString, ldDate, ;
32 lcGroupType, lnGroupCode, lcGroupCode, lcGroupFld, lcOutboundDir, lcOutFile
33
34 * path to SysLock directory on server (same place as Login.DBF)
35 WITH This
36 .oLog.OpenLog(.cJobID, I(.cJobID), .lScheduled)
37 .oLog.LogProgram("clsraout.prg")
38 .oLog.LogEntry("Filter Criteria: " + pcSQLFilterString)
39 .oLog.LogEntry("Only UnProcessed: " + IIF(tlOnlyUnProcessed, "Yes", "No"))
40 .oLog.LogEntry("Flag Processed: " + IIF(tlFlagProcessed, "Yes", "No"))
41 * Update Filter String if Filtering on Prod Order Div/Season
42
43 .lOnlyUnProcessed = tlOnlyUnProcessed && All or unProcessed
44 .lFlagProcessed = tlFlagProcessed && Set flag
45
46 lcProcessType = "RAOUTBOUND"
47 lcSyslockTablePath = AddBS(goEnv.envLoginTablePath.VALUE)
48 IF !v_SysLock(lcSyslockTablePath + "SYSLOCK", lcProcessType, goEnv.cCompany)
49 This.oLog.LogEntry("Process Locked")
50 This.lProcessLocked = .T.
51 RETURN .F.
52 ENDIF
53
54 lcOutboundDir = goEnv.sv("cFIntOut","")
55
56 IF EMPTY(lcOutboundDir)
57 .oLog.LogEntry("Environmental variable [cFIntOut - Outbound Directory] NOT defined correctly")
58 .cMessage = "Environmental variable [cFIntOut - Outbound Directory] NOT defined correctly"
59 RETURN .F.
60 ELSE
61 .oLog.LogEntry("Outbound directory: " + lcOutboundDir)
62 ENDIF
63 .cOutboundDir = lcOutboundDir
64 * -------------------------------------------------------------------------------
65 pcSQLFilterString = IIF(EMPTY(pcSQLFilterString), "1 = 1", pcSQLFilterString)
66
67 IF v_SQLPrep("SELECT tbl_name, field_name FROM zzyobrvd WHERE map_code = 'RETURN OUTBOUND'", "tcRAMap")
68
69 .CreateFormProgressBar(This.lScheduled)
70 .InitThermo(3)
71 *.AdvanceThermoTotal(1)
72 .AdvanceThermo(0)
73 .UpdateThermoCaption("Selecting records to process...")
74 .UpdateThermoTotalCaption("")
75 INKEY(.1, "H") && need some delay for activex object create 1st time
76
77
78 lcTarget = SUBSTR(GetUniqueFileName(), 1, 7)
79 .oLog.LogEntry("Building initial SQL String.")
80 IF !This.GetSQLSelect("tcRAMap", lcTarget, pcSQLFilterString)
81 .lErrorState = .T.
82 .oLog.LogEntry("Returning False: Unable to execute SQL")
83 .cMessage = MSG_FILTER_ERROR + CRLF + MSG_TRY_AGAIN_NOW
84 ELSE
85 .oLog.LogEntry("")
86 SELECT (lcTarget)
87 .lNoDataFound = RECCOUNT() = 0
88 IF .lNoDataFound
89 *--- TechRec 1036102 10-Feb-2009 MPerel --- eliminate warning msg 'ZZNRAOUT failed' if no records exported.
90 *.cMessage = "No records found."
91 .cMessage = "No records exported. Process completed successfully."
92 .oLog.LogEntry("Records processed: 0")
93 *=== TechRec 1036102 10-Feb-2009 MPerel ===
94 ELSE
95 llRetVal = .GenOutputFile(lcTarget) AND FILE(.cOutputFile)
96 IF llRetVal
97 .cMessage = ALLTRIM(STR(This.nCount)) + " records exported to: " + .cOutputFile + CRLF + CRLF + ;
98 "Process completed successfully."
99
100 .oLog.LogEntry("Records processed: " + ALLTRIM(STR(This.nCount)))
101 IF .lFlagProcessed
102 IF v_SQLExec("UPDATE zznretnd SET trans_flag = 'Y' WHERE pkey IN (SELECT pkey FROM " + This.cTempKeysTable + ")")
103 lcMsg = "Trans Flag Updated Successfully"
104 ELSE
105 lcMsg = "Unable to update Trans Flag"
106 ENDIF
107 .oLog.LogEntry(lcMsg)
108 *v_SQLExec("DROP TABLE " + This.cTempKeysTable) && TechRec 1036102 10-Feb-2009 MPerel
109 ENDIF
110 ENDIF
111 ENDIF
112 ENDIF
113 llRetVal = v_SQLExec("DROP TABLE " + This.cTempKeysTable) && TechRec 1036102 10-Feb-2009 MPerel - the table always exists in any way to process records zero or not.
114 ELSE
115 .oLog.LogEntry("No Map Definition found.")
116 .cMessage = "Map definition not found for this Process."
117 ENDIF
118
119 .m_Close()
120
121 v_SysUnLock( lcSyslockTablePath + "SYSLOCK", lcProcessType, goEnv.cCompany)
122
123 .oLog.LogResult(llRetVal)
124 .oLog.CloseLog()
125
126 ENDWITH
127
128 RETURN llRetVal
129
130 ENDPROC
131********************************************************
132 PROCEDURE GetSQLSelect
133 LPARAMETERS tcMapDef, tcTarget, tcSQLFilter, tcGroupFld
134
135 *--- TechRec 1024374 18-May-2007 kpattabiraman added lcSzQtyFilter---
136 LOCAL llRetVal, lnSelect, lcSizes, lcField, lcFieldList, lcAlias, lcSQL, lnX, lcX, lcFlagWhere, ;
137 lcSzQtyFlds, lcSzDscFlds, lcExpr, lcCurExp, lcSzQtyFilter
138
139 * Gather list of fields to select
140 lnSelect = SELECT()
141 lcFieldList = ""
142
143 SELECT (tcMapDef)
144 SCAN
145 lcAlias = LOWER(ALLTRIM(tbl_name))
146 lcField = LOWER(ALLTRIM(field_name))
147
148 DO CASE
149 CASE lcAlias = "zznretnh"
150 lcAlias = 'h'
151
152 CASE lcAlias = "zznretnd"
153 lcAlias = 'd'
154
155 CASE lcAlias = "zzyobrrf"
156 LOOP
157
158 ENDCASE
159 lcField = lcAlias + "." + lcField
160 IF "," + lcField + "," $ "," + lcFieldList + ","
161 LOOP
162 ENDIF
163 lcFieldList = lcFieldList + lcField + ","
164 ENDSCAN
165 lcSzQtyFlds = ""
166 lcSzDscFlds = ""
167
168 lcExpr = "when b.SZnn = 1 then zz.SIZEnn"
169 FOR lnX = 1 TO goEnv.MaxBuckets
170 lcX = PADL(lnX, 2, "0")
171 lcCurExp = STRTRAN(lcExpr, "nn", lcX) + "_Qty "
172 lcCurExp = STRTRAN(lcCurExp, "zz", "d")
173 lcSzQtyFlds = lcSzQtyFlds + lcCurExp + CRLF
174 lcCurExp = STRTRAN(lcExpr, "nn", lcX) + " "
175 lcCurExp = STRTRAN(lcCurExp, "zz", "sz")
176 lcSzDscFlds = lcSzDscFlds + lcCurExp + " " + CRLF
177 ENDFOR
178
179 *--- TechRec 1024374 18-May-2007 kpattabiraman ---
180 lcSzQtyFilter = "CASE " + lcSzQtyFlds + " END > 0 "
181 *=== TechRec 1024374 18-May-2007 kpattabiraman ===
182
183 lcSzQtyFlds = "CASE " + lcSzQtyFlds + " END AS size_qty, "
184 lcSzDscFlds = "CASE " + lcSzDscFlds + " END AS size_desc, "
185 lcFlagWhere = IIF(This.lOnlyUnProcessed, "trans_flag <> 'Y' AND ", "")
186
187 This.cTempKeysTable = "#" + GetUniqueFileName()
188 * --- TR 1028146 11/8/07 CM --- Modified left outer join to query zveupcnr, added shared upc logic
189 lcSQL = "SELECT d.pkey INTO " + This.cTempKeysTable + " " + ;
190 "FROM zznretnh h JOIN zznretnd d ON h.pkey = d.fkey " + ;
191 "JOIN zzxstylr st ON h.division = st.division AND d.style = st.style " + ;
192 "JOIN zzxsizer sz ON st.division = sz.division AND st.size_code = sz.size_code " + ;
193 "CROSS JOIN zzxbuckt b " + ;
194 "LEFT OUTER JOIN zveupcnr u ON d.division = u.division AND " + ;
195 " d.style = u.style AND d.color_code = u.color_code AND " + ;
196 " d.lbl_code = u.lbl_code AND d.dimension = u.dimension AND " + ;
197 " b.size_num = u.sizebucket " + ;
198 "WHERE " + lcFlagWhere + " doc_type = 'RA' AND d.stage_num = 1 " + IIF(EMPTY(tcSQLFilter), "", " AND " + tcSQLFilter)
199
200 llRetVal = v_SQLExec(lcSQL)
201
202 IF llRetVal
203 * --- TR 1028146 11/8/07 CM --- Modified left outer join to query zveupcnr, added shared upc logic
204 *--- TechRec 1024374 18-May-2007 kpattabiraman added lcSzQtyFilter filter---
205 lcSQL = "SELECT LTRIM(u.upc_num) + u.chk_digit AS upc_num, " + lcFieldList + lcSzQtyFlds + lcSzDscFlds + ;
206 "b.size_num AS sizebucket, d.pkey " + ;
207 "FROM zznretnh h JOIN zznretnd d ON h.pkey = d.fkey " + ;
208 "JOIN zzxstylr st ON h.division = st.division AND d.style = st.style " + ;
209 "JOIN zzxsizer sz ON st.division = sz.division AND st.size_code = sz.size_code " + ;
210 "CROSS JOIN zzxbuckt b " + ;
211 "LEFT OUTER JOIN zveupcnr u ON d.division = u.division AND " + ;
212 " d.style = u.style AND d.color_code = u.color_code AND " + ;
213 " d.lbl_code = u.lbl_code AND d.dimension = u.dimension AND " + ;
214 " b.size_num = u.sizebucket " + ;
215 "WHERE d.pkey IN (SELECT pkey FROM " + This.cTempKeysTable + ")" + ;
216 " AND " + lcSzQtyFilter + ;
217 "ORDER BY h.retn_num, u.upc_num, u.chk_digit "
218
219
220 llRetVal = v_SQLExec(lcSQL, tcTarget)
221 ENDIF
222
223 SELECT (lnSelect)
224
225 RETURN llRetVal
226 ENDPROC
227****************************************************
228 PROCEDURE GenOutputFile
229 LPARAMETERS tcSource
230
231 LOCAL lcSQL, lnProdNum, lcFieldName, lnWidth, lcLine, lcExp, lcValue, lcFormat, lcTagFile,lnHandle, llRetVal, lcZero
232
233 *--- TR 1027199 16-OCT-2007 HNISAR Added lcDelimiter
234 LOCAL lcDelimiter
235
236 *--- TechRec 1048163 08-Jul-2010 TShenbagavalli ---
237 LOCAL lcMapCode, lcVersCode, lcVersionStr
238 lcMapCode = "RETURN OUTBOUND"
239 lcVersCode = ""
240 *=== TechRec 1048163 08-Jul-2010 TShenbagavalli ===
241
242 This.InitProgressBarTotal(RECCOUNT(tcSource), "Generating Output File...")
243
244 *--- TechRec 1024374 18-May-2007 kpattabiraman added file_hdr---
245 *--- TR 1024374 21-May-2007 Partha added file_type ---
246
247 *--- TR 1024677 01-JUN-2007 HNISAR For Problem Columns getting Duplicated in more than one version is available.
248 * The problem will remain if there is no default version .
249
250*!* lcSQL = "SELECT h.textfile, h.file_hdr, h.file_type, d.* FROM zzyobrvh h JOIN zzyobrvd d " + ;
251*!* "ON h.pkey = d.fkey WHERE h.map_code = 'RETURN OUTBOUND' " + ;
252*!* "ORDER BY output_pos"
253
254 *--- TechRec 1048163 08-Jul-2010 TShenbagavalli ---
255 llRetVal = .RetrieveVersionCode(lcMapCode, @lcVersCode )
256
257 IF !llRetVal
258 RETURN llRetVal
259 ELSE
260 IF !EMPTY(lcVersCode )
261 lcVersionStr = " AND h.vers_code = " + SQLFormatChar(lcVersCode )
262 ELSE
263 lcVersionStr = ""
264 ENDIF
265 ENDIF
266 *=== TechRec 1048163 08-Jul-2010 TShenbagavalli ===
267
268 *--- TR 1025036 20-JUN-2007 HNISAR Added h.appnd_over
269 *--- TR 1027199 17-OCT-2007 HNISAR && Added h.separator
270 lcSQL = "SELECT h.textfile, h.file_hdr, h.file_type,h.appnd_over,h.separator , d.* " + ;
271 " FROM zzyobrvh h JOIN zzyobrvd d " + ;
272 " ON h.pkey = d.fkey " + ;
273 IIF( EMPTY(lcVersCode), " JOIN zzyobrmp p on h.map_code = p.map_code AND h.vers_code = p.def_vers ", "") + ;
274 " WHERE h.map_code = 'RETURN OUTBOUND' " + ;
275 lcVersionStr + ;
276 " ORDER BY output_pos"
277 *=== TR 1025036 20-JUN-2007 HNISAR
278
279 *=== TR 1024677 01-JUN-2007 HNISAR
280
281 llRetVal = v_SQLExec(lcSQL, "tcMapHdr")
282
283 *--- TR 1024677 01-JUN-2007 HNISAR
284 IF NOT Reccount('tcMapHdr') > 0 Then
285 This.oLog.LogEntry("No Default Version Specified in Map Tables")
286 This.cMessage = "No Default Version Specified in Map Tables"
287 llRetVal = False
288 RETURN llRetVal
289 ENDIF
290 *=== TR 1024677 01-JUN-2007 HNISAR
291
292 *--- TR 1027199 17-OCT-2007 HNISAR
293 lcDelimiter = IIF(EMPTY(tcMapHdr.Separator),",",tcMapHdr.Separator)
294 *=== TR 1027199 17-OCT-2007 HNISAR
295
296 IF llRetVal
297
298 SELECT (tcSource)
299
300 *--- TR 1025036 20-JUN-2007 HNISAR
301*!* IF !This.GenerateFlatFile(ALLTRIM(tcMapHdr.textfile))
302 .lCSVHeaderRow = tcMapHdr.file_hdr = "Y"
303 IF !This.GenerateFlatFile(ALLTRIM(tcMapHdr.textfile),tcMapHdr.appnd_over )
304 *=== TR 1025036 20-JUN-2007 HNISAR
305
306 This.lErrorState = .T.
307 RETURN .F.
308 ENDIF
309
310 *--- TechRec 1024374 18-May-2007 kpattabiraman ---
311
312 *--- TR 1024374 21-May-2007 Partha - comma delimited list of field names when output type is CSV ---
313*!* IF tcMapHdr.file_hdr = "Y"
314*!* llRetVal = llRetVal AND (FPUTS(This.nOutHandle, "") > 0)
315*!* ENDIF
316
317 *--- TR 1025036 20-JUN-2007 HNISAR
318*!* IF tcMapHdr.file_hdr = "Y" AND tcMapHdr.file_type = "CSV"
319 IF tcMapHdr.file_hdr = "Y" AND tcMapHdr.file_type = "CSV" AND .lCSVHeaderRow
320 *=== TR 1025036 20-JUN-2007 HNISAR
321
322 LOCAL lcFieldNameString
323
324 lcFieldNameString = ""
325
326 SELECT tcMapHdr
327 SCAN
328 *--- TR 1027199 17-OCT-2007 HNISAR
329*!* lcFieldNameString = lcFieldNameString ;
330*!* + IIF(EMPTY(lcFieldNameString),"",",") ;
331*!* + LOWER(ALLTRIM(field_name))
332 lcFieldNameString = lcFieldNameString ;
333 + IIF(EMPTY(lcFieldNameString),"",lcDelimiter) ;
334 + LOWER(ALLTRIM(field_name))
335 *=== TR 1027199 17-OCT-2007 HNISAR
336
337 ENDSCAN
338 GO TOP
339 llRetVal = llRetVal AND (FPUTS(This.nOutHandle, lcFieldNameString ) > 0)
340
341 SELECT (tcSource)
342
343 ENDIF
344
345 *=== TR 1024374 21-May-2007 Partha ===
346
347 *=== TechRec 1024374 18-May-2007 kpattabiraman ===
348
349 SCAN
350 IF !llRetVal
351 EXIT
352 ENDIF
353 .AdvanceThermoTotal(1)
354 IF EMPTY(size_desc) OR EMPTY(size_qty)
355 LOOP
356 ENDIF
357 SELECT tcMapHdr
358 lcLine = ""
359 SCAN
360 lcFieldName = LOWER(ALLTRIM(field_name))
361 lnWidth = output_len
362 lcFormat = ALLTRIM(output_fmt)
363 lcZero = ALLTRIM(zerofill)
364 lcDefault = ALLTRIM(output_def)
365 IF !EMPTY(lcDefault)
366 lcValue = lcDefault
367 ELSE
368 SELECT (tcSource)
369 lcValue = ""
370 IF TYPE(lcFieldName) $ "DT" AND EVALUATE(lcFieldName) < {01/01/1990}
371 lcFormat = ""
372 ELSE
373 IF TYPE(lcFieldName) <> "U"
374 lcExp = ConvertFieldNameToString(lcFieldName)
375 lcValue = EVALUATE(lcExp)
376 ENDIF
377 lcValue = NVL(ALLTRIM(lcValue), "")
378 ENDIF
379 IF lcFieldName = 'line_status'
380 lcValue = IIF(!EMPTY(lcValue), 'C', 'A')
381 ENDIF
382 ENDIF
383 IF !EMPTY(lcFormat) OR !EMPTY(lcZero)
384 lcValue = This.FormatField(lcValue, lcFormat, lcZero, lnWidth)
385 ENDIF
386 lcValue = PADR(lcValue, lnWidth)
387
388 *--- TechRec 1024374 18-May-2007 kpattabiraman trimed the lcValue---
389 *--- TR 1027199 16-OCT-2007 HNISAR
390*!* lcLine = lcLine + "," + ALLTRIM(lcValue)
391 lcLine = lcLine + lcDelimiter + ALLTRIM(lcValue)
392 *=== TR 1027199 16-OCT-2007 HNISAR
393 ENDSCAN
394 lcLine = SUBSTR(lcLine, 2) && remove leading comma
395
396 llRetVal = llRetVal AND (FPUTS(This.nOutHandle, lcLine) > 0)
397 This.nCount = This.nCount + 1
398 ENDSCAN
399
400 FCLOSE(This.nOutHandle)
401
402 ELSE
403 This.oLog.LogEntry("Unable to access Map Tables")
404 This.cMessage = "Unable to access Map Tables"
405 ENDIF
406
407 RETURN llRetVal
408 ENDPROC
409*************************************************************************
410 PROCEDURE FormatField
411 LPARAMETERS tcValue, tcFormat, lcZero, lnWidth
412
413 LOCAL lcRetVal, ltDate, ldDate, lnYear, lnMonth, lnDay
414
415 lcRetVal = tcValue
416 DO CASE
417 * --- TR 1011225 RLN 05/27/05 - Implement if client requests
418* CASE !EMPTY(lcZero) AND lcZero = 'Y' AND (EMPTY(tcValue) OR EMPTY(CHRTRAN(tcValue, "0", ""))
419* lcRetVal = REPLICATE("0", lnWidth)
420
421 CASE tcFormat = 'CCYYMMDD'
422 * Convert back to Time/Date to get correct century
423 ltDate = CTOT(tcValue)
424 ldDate = TTOD(ltDate)
425 lnYear = YEAR(ldDate)
426 lnMonth = MONTH(ldDate)
427 lnDay = DAY(ldDate)
428 lcRetVal = PADR(lnYear, 4) + PADL(lnMonth, 2, "0") + PADL(lnDay, 2, "0")
429 * --- TR 1011225 RLN 05/27/05
430 CASE tcFormat = "PADL0"
431 lcRetVal = PADL(tcValue, lnWidth, '0')
432
433 ENDCASE
434
435 RETURN lcRetVal
436 ENDPROC
437******************************************************************
438 PROCEDURE GenerateFlatFile
439 LPARAMETERS tcOutput , tcAppend_over
440 *--- TR 1025036 20-JUN-2007 HNISAR Added tcAppend_over
441
442 LOCAL ldDate, lcOutFile, lcPathFile
443
444 *--- TR 1025036 20-JUN-2007 HNISAR
445 LOCAL llAppendToTextFile
446 llAppendToTextFile = tcAppend_over = 'A'
447 *=== TR 1025036 20-JUN-2007 HNISAR
448
449 WITH This
450 ldDate = DATETIME()
451 lcOutFile = tcOutput
452 lcPathFile = ADDBS(.cOutboundDir) + lcOutfile
453
454 .oLog.LogEntry("Outbound Filename: " + lcOutFile)
455 .cOutputFile = lcPathFile
456
457 *--- TR 1025036 20-JUN-2007 HNISAR
458*!* .nOutHandle = FCREATE(lcPathFile)
459
460 IF NOT (FILE(lcPathFile) AND llAppendToTextFile )
461 .nOutHandle = FCREATE(lcPathFile)
462 ELSE
463 .nOutHandle = FOPEN(lcPathFile, 1)
464 .lCSVHeaderRow = .lCSVHeaderRow AND NOT (FSEEK(This.nOutHandle,0,2) > 0)
465 ENDIF
466 *=== TR 1025036 20-JUN-2007 HNISAR
467
468 IF .nOutHandle < 1
469 .oLog.LogEntry("Unable to create Output File: " + lcPathFile)
470 This.cMessage = "Unable to create Output file " + lcPathFile
471 ELSE
472 .oLog.LogEntry("File Handle for output file: " + lcPathFile + " created.")
473 ENDIF
474 ENDWITH
475
476 RETURN This.nOutHandle > 0
477 ENDPROC
478*********************************************************
479
480 PROCEDURE m_Close
481 This.oLog.LogEntry("Closing Work Tables")
482 This.TableClose('Vzzcordrh_work')
483 This.TableClose('zzxprtkh_Work')
484 This.TableClose('zzxprtkd_Work')
485
486 DODEFAULT()
487 ENDPROC
488*********************************************************
489*--- TechRec 1048163 08-Jul-2010 TShenbagavalli ---
490 Procedure RetrieveVersionCode
491 LPARAMETERS pcMapCode, pcVersionCode
492 LOCAL llRetval, lnSelect, lnVersIndex
493
494 llRetval = .T.
495 lnSelect = Select()
496
497 With This
498
499 .oLog.LogEntry('Starting: Retrieving selected version ' )
500
501 .InitThermo(1)
502 .UpdateThermoCaption('Retrieving selected version(s)...')
503
504 lnVersIndex = ASCAN(.aParamBROs,"VERS_CODE",1,ALEN(.aParamBROs,1),1,9)
505
506 IF lnVersIndex > 0
507 pcVersionCode = ALLTRIM(.aParamBROs[lnVersIndex, 2])
508
509 llRetval = vl_map_version(pcMapCode,,,pcVersionCode )
510 .oLog.LogEntry(" Map version : " + pcVersionCode )
511
512 IF NOT llRetval
513 .cMessage = "Invalid Version Code"
514 .oLog.LogWarning("Invalid Version Code.")
515 ENDIF
516 ELSE
517 pcVersionCode = ""
518 ENDIF
519
520 .AdvanceThermo(1)
521
522 Endwith
523
524 Select (lnSelect)
525
526 Return llRetval
527 ENDPROC
528*===============================================================================
529*=== TechRec 1048163 08-Jul-2010 TShenbagavalli ===
530
531ENDDEFINE