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



   Do you have the OVERLAY keyword in effect for the display you are= writing
   over.
   myRecord should have the OVERLAY keyword in effec= t.

   WRITE msgctl;
   EXFMT myRecord;
   </= DIV>

   Thanks,

   Mark

   Mark D. Walter
   Senior Progra= mmer/Analyst
   CCX, Inc.
   mwalter@xxxxxxxxxx
   http://www.ccxinc.com
   -----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----

   <blockquote = style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT:
   5px; BORDER-LE= FT: #000000 2px solid; MARGIN-RIGHT: 0px">To:
   <rpg400-l@xxxxxxxxxxxx>   From: "Ala, Michael A" <michael.ala@xxxxxx>
   Sent by: rpg400-l-= bounces@xxxxxxxxxxxx
   Date: 02/15/2005 11:08AM
   Subject: Re: Message Su= bfile

   Thanks for the Info on the API
   Here is what I have changed the d specs to
   D*------------------= ------

   D* Message Subfile Parms *

   D*------------------------<= BR>
   D   msgId         s       &n= bsp;      7A   INZ('CPF9898')

   D   msgLoc &n= bsp;      s             20A &n= bsp; inz('QCPFMSG   *LIBL
     ')

   D   msgRplDta &= nbsp;   s           3000A

   D   msg= RplDtaLen  s             10i 0 inz(0)<BR= >
   D   msgType       s         &n= bsp;   10A   inz('*DIAG')

   D   msgQueue     =  s            276A   inz('*')
   <B= R>D   msgCallStack  s             1= 0i 0 inz(0)

   D   msgKey        s   &nbs= p;          4A   inz(' ')

   D   msg= Err        ds

   D    msge1    =    s             10i 0 inz(0)
   <= BR>D    msge2        s       &= nbsp;     10i 0 inz

   D   msgrmv       &= nbsp;s             10A   inz('*ALL')
      D*---------------------------------------------

   Here are my = calcs - Eval Statements are her to force those values when I
   debuged the= Program
   I saw that some values were being reset from what I initialized= them as
   in the D Specs
   Probably data back from QMHRMVPM

   0615.= 00 C                   If &nbs= p;      ErrFlg= 'Y'

   0616.00 C       =             Eval      msgRplDt= a = 'Business Unit not
   on
   File'           &nb= sp;
   0617.00 C &= nbsp;                 Eval   &= nbsp;  msgRplDtaLen =
   %len(%TRIM(msgRplDta))      =                     &nbs= p;
   0618.00 C               &n= bsp;   Eval      msgID = 'CPF9898'

   0619.00 C &= nbsp;                 Eval  =    msge1 = 0

   0620.00 C     &nb= sp;             eval      msgK= ey = *blanks

   0621.00 C             &= nbsp;     Exsr      sndmsg

   0622.00 C  =                 Iter

   0623.0= 0 C                   ENDIF<BR= >Error Condition
   0624.00 C*     &n= bsp;            -----

   Here is the = call
   0631.00 C* Send message subroutine

   0632.00 C*

   0633.00= C     sndmsg        begsr

   0634.00 C*<= BR>
   0635.00 C                 &n= bsp; call      'QMHSNDPM'

   0636.00 C     &nb= sp;             parm       &nb= sp;            msgId

   0637.00 C   =                 parm     =                msgLoc

   0638.0= 0 C                   parm &nb= sp;                  msgRplDta
   0639.00 C                 &= nbsp; parm                   &   
nbsp;msgRplDtaLen

   0640.00 C           &nbsp= ;       parm             &nbsp= ;      msgType

   0641.00 C         =           parm           =          msgQueue

   0642.00 C     &= nbsp;             parm       &= nbsp;
    msgCallStack

   0643.00 = C                   parm &nbsp= ;                  msgKey
   <= BR>0644.00 C                  = parm                    = msgErr

   0645.00 C*

   0646.00 C         &nbsp= ;         endsr

   0647.00 C*       =            -----

   0648.00 C*-----------= -----------------

   I still do not get the message to display when= the error condition
   exists - What am I missing

   Thanks for your a= ssistance

   -----Original Message-----
   From: rpg400-l-bounces@m= idrange.com
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
   rpg400-l-re= quest@xxxxxxxxxxxx
   Sent: Friday, February 11, 2005 10:27 AM
   To: rpg40= 0-l@xxxxxxxxxxxx
   Subject: RPG400-L Digest, Vol 4, Issue 184

   S= end RPG400-L mailing list submissions to
       rpg400-l@xxxxxxxxxxxx

   To subscrib= e or unsubscribe via the World Wide Web, visit
       http://lists.midrange.com/ma= ilman/listinfo/rpg400-l
   or, via email, send a message with subject o= r body 'help' to
      &n= bsp;rpg400-l-request@xxxxxxxxxxxx

   You can reach the person ma= naging the list at
      =  rpg400-l-owner@xxxxxxxxxxxx

   When replying, please edit = your Subject line so it is more specific than
   "Re: Contents of RPG400-L = digest..."

   Today's Topics:

     1. sqlrpgle & copy = book (SRamanujan@xxxxxxxxxxxxxxxxxx)
     2. Re: Message Subfile &nbsp= ;(Scott Klement)
     3. AW: sqlrpgle & copy book (HauserSSS)
   &= nbsp; 4. RE: sqlrpgle & copy book (Rick.Chevalier@xxxxxxxxxxxxxxx)
   &= nbsp; 5. RE: sqlrpgle & copy book (SRamanujan@xxxxxxxxxxxxxxxxxx)
   &n= bsp; 6. RE: sqlrpgle & copy book (SRamanujan@xxxxxxxxxxxxxxxxxx)
   &nb= sp; 7. RE: sqlrpgle & copy book (rob@xxxxxxxxx)
     8. RE: sqlrpg= le & copy book (SRamanujan@xxxxxxxxxxxxxxxxxx)

   -------------= ---------------------------------------------------------

   message: 1   date: Thu, 10 Feb 2005 16:32:13 -0600
   from: <SRAMANUJAN@SUNGARDFUTUR= ES.COM>
   subject: sqlrpgle & copy book

   Hi all,
   When I have = a copy book that has the data structure, and fetch into the
   ds, I get a = sql pre-compiler error SQL0312 'The DSNAME is not define or
   not usable' = Is there anyway to avoid this? Thanks, Sudha

   Sudha Ramanujan
   SunG= ard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312) 577 6179
   (= 312) 577 6101 - Fax

   ------------------------------

   me= ssage: 2
   date: Thu, 10 Feb 2005 17:48:06 -0600 (CST)
   from: Scott Klem= ent <RPG400-L@xxxxxxxxxxxxxxxx>
   subject: Re: Message Subfile

   <BR= >There are 3 mistakes in your code that jump out at me:

   a) Everywher= e you have a field defined as "4B 0" it's wrong.  Change
   them
   a= ll to "10I 0".  Whenever API documentation says BINARY(4) it's
   refe= rring
   to RPG's "10I 0" data type. (Any time you find yourself coding "4= B 0"
   stop yourself, because it's probably a mistake. This is the #1 <BR= >most
   common question posted to this mailing list!)

   b) Remove the wo= rd "VARYING" from your definition of msgRplDta, since
   the
   API does n= ot allow the varying data type. That also means that you have
   to trim y= our field when you calculate the length.  i.e. change
   %len(msgRplD= ta) to %len(%trimr(msgRplDta))

   c) the error code field "msgErr" need= s to be at least 8 bytes long.
   Yours
   is currently defined as 2 bytes= long.  Make it a data structure
   containing
   two "10I 0" fields,= and set the first one to zero.

   Those are the only bugs that stand o= ut, but I've got another suggestion
   as
   well:

   Please consider = writing a prototype for the API, and using that instead
   of
   CALL/PARM= . That way you can re-use the prototype later and it will
   protect you a= nd other people who use this API from making the same
   mistakes. It also= will make it possible to use the API in free format
   RPG
   if you ever= want to do that.

   That advice applies to all other program calls as = well, not just this
   API.

   Hope that helps

   On Thu, 10 Fe= b 2005, Ala, Michael A wrote:
   >
   > I am trying to Write a Progra= m Message to CPF9898 to display in a
   > message subfile
   >
   &g= t; It Is not Displaying
   >
   > Here are my D specs
   > D &nbsp= ; msgId         s           &n= bsp;  7A   INZ('CPF9898')
   > D   msgLoc     &= nbsp;  s             20A   inz('QCP= FMSG   *LIBL
   ')
   > D   msgRplDta    = s           3000A   Varying
   > D  = msgRplDtaLen  s              4B 0 = inz(0)
   > D   msgType       s      =       10A   inz('*INFO')
   > D   msgQueue &nb= sp;    s            276A   inz= ('*')
   > D   msgCallStack  s         &nb= sp;    4B 0 inz(0)
   > D   msgKey       &= nbsp;s              4A   inz(' ')<B= R>> D   msgErr
          s       &n= bsp;      4B 0 inz(0)
   > D   msgrmv     =    s             10A   inz('*A= LL')
   >
   > call      'QMHSNDPM'
   > parm &nbsp= ;                  msgId
   &g= t; parm                   &nbs= p;msgLoc
   > parm               &nbs= p;    msgRplDta
   > parm           &= nbsp;        msgRplDtaLen
   > parm     &n= bsp;              msgType
   > parm &= nbsp;                  msgQueu= e
   > parm                 &nbs= p;  msgCallStack
   > parm           &nbsp= ;        msgKey
   > parm       &nbsp= ;            msgErr

   --------------= ----------------

   message: 3
   date: Fri, 11 Feb 2005 07:11:22 +0100   from: "HauserSSS" 
<HAUSER@xxxxxxxxxxxxxxx>
   subject: AW: sqlrpgle &am= p; copy book

   Hi Sudha,

   do you use a qualified data struct= ure or is the data structure defined
   in a nested data structure. If so, = you must be on release VR3M0 to get
   it to work.

   Before Release V5= R2M0 you have to define a non qualified data structure.
   If you don't use= nested copy books, the data structure can be defined in
   a copy book.<BR= >
   Birgitta
   -----Ursprungliche Nachricht-----
   Von: rpg400-l-bounces= @midrange.com
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von
   SRaman= ujan@xxxxxxxxxxxxxxxxxx
   Gesendet: Donnerstag, 10. Februar 2005 23:32
   = An: rpg400-l@xxxxxxxxxxxx
   Betreff: sqlrpgle & copy book

   H= i all,
   When I have a copy book that has the data structure, and fetch in= to the
   ds, I get a sql pre-compiler error SQL0312 'The DSNAME is not def= ine or
   not usable' Is there anyway to avoid this? Thanks, Sudha

   S= udha Ramanujan
   SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx<= BR>(312) 577 6179
   (312) 577 6101 - Fax

   --
   This is the RPG prog= ramming on the AS400 / iSeries (RPG400-L) mailing
   list To post a message= email: RPG400-L@xxxxxxxxxxxx To subscribe,
   unsubscribe, or change list = options,
   visit: http://lists.midrange.com/mailman/listinfo/rpg400-= l
   or email: RPG400-L-request@xxxxxxxxxxxx
   Before posting, please = take a moment to review the archives
   at http://archive.midrange.com/rpg400-l.
   ------------------------------

   message: = 4
   date: Fri, 11 Feb 2005 08:08:01 -0600
   from: <RICK.CHEVALIER@AMERICR= EDIT.COM>
   subject: RE: sqlrpgle & copy book

   Also make sur= e the sub fields are defined in your copybook.  I have not
   been abl= e to use externally defined data structures as result sets for
   embedded = SQL.  The compiler always complains they aren't defined or
   usable.<= BR>
   I vaguely remember someone posting to this list that they got embedd= ed
   SQL to work using an externally described DS as the result set but I = may
   be mistaken.  Check the archives, this has been discussed sever= al times
   before.

   Rick

   -----Original Message-----
   From: = rpg400-l-bounces@xxxxxxxxxxxx
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf = Of
   SRamanujan@xxxxxxxxxxxxxxxxxx
   Sent: Thursday, February 10, 2005 4:= 32 PM
   To: rpg400-l@xxxxxxxxxxxx
   Subject: sqlrpgle & copy book
   
   Hi all,
   When I have a copy book that has the data structure, and= fetch into the
   ds, I get a sql pre-compiler error SQL0312 'The DSNAME i= s not define or
   not usable' Is there anyway to avoid this? Thanks, Sudha
   Sudha Ramanujan
   SunGard Futures Systems
   sramanujan@sungardfut= ures.com
   (312) 577 6179
   (312) 577 6101 - Fax

   Privileged an= d Confidential.  This e-mail, and any attachments there to,
   is inte= nded only for use by the addressee(s) named herein and may
   contain legal= ly privileged or confidential information.  If you have
   received th= is e-mail in error, please notify me immediately by a return
   e-mail and = delete this e-mail.  You are hereby notified that any
   dissemination= , distribution or copying of this e-mail and/or any
   attachments thereto,= is strictly prohibited.

   ------------------------------
   <= BR>message: 5
   date: Fri, 11 Feb 2005 09:06:01 -0600
   from: <SRAMANUJAN= @SUNGARDFUTURES.COM>
   subject: RE: sqlrpgle & copy book

   Thanks= Birgitta,

   We are on v5r3, I have a simple non qualified ds and I do= n't have nested
   ds either.  Something like below and it does not co= mpile.  Once I put
   the DS within the sqlrpgle, it works. Thanks, Su= dha

   Rpgle.myds
   dfieldDs &= nbsp;  ds
   d field1&n= bsp;    &nbsp= ;  5a
   d field2 &nbsp= ;       15p 2
   d field3         30a

   s= qlrpgle  :
   /copy rpgle,myds
   *         &nbsp= ;                     &nb= sp;                     &   nbsp;
   d myDsNullI     ds         &n= bsp;                        d             =   
                  &nbsp= ; based(myDsNullAd)
   d  myNullAry         &nbsp= ;         5i 0 dim(21)         &nbs= p;

   c/exec sql declare c cursor for select * from filea for r= ead only
   c/end-exec c/exec sql open c c/end-exec c/exec sql fetch next f= rom c
   into :fields :myNullAry c/end-exec c/exec sql close c c/end-exec<B= R>

   Sudha Ramanujan
   SunGard Futures Systems
   sramanujan@sung= ardfutures.com
   (312) 577 6179
   (312) 577 6101 - Fax

   -----Origin= al Message-----
   From: HauserSSS [mailto:Hauser@xxxxxxxxxxxxxxx]
   Sent: Friday, Feb= ruary 11, 2005 12:11 AM
   To: RPG programming on the AS400 / iSeries
   Su= bject: AW: sqlrpgle & copy book

   Hi Sudha,

   do you use = a qualified data structure or is the data structure defined
   in a nested = data structure. If so, you must be on release VR3M0 to get
   it to work.<B= R>
   Before Release V5R2M0 you have to define a non qualified data structu= re.
   If you don't use nested copy books, the data structure can be define= d in
   a copy book.

   Birgitta
   -----Ursprungliche Nachricht-----<B= R>Von: rpg400-l-bounces@xxxxxxxxxxxx
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im = Auftrag von
   SRamanujan@xxxxxxxxxxxxxxxxxx
   Gesendet: Donnerstag, 10. F= ebruar 2005 23:32
   An: rpg400-l@xxxxxxxxxxxx
   Betreff: sqlrpgle & c= opy book

   Hi all,
   When I have a copy book that has the data st= ructure, and fetch into the
   ds, I get a sql pre-compiler error SQL0312 '= The DSNAME is not define or
   not usable' Is there anyway to avoid this? T= hanks, Sudha

   Sudha Ramanujan
   SunGard Futures Systems
   sramanuja= n@xxxxxxxxxxxxxxxxxx
   (312) 577 6179
   (312) 577 6101 - Fax

   --<BR= >This is the RPG programming on the AS400 / iSeries (RPG400-L)
   mailing
   l= ist To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
   unsubsc= ribe, or change list options,
   visit: http://lists.midrange.com/mai= lman/listinfo/rpg400-l
   or email: RPG400-L-request@xxxxxxxxxxxx
   Be= fore posting, please take a moment to review the archives
   at http://archive.midra= nge.com/rpg400-l.

   --
   This is the RPG programming= on the AS400 / iSeries (RPG400-L) mailing
   list To post a message email:= RPG400-L@xxxxxxxxxxxx To subscribe,
   unsubscribe, or change list options= ,
   visit: http://lists.midrange.com/mailman/listinfo/rpg400-l<B= R>or email:
   RPG400-L-request@xxxxxxxxxxxx
   Before posting, please take a = moment to review the archives
   at http://archive.midrange.com/rpg400-l.
   <BR= >

   ------------------------------

   message: 6
   date: Fri,= 11 Feb 2005 09:07:19 -0600
   from: <SRAMANUJAN@xxxxxxxxxxxxxxxxxx>
   sub= ject: RE: sqlrpgle & copy book

   Thanks Rick, -s

   Sudha Rama= nujan
   SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312) = 577 6179
   (312) 577 6101 - Fax

   -----Original Message-----
   F= rom: Rick.Chevalier@xxxxxxxxxxxxxxx
   [mailto:Rick.Chevalier@xxxxxxxxxxxxxxx] <= BR>Sent: Friday, February 11,
   2005 8:08 AM
   To: rpg400-l@xxxxxxxxxxxx
   = Subject: RE: sqlrpgle & copy book

   Also make sure the sub fie= lds are defined in your copybook.  I have not
   been able to use exte= rnally defined data structures as result sets for
   embedded SQL.  Th= e compiler always complains they aren't defined or
   usable.

   I vagu= ely remember someone posting to this list that they got embedded
   SQL to = work using an externally described DS as the result set but I may
   be mis= taken.  Check the archives, this has been discussed several times
   b= efore.

   Rick

   -----Original Message-----
   From: rpg400-l-boun= ces@xxxxxxxxxxxx
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of
   SRamanu= jan@xxxxxxxxxxxxxxxxxx
   Sent: Thursday, February 10, 2005 4:32 PM
   To: = rpg400-l@xxxxxxxxxxxx
   Subject: sqlrpgle & copy book

   Hi al= l,
   When I have a copy book that has the data structure, and fetch into t= he
   ds, I get a sql pre-compiler error SQL0312 'The DSNAME is not define = or
   not usable' Is there anyway to avoid this? Thanks, Sudha

   Sudha= Ramanujan
   SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (= 312) 577 6179
   (312) 577 6101 - Fax

   Privileged and Confidentia= l.  This e-mail, and any attachments there to,
   is intended only for= use by the addressee(s) named herein and may
   contain legally privileged= or confidential information.  If you have
   received this e-mail in = error, please notify me immediately by a return
   e-mail and delete this e= -mail.  You are hereby notified that any
   dissemination, distributio= n or copying of this e-mail and/or any
   attachments thereto, is strictly = prohibited.

   --
   This is the RPG programming on the AS400 / iSerie= s (RPG400-L) mailing
   list To post a message email: RPG400-L@xxxxxxxxxxxx= To subscribe,
   unsubscribe, or change list options,
   visit: http= ://lists.midrange.com/mailman/listinfo/rpg400-l
   or email: RPG400-L-r= equest@xxxxxxxxxxxx
   Before posting, please take a moment to review the a= rchives
   at http://archive.midrange.com/rpg400-l.

   ---------= ---------------------

   message: 7
   date: Fri, 11 Feb 2005 10:16:17 = -0500
   from: rob@xxxxxxxxx
   subject: RE: sqlrpgle & copy book
   <B= R>You are doing a /copy and not a /include, right?

   Rob Berendt
   --   Group Dekko Services, LLC
   Dept 01.073
   PO Box 2000
   Dock 108<BR= >6928N 400E
   Kendallville, IN 46755
   <A href="http://www.dekko.com/"; = target=blank >http://www.dekko.com

   <SRAMANUJA= N@xxxxxxxxxxxxxxxxxx>
   Sent by: rpg400-l-bounces@xxxxxxxxxxxx
   02/11/20= 05 10:06 AM
   Please respond to
   RPG programming on the AS400 / iSeries = <RPG400-L@xxxxxxxxxxxx>

   To
   <RPG400-L@xxxxxxxxxxxx>
   cc
   <= BR>Subject
   RE: sqlrpgle & copy book

   Thank= s Birgitta,

   We are on v5r3, I have a simple non qualified ds and I d= on't have nested
   ds either.  Something like below and it does not c= ompile.  Once I put
   the DS within the sqlrpgle, it works. Thanks, S= udha

   Rpgle.myds
   dfieldDs           &nbsp= ;     ds
   d field1             &n= bsp;                   5a
   d= field2                   &nbs= p;  15p 2
   d field3              =        30a

   sqlrpgle  :
   /copy rpgle,myd= s
   *
   d myDsNullI     ds
   d         &= nbsp;                    =     based(myDsNullAd)
   d  myNullAry      =             5i 0 dim(21)

   c/exec sql = declare c cursor for select * from filea for read only
   c/end-exec c/exec= sql open c c/end-exec c/exec sql fetch next from c
   into :fields :myNull= Ary c/end-exec c/exec sql close c c/end-exec

   Sudha Ramanujan   SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312) 577 6= 179
   (312) 577 6101 - Fax

   -----Original Message-----
   From: Haus= erSSS [mailto:Hau= ser@xxxxxxxxxxxxxxx]
   Sent: Friday, February 11, 2005 12:11 AM
   To= : RPG programming on the AS400 / iSeries
   Subject: AW: sqlrpgle & cop= y book

   Hi Sudha,

   do you use a qualified data structure or= is the data structure defined
   in a nested data structure. If so, you mu= st be on release VR3M0 to get
   it to work.

   Before Release V5R2M0 y= ou have to define a non qualified data structure.
   If you don't use neste= d copy books, the data structure can be defined in
   a copy book.

   B= irgitta
   -----Ursprungliche Nachricht-----
   Von: rpg400-l-bounces@midra= nge.com
   [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von
   SRamanujan@sun= gardfutures.com
   Gesendet: Donnerstag, 10. Februar 2005 23:32
   An: rpg4= 00-l@xxxxxxxxxxxx
   Betreff: sqlrpgle & copy book

   Hi all,<B= R>When I have a copy book that has the data structure, and
   fetch into the<B= R>ds, I get a sql pre-compiler error SQL0312 'The DSNAME
   is not define or<B= R>not usable' Is there anyway to avoid this? Thanks,
   Sudha

   Sudha Ram= anujan
   SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312)= 577 6179
   (312) 577 6101 - Fax

   --
   This is the RPG programming = on the AS400 / iSeries (RPG400-L) mailing
   list To post a message email: = RPG400-L@xxxxxxxxxxxx To subscribe,
   unsubscribe, or change list options,   visit: <A 
