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



>I know I have seen many examples of using the edit APIs QECCVTEC,
>QECCVTEW, and QECEDT, but now that I need working examples, I cannot
>find them.  I've searched the softcopy library, redbooks, News/400
>CD-ROM, and the News/400 www site.  I've found references to them, but
>no examples.
>
>Does someone have examples they can share?  Thanks.

Jeff,
        This isn't the greatest in the world, but you should get the idea...

This takes a 12/2 number, applies a "P" edit code to it and
emits a 14 character editted "number."  It uses QECCVTEC to
convert the edit code to a "mask" which is used in turn by 
QECEDT to actually edit the number.  It's done in plain Jane
(apologies to the Jane's of the world) RPG

hth
Buck Calabro
Commsoft, Albany, NY

F* TEST EDIT APIS                                     
I* Convert edit code parms                            
I           IDS                                       
I                                        1 256 CMASK  
I                                    B 257 2600CMLEN  
I                                    B 261 2640CRLEN  
I                                      265 265 CZFILL 
I                                      266 266 CCODE  
I                                      267 267 CFILL  
I                                    B 268 2710CPREC  
I                                    B 272 2750CDEC   
I                                      276 372 CERROR 
I* Edit parms                                         
I           IDS                                       
I                                        1  24 EOUTPT 
I                                    B  25  280ERLEN  
I                                       29  402EINPUT 
I                                       41  50 EINTYP 
I                                    B  51  540EPREC  
I                                       55 310 EMASK  
I                                    B 311 3140EMLEN  
I                                      315 315 EZFILL 
I                                      316 409 EERROR 
I* Exception/error format                             
IERRFMT     IDS                                       
I                                    B   1   40ERPRO  
I                                    B   5   80ERAVL  
I                                        9  15 ERID   
I                                       16  96 ERDTA  
C* Convert edit code to mask                          
C                     MOVE *BLANKS   CMASK     P      
C                     MOVE 'P'       CCODE            
C                     MOVE *BLANKS   CFILL            
C                     Z-ADD12        CPREC            
C                     Z-ADD2         CDEC             
C                     CALL 'QECCVTEC'                 
C                     PARM           CMASK            
C                     PARM           CMLEN            
C                     PARM           CRLEN            
C                     PARM           CZFILL           
C                     PARM           CCODE            
C                     PARM           CFILL       
C                     PARM           CPREC       
C                     PARM           CDEC        
C                     PARM           CERROR      
C                     MOVE CERROR    ERRFMT      
C* Edit input variable                           
C                     MOVE *BLANKS   EOUTPT      
C                     Z-ADDCRLEN     ERLEN       
C                     Z-ADD-123456.78EINPUT      
C                     MOVEL'*ZONED'  EINTYP      
C                     Z-ADDCPREC     EPREC       
C                     MOVELCMASK     EMASK     P 
C                     Z-ADDCMLEN     EMLEN       
C                     MOVELCZFILL    EZFILL      
C                     CALL 'QECEDT'              
C                     PARM           EOUTPT      
C                     PARM           ERLEN       
C                     PARM           EINPUT      
C                     PARM           EINTYP      
C                     PARM           EPREC       
C                     PARM           EMASK       
C                     PARM           EMLEN                     
C                     PARM           EZFILL                    
C                     PARM           EERROR                    
C                     MOVE EERROR    ERRFMT                    
C* Extract output and return                                   
C* my particular situation has 12/2 input, so I need 14 output 
C                     MOVELEOUTPT    CHAR14 14                 
C                     SETON                     LR             

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-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-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.