× 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: RE: F Specs on an OVRDBF
  • From: "Cobb, Laura" <LCobb@xxxxxxxxxxxxx>
  • Date: Fri, 9 Jun 2000 14:15:22 -0400

Jon Erickson wrote:
the OVRDBF or any command to be called via QCMDEXC method: 

 
It had been suggested by my senior pgmr that I could use this, but to be
honest I haven't any experience in this arena and I was gun shy to try it.
I will try this technique the next time the opportunity arises now that I
have some "sample code" to refer to.
The thing that gets me is the maintenance program has a subfile to scroll
through as well as a scan on the master file by partial or full description
and I had no problems coding those.  But I couldn't wrap my brain around the
OVRDBF thing if my life depended on it.
 
LAC

-----Original Message-----
From: Jon Erickson [mailto:jerickson@800.com]
Sent: Friday, June 09, 2000 1:39 PM
To: 'RPG400-L@midrange.com'
Subject: RE: F Specs on an OVRDBF



Laura, I hope I don't beat the proverbial dead horse by jumping in late, but
here's some of what I know and do. 

The OVRDBF or any command to be called via QCMDEXC method: 
- Define Prototype for ILE call to QCMDEXC.  Of course if you don't want to
get into ILE programming, you can just define the CMD fields and use the OPM
CALL 'QCMDEXC' with PARM opcodes.

e.g. 
d Qcmdexc         pr                  Extpgm('QCMDEXC')                 
d  Cmd                                Like(Qcmd) Options(*Varsize) Const 
d  CmdLen                       15p 5 Const                             
d  CmdOpt                        3    Options(*NoPass) Const            

d Qcmd            s           3000 

- Define the command or portions thereof as constants as needed. 

e.g. 
 *------------------------------------------------------------------------* 
 * Named Constants                                                         
 *------------------------------------------------------------------------* 
d CrtDupP1        c                   'CRTDUPOBJ OBJ('                     
d CrtDupP2        c                   ') FROMLIB('                         
d CrtDupP3        c                   ') OBJTYPE(*FILE) TOLIB(QTEMP)'      
d OvrPrtf         c                   'OVRPRTF FILE(QSYSPRT) PAGESIZE(*N 1- 
d                                     98) CPI(15) MAXRCDS(*NOMAX) OVRSCOPE- 
d                                     (*JOB) SHARE(*YES)'                  

- Assign command to variable 
e.g. ILE 
c                   Eval      Qcmd = CrtDupP1 + 'RPSRVCWK1'      
c                                  + CrtDupP2 + %Trimr(DtaLib) 
c                                  + CrtDupP3                    
c                   CallP(e)  Qcmdexc(Qcmd : %Len(%Trim(Qcmd)))  
c                   If        %Error                             
                       : 
c                   EndIf 

e.g. RPGLE (OPM) 
c                   Eval      QcmdLen = %Len(%Trim(Qcmd)) 
c                   Call(e)   'QCMDEXC'                  
c                   Parm                    Qcmd         
c                   Parm                    QcmdLen      

I hope this helps you dig in..... 

As for the conversion of the source to RPGIV, I've encountered a minor
problem when an external DS is defined and an array by the same name
redefines a sub-field of the DS.  I've had to rename the array field
throughout the program and define it within the DS using the OVERLAY
Keyword.

e.g. 
RPG 
E                    DXF         9  2 
IPIQ000    E DSIQ000DS 

DXF is defined in the external DS as; 
 FMT J  .....I....................................PFromTo++DField 
                                                   66956712 DXF 

RPGLE 
d Piq000        E Ds                  Extname(Iq000Ds) 
d  DxfA                          2    Dim(9)   Overlay(Piq000:6695) 

Again, I hope this helps, and good luck! 

Regards, 
Jon A. Erickson 
Sr. Programmer Analyst 
800.COM Inc. 
1516 NW Thurman St 
Portland, OR  97209-2517 
  
Direct: 503.944.3613 
Fax: 503.944.3690 
Web: http://800.com <http://800.com>  
  

-----Original Message----- 
From: Cobb, Laura [ mailto:LCobb@PapaGinos.com <mailto:LCobb@PapaGinos.com>
] 
Sent: Friday, June 09, 2000 9:50 AM 
To: 'RPG400-L@midrange.com' 
Subject: RE: F Specs on an OVRDBF 


Thanks Jim,  
I will try it and get back to you on it. 

Regards, 
LAC 

                -----Original Message----- 
                From:   Jim Langston [ mailto:jlangston@conexfreight.com
<mailto:jlangston@conexfreight.com> ] 
                Sent:   Friday, June 09, 2000 12:15 PM 
                To:     RPG400-L@midrange.com 
                Subject:        Re: F Specs on an OVRDBF 

                I would suggest you go to RPG IV as soon as humanly 
possible.  RPG IV is 
                so much easier and faster to code than RPG III.  RPG IV is 
actually legible too! 

                It does not take much at all to go from RPG III to RPG IV, 
basically, you can 
                take an existing RPG III program and run CVTRPGSRC on it. 
This will convert 
                the source from RPG III to RPG IV by spacing out everything 
correctly and 
                changing the few things that need to be changed to get it to

compile.  You then 
                should be able to, in most cases, compile the program and 
run it without problems. 
                There are a few problems that may crop up, but they are far 
and few between. 

                The first thing you will notice is that your program has 
been expanded out a bit 
                width wise.  Everything should look almost the same besides 
that. 

                So, you can still code like you were used to in RPG III 
without problems.  But, 
                now you will be able to use all the neat stuff in RPG IV. 
Like the Eval statement. 
                That is the biggest change in RPG IV that makes it so great,

IMO.  Instead of 
                saying: 

                 C                     MOVE    SOMEVAR    SOMEVAR2 
                 C                     ADD       SOMEVAR3  SOMEVAR2 

                You can say 

                 C                     Eval    Somevar2 = Somevar + Somevar3


                Woah, that line is actually readable!  Notice, you can also 
use lower case letters 
                now.  And, you are no longer limited to 8 characters for 
variable names either! 
                You are still limited to 8 for your DDS though, bummer.  But

program variables 
                can be as long as you want them. 

                Try it on a program or two.  See what you think. 

                Regards, 

                Jim Langston 

                "Cobb, Laura" wrote: 

                > Jim, 
                > Thanks for putting my mind at ease (LOL).  My forgiving 
side will be okay if 
                > it happens, but my perfectionist side is bound and 
determined not to let it. 
                > Thanks for the insight on netshare400.  I didn't realize I

could peruse code 
                > as well as write at the sight.  Hopefully some RPGIV.  I 
have only seen a 
                > few statements in IV but I like what I see.  It seems a 
bit more intuitive. 
                > Thanks for everything and be sure that I will be seeking 
council in the 
                > future from you(all) on appropriate coding techniques. 
                > 
                > Well its back to work for me now, 
                > 
                > Regards, 
                > 
                > LAC 

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

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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.