href="http://lists.midrange.com/mailman/listinfo/rpg400-l";    target=blank 
>http://lists.midrange.com/mailman/listinfo/rpg400-l<BR   >or email: 
RPG400-L-request@xxxxxxxxxxxx
   Before posting, please take a m= oment to review the archives
   at http://archive.midrange.com/rpg400-l.

   
   --
   This is the RPG programming on the AS400 / iSeries (RPG4= 00-L) mailing
   list To post a message email: RPG400-L@xxxxxxxxxxxx To sub= scribe,
   unsubscribe, or change list options,
   visit: http://list= s.midrange.com/mailman/listinfo/rpg400-l
   or email: RPG400-L-request@= midrange.com
   Before posting, please take a moment to review the archives   at ht= 
tp://archive.midrange.com/rpg400-l.

   --
   This is the RPG p= rogramming on the AS400 / iSeries (RPG400-L) mailing
   list To post a mess= age email: RPG400-L@xxxxxxxxxxxx To subscribe,
   unsubscribe, or change li= st options,
   visit: http://lists.midrange.com/mailman/listinfo/rpg4= 00-l
   or email: RPG400-L-request@xxxxxxxxxxxx
   Before posting, plea= se take a moment to review the archives
   at http://archive.midrange.com/rpg400-l</= A>.

   ------------------------------

   message: 8
   = date: Fri, 11 Feb 2005 09:26:06 -0600
   from: <SRAMANUJAN@xxxxxxxxxxxxxxxx= OM>
   subject: RE: sqlrpgle & copy book

   Ok I checked the Archiv= es and found to use /include instead of /copy but
   I still get the error = SQL0312 'Fields is not defined or not usable'.
   What am I doing wrong. My= code looks now as:

   Rpgle.myds
   dfieldDs    ds
   d field1        5a
   d field2         15p 2
   d field3 <= SPAN style="VISIBILITY: hidden">      &nb= sp; 30a

   sqlrpgle  :
   /include rpgle,myds
   *     =                     &nbsp= ;                     &nb= sp;
   d myDsNullI     ds   &nbs= p;                     &n= bsp;
   d       &n= bsp;                     =       based(myDsNullAd)
   d  myNullAry     =               5i 0 dim(21)    
   c/exec sql declare c cursor for select= * from filea for read only
   c/end-exec
   c/exec sql open c
   c/end-= exec
   c/exec sql fetch next from c into :fields :myNullAry
   c/end-exe= c
   c/exec sql close c
   c/end-exec

   Sudha Ramanujan
   SunGa= rd Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312) 577 6179
   (3= 12) 577 6101 - Fax

   -----Original Message-----
   From: Rick.Chev= alier@xxxxxxxxxxxxxxx
   [mailto:Rick.Chevalier@xxxxxxxxxxxxxxx]
   Sent: Frida= y, February 11, 2005 8:08 AM
   To: rpg400-l@xxxxxxxxxxxx
   Subject: RE: s= qlrpgle & copy book

   Also make sure the sub fields are define= d in your copybook.  I have not
   been able to use externally defined= data structures as result sets for
   embedded SQL.  The compiler alw= ays complains they aren't defined or
   usable.

   I vaguely remember s= omeone posting to this list that they got embedded
   SQL to work using an = externally described DS as the result set but I may
   be mistaken.  C= heck the archives, this has been discussed several times
   before.

   = Rick

   -----Original Message-----
   From: rpg400-l-bounces@xxxxxxxxxx= om
   [mai= lto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of
   SRamanujan@sungardfut= ures.com
   Sent: Thursday, February 10, 2005 4:32 PM
   To: rpg400-l@midra= nge.com
   Subject: sqlrpgle & copy book

   Hi all,
   When I h= ave a copy book that has the data structure, and fetch into the
   ds, I ge= t a sql pre-compiler error SQL0312 'The DSNAME is not define or
   not usab= le' Is there anyway to avoid this? Thanks, Sudha

   Sudha Ramanujan
   = SunGard Futures Systems
   sramanujan@xxxxxxxxxxxxxxxxxx
   (312) 577 6179<= BR>(312) 577 6101 - Fax

   Privileged and Confidential.  This = e-mail, and any attachments there to,
   is intended only for use by the ad= dressee(s) named herein and may
   contain legally privileged or confidenti= al information.  If you have
   received this e-mail in error, please = notify me immediately by a return
   e-mail and delete this e-mail.  Y= ou are hereby notified that any
   dissemination, distribution or copying o= f this e-mail and/or any
   attachments thereto, is strictly prohibited.<BR= >
   --
   This is the RPG programming on the AS400 / iSeries (RPG400-L) m= ailing
   list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,   
unsubscribe, or change list options,
   visit: http://lists.midra= nge.com/mailman/listinfo/rpg400-l
   or email: RPG400-L-request@midrang= e.com
   Before posting, please take a moment to review the archives
   at = http://ar= chive.midrange.com/rpg400-l.

   -----------------------= -------

   --
   This is the RPG programming on the AS400 / iSeries (R= PG400-L) digest
   list To post a message email: RPG400-L@xxxxxxxxxxxx To s= ubscribe,
   unsubscribe, or change list options,
   visit: http://li= sts.midrange.com/mailman/listinfo/rpg400-l
   or email: RPG400-L-reques= t@xxxxxxxxxxxx
   Before posting, please take a moment to review the archiv= es
   at = http://archive.midrange.com/rpg400-l.

   End of RPG400-L Di= gest, Vol 4, Issue 184
   ****************************************

   -= -
   This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing   list
   To post a message email: RPG400-L@xxxxxxxxxxxx
   To subscribe, un= subscribe, or change list options,
   visit: http://lists.midrange.co= m/mailman/listinfo/rpg400-l
   or email: RPG400-L-request@xxxxxxxxxxxx<= BR>Before posting, please take a
   moment to review the archives
   at http://archive.= midrange.com/rpg400-l.

   

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.