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



During Plex Gen and Build. I will try compiling from Green Screen then, and pass this on to the rest of the team.

Thanks
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Charles Wilt <charles.wilt@xxxxxxxxx> wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: Charles Wilt <charles.wilt@xxxxxxxxx>
Date: 08/28/2014 03:55PM
Subject: Re: Strange behavior for SQL precompiler

Plex changed...or Aldon did (I forget which at this point)

Are you getting this during the Plex Gen & Build or during the Aldon
compile/promote?

I don't recall the details, but I think the Plex Gen & Build would fail,
but a compile from Aldon would work.

Charles


On Thu, Aug 28, 2014 at 2:43 PM, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:

I am having trouble with code generated by the SQL precompiler. It has to
be something I am doing because this used to work, and as far as I know,
nothing has changed for a very long time. we are at V5R4. Here is the
relavant portion of the compile listing:

7498 D SQL_00019 139 140A
F1300I
7499 D SQL_00020 141 148D DATFMT(*ISO)
CURRENTBYDATE
======> aaaaaaaaaaaaaaa
*RNF0525 20 a 014722 The length must be 10 for date format *ISO-.

Note that this was defined as type D with DATFMT(*ISO), but with only 8
characters. This was generated by the SQL precompiler. the host variable
CURRENTBYDATE is defined like so:

66 d currentByDate...
67 d s d

Here is the cross-reference listing for CURRENTBYDATE

CURRENTBYDATE D(10*ISO-) 67D 15278M 15333

Here is the fetch that generated all this:

15264 C*EXEC SQL
15265 C* FETCH FROM C1 INTO :F13004 ,:F13001 ,:F1300I
15266 C* ,:currentByDate ,:currentStartTime ,:currentByTime
15267 C* ,:F1300B ,:F13003 ,:F13005 ,:F1300A ,:F13009
15268 C* ,:F1300G ,:F13002 ,:F1300M ,:F1300L ,:F1300K
15269 C*END-EXEC

Here is line 15278:

15278 C EVAL CURRENTBYDATE = SQL_00020
SQL 04

Here is line 15333:

15332 C eval F1300C
04
15333 C =
%dec(%char(currentByDate:*ISO0):8:0) 04

The SQL Options are set using:

15065 C*exec SQL
15066 C* set option
15067 C* datfmt = *ISO
15068 C*end-exec

This is the first EXEC SQL in the program, I checked that.
This has to be a configuration issue or something like that (I Believe)
because nothing that I know of has changed for a very long time, and this
used to compile properly. Does anypone have any ideas on what might coerce
the pre-compiler (RPG 4 SQL precompiler) to define this date field
properly? Charles, this is one of those Plex SQL programs.


Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.