× 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: CPYTOIMPF/CPYTOSTMF
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Wed, 17 Mar 1999 14:39:58 -0700

Evan,

The code page is determined by the target file or file system.  In the file 
systems 
provided by IBM, I don't think you can simply change the code page attribute.  
I have not tried, but it should be possible to do with APIs. 

The easiest way I have come up with to do this is the following (I would love 
to 
hear of an easier way):

CRTPF mylib/tempfile RCDLEN(1)

CPYTOSTMF FROMMBR('/qsys.lib/mylib.lib/tempfile.file/tempfile.mbr') TOSTMF('/qdl
s/myfolder/temp367') CVTDTA(*NONE) DBFCCSID(00367)

You can then use this file in a program to clone the CCSID like:

CPYDOC FROMDOC(temp367) FROMFLR(myfolder) TODOC(&IMPFNAM) 
TOFLR(&IMPF) REPLACE(*YES)

CPYTOIMPF FROMFILE(fromlib/fromfile) TOSTMF(&IMPF *TCAT &IMPFNAM) 
MBROPT(*REPLACE) RCDDLM(*CRLF)

My program used QCMDEXC so I am not sure whether the TOSTMF parameter 
will accept an expression, if it doesn't you can build this value in a single 
variable.

David Morris

>>> Evan Harris <spanner@ihug.co.nz> 03/17/99 12:28PM >>>
David, thanks for your reply

>CPYTOIMPF   FROMFILE(Lib/File Mbr)   TOSTMF('/QDLS/Folder/File.Ext')  +
>              MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM('"') FLDDLM(', ')
>CHGDOCD     DOC(File.Ext) FLR(Folder) DOCD('Message subject')
>SNDDST      TYPE(*DOC) TOINTNET((user@domain)) +
>              DSTD('Required distribution description') +
>              MSG('Message text') DOC(File.Ext) FLR(Folder)

This is basically what I attempted, but I haven't been able to get a handle
on what causes my output to look like garbage. In fact, your commands are
exactly what I *expected* ought to be the sequence for using this command.

The problem is that after the first copy, a file exists in QDLS that looks
to be full of rubbish characters when I examine it. I'm guessing it's some
kind of translation error, maybe to so with the code page or character set
or some parameter like that, but haven't been able to solve it so far.

At least your reply tells me I'm on the right track

Cheers
Evan Harris


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