× 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'm not sure how large the command will accept, but I usually use a
character of 512 and it needs to be in the format of:
'/directory/filename.extension' for the IFS. 
If you were going to copy the file FROMFILE in QGPL and the first member to
the IFS in the temporary directory, the command would look like this:

DCL        VAR(&FROMFILE) TYPE(*CHAR) LEN(10)
DCL        VAR(&FROMLIB)  TYPE(*CHAR) LEN(10)
DCL        VAR(&FROMMBR) TYPE(*CHAR) LEN(10)
DCL        VAR(&TOSTMF) TYPE(*CHAR) LEN(512)
DCL        VAR(&TAB) TYPE(*CHAR) LEN(1) VALUE(X'05')

CHGVAR VAR(&FROMFILE) VALUE('FROMFILE')
CHGVAR VAR(&FROMLIB) VALUE('QGPL')
CHGVAR VAR(&FROMMBR) VALUE('*FIRST')
CHGVAR VAR(&TOSTMF) VALUE('/tmp/' *CAT &FROMFILE *TCAT '.GO')

CPYTOIMPF  FROMFILE(&FROMLIB/&FROMFILE &FROMMBR) +
           TOSTMF(&TOSTMF) RCDDLM(*CRLF) FLDDLM(&TAB)

Something like that.
John

-----Original Message-----
From: John Cunha [mailto:John.Cunha@xxxxxxxxxxxx]
Sent: Friday, July 25, 2003 12:53 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Tabbed files for 3rd party vendor


Thanks John,
Can you please let me know what is the layout of the value which goes
into TOSTMF(&TOSTMF) -->To stream file?
Thanks,
John Cunha
NGR

>-----Original Message-----
>From: John Brandt Sr. [mailto:pgmr@xxxxxxxxxxxxxxx]
>Sent: July 25, 2003 1:20 PM
>To: 'RPG programming on the AS400 / iSeries'
>Subject: RE: Tabbed files for 3rd party vendor
>
>Do it programmatically using a variable defined as a hex 5. The output
>file,
>if you look from the iSeries side, will be a hex 09.
>DCL        VAR(&TAB) TYPE(*CHAR) LEN(1) VALUE(X'05')
>CPYTOIMPF  FROMFILE(&FROMLIB/&FROMFILE &FROMMBR) +
>             TOSTMF(&TOSTMF) RCDDLM(*CRLF) FLDDLM(&TAB)
>You get the idea.
>I created a copy of CPYTOIMPF of my own to allow named delimiters.
>John Brandt
>iStudio400.com
>
>
>-----Original Message-----
>From: John Cunha [mailto:John.Cunha@xxxxxxxxxxxx]
>Sent: Friday, July 25, 2003 11:53 AM
>To: RPG programming on the AS400 / iSeries
>Subject: Tabbed files for 3rd party vendor
>
>
>Here's my challenge:
>
>I am looking for a way (procedure) to take a PF DDS described file tab
>it and sent it as flat file (.GO) to another server.
>
>We have one way of doing that which is writing a program per file and
>add X'05' between the fields to insert the tabs. This solution is quite
>cumbersome and time consuming due to the number of files that need to
be
>transferred.
>
>
>
>Ps. CPYTOIMPF does seem to work since it only has '|' not a real *TAB!
>
>
>
>....5..
>
>RS- A- 45
>
>DE0C0FF
>
>9251545
>
>
>
>Any suggestions?
>
>Thanks for the help.
>
>John Cunha
>
>NGR
>
>_______________________________________________
>
>>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.
>
>
>
>_______________________________________________
>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.
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/03
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/03
>
>_______________________________________________
>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.


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/03
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/03
 

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.