× 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: Tilde delimited fields in a PC file - how to upload & convert fields to AS/400 physical file
  • From: Eric Kempter <eric.kempter@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 9 Feb 2000 15:59:32 -0800

Warning, RPG III ahead.  Shield eyes if necessary.

E                    TXT       500  1  A            Record 
E                    TXA        50  1  A            Field  
C                     Z-ADD1         X       30    
C                     Z-ADD0         Y       30    
C                     Z-ADD0         Z       30    
C                     MOVEA*BLANKS   TXT           
C                     MOVEARECORD    TXT           
C*                                                 
C           X         DOWLT501                     
C*                                                 
C                     Z-ADD1         Y             
C                     MOVEA*BLANKS   TXA           
C*                                                 
C           TXT,X     DOWNE'~'                     
C           X         ANDLT501                     
C*                                                 
C                     MOVE TXT,X     TXA,Y  
C                     ADD  1         Y      
C                     ADD  1         X   
C*                                       
C                     ENDDO              
C                     ADD  1         Z      
C                     EXSR FLDPARS     
C           X         CABEQ500       END003    
C           Z         CABEQ64        END003    
C*                                             
C                     ADD  1         X         
C                     ENDDO                    
C           FLDPARS   BEGSR
C                     SELEC                                   
C*                                                            
C*                 .........  process Transaction Number      
C*                                                            
C           Z         WHEQ 01                                 
C                      MOVEATXA                   FIELD1
<etc...>

Thank you,

Eric Kempter
*4107
* Eric.Kempter@robertmondavi.com



> -----Original Message-----
> From: boothm@earth.Goddard.edu [SMTP:boothm@earth.Goddard.edu]
> Sent: Tuesday, February 08, 2000 5:48 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: Tilde delimited fields in a PC file - how to upload & 
>convert fields to AS/400 physical file
> 
> Did you find a solution?  Here's my shot at it:
> 
>      C                   Z-add     1             I                 3 0
>      C                   Z-add     1             J                 3 0
>      C     '~'           scan      LongFld2,I    J
>      C                   Eval      Field1 = %SUBST(LongFld2:I:(J-1))
>      C                   Eval      I=J
>      C     '~'           scan      LongFld2,I    J 
>      C                   Eval      Field3 = %SUBST(LongFld2:I:(J-1))
>      C                   Eval      I=J
>      C     '~'           scan      LongFld2,I    J 
>      C                   Eval      Field4 = %SUBST(LongFld2:I:(J-1))
>      C                   Eval      I=J
>      C     '~'           scan      LongFld2,I    J 
>      C                   Eval      Field5 = %SUBST(LongFld2:I:(J-1))
>      C                   Eval      I=J
> 
> etc.... until done.
> 
> I didn't do this sample but it, or something near to it, should work 
> shouldn't it?
> 
> _______________________
> Booth Martin
> boothm@earth.goddard.edu
> http://www.spy.net/~booth
> _______________________
> 
> 
> 
> 
> "Peter Dow" <pcdow@yahoo.com>
> Sent by: owner-midrange-l@midrange.com
> 02/08/2000 03:04 PM
> Please respond to MIDRANGE-L
> 
>  
>         To:     <MIDRANGE-L@midrange.com>
>         cc: 
>         Subject:        Re: Tilde delimited fields in a PC file - how to 
>upload & convert fields 
> to AS/400 physical file
> 
> ----- Original Message ----- 
> From: Stone, Joel 
> To: 'MIDRANGE-L@midrange.com' 
> Sent: Monday, February 07, 2000 8:05 AM
> Subject: Tilde delimited fields in a PC file - how to upload & convert fields 
>to 
> AS/400 physical file> 
> 
> An example record: 
> 40354~KMART STORE# 37~3665 HWY 
> 6~~DALLAS~TX~77478~~~~~713-980-8888~~~4362~~100~3~0~0~~0~ 
> Are there any utilities to split a file with records as shown above into 
> an AS/400 PF?  I would like the tilde's gone, where each tilde acts as the 
> delimiter to begin a new field.
> Can Client/Access do this job by itself? 
> What other options to I have.  Does anyone know of a magazine article with 
> a free utility program?  Other options? 
> Must I build the DDS by hand?  I have a listing of field names and 
> lengths. 
> The data is from a query tool on a Unix box. 
> Thanks! 
> 
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@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
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@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 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.