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



Hi Kari

It seems you are scanning a member in a source file - is this correct?

Can you guarantee that the source from HP is always in this layout? Always a DATAIN with a DATAOUT on the next line?

You need to hold off making the final command. You also need to preserve the "state" - that you are at the start of a filecopy, say - use an indicator named startcpyf, turn it on when 'DATAIN' is found. Also, you need to preserve the values from the 'DATAIN' line, to be applied when you get the 'DATAOUT'. Turn off startcpyf after you get the 'DATAOUT'.

As an aside, if you have the time, learn to do this in free-form - but that's just me who doesn't want to see indicators like this anymore!!

HTH
Vern

On 9/30/2013 12:13 PM, Kari Zeglin 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]






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.