Regarding the 2nd part of that with the CPYTOSTMF, does that give any 'conversion/transform' options or would I be better off using CPYTOIMPF.
Also, just as an observation, it would be really nice if there was a resource somewhere that explained the appropriate times to use each of these copy options, and scenarios :) It would be helpful.
Original Message:
Sent: Thu July 18, 2024 01:46 AM
From: Sylvain Manceau
Subject: Assistance Needed: Creating a Workstation Customizing Object for CPYSPLF to Stream File Without Print Control Characters
Hi,
Did you try to use CPYTOSTMF with a 2-step process? It comes with some options, including end-line limiters and table-based conversion.
First, copy your file to QTEMP using CPYSPLF, then use CPYTOSTMF.
Exemple code:
CPYSPLF FILE(MYFILE) TOFILE(QTEMP/MYFILE) SPLNBR(*LAST)
CPYTOSTMF FROMMBR('/QSYS.LIB/QTEMP.LIB/MYFILE.FILE/MYFILE.MBR') TOSTMF('/textfiles/mydoc.txt') STMFOPT(*REPLACE)
------------------------------
Sylvain Manceau
Original Message:
Sent: Tue July 16, 2024 07:08 PM
From: Randy Stevenson
Subject: Assistance Needed: Creating a Workstation Customizing Object for CPYSPLF to Stream File Without Print Control Characters
Hello IBM i Community,
I hope this message finds you well. I am currently working on an IBM i 7.3 system and facing an issue with the CPYSPLF
command when copying spooled files to stream files. Specifically, when using the QWPDEFAULT
workstation customizing object (WSCST), I encounter unwanted print control characters such as a NUL character at the beginning of Line 1 and an FF (form feed) control character every 51 lines.
To provide some context, here is what I am trying to achieve:
- Objective: Copy spooled files to stream files without including any print control characters.
- Current Approach: Using
CPYSPLF
with QWPDEFAULT
.
Here is a snippet of the command I am currently using:
CPYSPLF FILE(MYDOC) JOB(123456/USER1/PROCESS1) SPLNBR(*LAST) TOFILE(*TOSTMF) TOSTMF('/textfiles/mydoc.txt') WSCST(QSYS/QWPDEFAULT)
Issue
The resulting document includes:
- A NUL character at the beginning of Line 1.
- An FF control character every 51 lines.
Request
Could anyone provide guidance or best practices on how to create or modify a workstation customizing object so that these unwanted print control characters are not included in the stream file?
Any scripts, detailed steps, or examples would be greatly appreciated.
Thank you in advance for your assistance!
Best regards,
Randy
------------------------------
Randy Stevenson
MWI Animal Health
------------------------------