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



Solved my own problem. I changed the name of @Time and and put all the
processing of @TimeAdj into it. I think the main problem was a program using
a procedure that calls another program while SPECIAL is pointing to another
program. Kind of like one thread communicating with another thread and the
first thread trying to start a new thread that the second still has to
communicate with. Just guessing.  :)


-----Original Message-----
From: Bryan Merrell [mailto:bryan.merrell@xxxxxxxxxx]
Sent: Thursday, April 29, 2004 3:23 PM
To: RPG Midrange List (E-mail)
Subject: SPECIAL PGMNAME(PGM) on a Ext. Def. Print File


I am encountering some weird behavior as I try something that I have never
done before. 
I have a printer file that I have removed all spacea(n) from. I added a
delimiter in between each of the desired fields.
example.
A          R HEADR1                    
A                                     2'PgmName'                   
A                                    27'~'                         
A            $HNAM     R             28REFFLD(FLDA File1)      
A                                    71'~'                         
A                                    72DATE                        
A                                      EDTCDE(Y)                   
A                                    82'~'                         
A            $TIME          6  0     83EDTWRD('  :  :  ')          
A                                    93'~'                         
A          R HEADR2                                               
A*                                                                 
A            $USER         10A        2                                 

I then take that and added it to my RPG in the form of

FPrintFile   O    E             SPECIAL PgmName('SpclFile')
F                                     PList(OutParms)   

and added 
C     OutParms      PList                           
C                   Parm                    FileName

it dies at a function called @Time that calls program @TIMEADJ

D*@TIME           PR             6  0                    
D* @CO                           3    CONST              
P @TIME           B                                      
D @TIME           PI             6  0                    
D  @CO                           3    CONST              
D  @CO#           S              3                       
D  @ReturnTime    S              6  0                    
 *                                                       
C                   EVAL      @CO# = @CO                 
C                   CALL      '@TIMEADJ'                 
C                   PARM                    @CO#         
C                   PARM                    @Returntime  
C                   RETURN    @ReturnTime                
C                   EVAL      *INLR = *ON                
P@TIME            E 

@TIMEADJ's Parm List

D  @CO            S              3     
D  @tIME          S              6  0  
C     *ENTRY        PLIST                         
C                   PARM                    @CO   
C                   PARM                    @TIME
 
at the call to @TIMEADJ I get this very interesting error.
'Scalar operand contains a value that is not valid'
In debug, I put a stop at the first line of @TimeAdj and the error happens
before it hits that stop.

what is mind boggling is the fact that when I replace the SPECIAL
PGMNAME('SpclFile') with PRINTER OFLIND(*IN70)
everything works great.   Has anyone dealt with this before?  What am I
doing wrong? I know this methodology works great when the file is internally
described.
Please Help. Please forgive.... most of this code is over 15 years old. Most
of it makes me shiver. I was given the task of making it work for porting
all reports in the shortest time possible.      


Thanks Again,

Bryan Merrell

"If I had my life to live over again, I'd be a plumber."
Albert Einstein
_______________________________________________
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
or email: RPG400-L-request@xxxxxxxxxxxx
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 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.