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



Well if you are new to RPGLE go straight to /Free - forget the nasty fixed-format stuff. It will also simplify the use of the new built-ins like %ScanRpl, %Replace, etc.

A few questions:

- Where is the source you are processing? Source physical file? IFS file? Database?
- What release level does your code have to run on?
- Are you familiar with C programming?

Once we low the answers we can better advise.


On 2013-09-30, at 1:13 PM, Kari Zeglin <Kari.Zeglin@xxxxxxxxxxx> wrote:


I am a newbie at RPGLE. What I am doing is a migration conversion program from the HP to IBM for my work. I currently have the program scan for one line and change the HP command to an AS400 one. I have it working perfectly in most areas but one..

I need to scan these two lines as example:
FILE DATAIN=FEDRECD1
FILE DATAOUT=FEDSRTD

From there I need to turn those two lines into:
CPYF FROMFILE(FEDRECD1) TOFILE(QTEMP/FEDSRTD) +
CRTFILE(*YES)

I can get my output to be, using EVAL %SUBST : CPYF FROMFILE(FEDRECD1) TO FILE(QTEMP/ )+
CRTFILE(*YES)
Here is my code on scanning:
C 'FILE' SCAN SRCDTA POSIT 90
C *IN90 IFEQ '1'
C 'DATAIN' SCAN SRCDTA POSIT 90
C *IN90 IFEQ '1'
C EXSR FCO
C ELSE
C 'DATAOUT' SCAN SRCDTA POSIT 90
C *IN90 IFEQ '1'
C EXSR FCOP
....

My question is what can I use/do to have my program scan these two lines of code and get it into one line, or have my separate SR's talk to get DATAIN/OUT in the correct positions on one line?


Kari Zeglin
True Companies
455 North Poplar Street
Casper, Wyoming 82601
307-266-0460
kari.zeglin@xxxxxxxxxxx<mailto:kari.zeglin@xxxxxxxxxxx>
[truediamond]

--
This is the RPG programming on the IBM i (AS/400 and 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.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.