Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cpytoimppf

Status
Not open for further replies.

kaysweet

Programmer
Apr 24, 2005
5
US
Hi all,

I am trying to convert a pf into a comma delimeted file. This command is working but the problem is if there are unused spaces, it is putting blank spaces like this:
abc ,cdefg , ,hijkl,mnop ,v
Is there a command/option or a better way to handle the output that is required like this:
abc,cdefg,,hijkl,mnop,v
The only alternative that i know of is to write an rpg pgm that will read the file and concatenate and trim the fields and output in a flat file. Maybe someone knows of a better way to achieve the results i need, please help.. Thank you and i appreciate it. Have a nice day.

 
Do you have the DDS for the PF? If you do, could you do a simple file transfer into the PF??

 
We used several perl and java programs to manage files under the QSH environment. these programs can strip blank spaces and
also send receive ftp files. There are a lot of functionality that we have written in either perl or java because it is too cumbersome to write in RPG. Also when we installed SQR language application in our system, we were able to do almost anything with files and printing. we use SQR to print high graphic printing such as micr, checks & signatures, logos, boxes etc.
 
Thank you both for responding.

I have a DDS for the PF that I want to transfer to a document that is comma delimited. The problem is there are spaces for the unused character on the field. The other system that is going to get the document requires the spaces to be removed. That is how they send the file. The CPYFRMIMPF works with no problem loading the document to a PF. But when I do the transfer again of the refreshed data back to the document using the CPYTOIMPF, it contains spaces.

I hope there are more ways to do it besides creating an RPG. I have almost 100 fields on the file to concatenate and %trim.

Thanks agian :)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top