Question

I have two pdf files and two text files which are converted into ebcdif format. The two text files acts like cover files for the pdf files containing details like pdf name, number of pages, etc. in a fixed format.

Cover1.det, Firstpdf.pdf, Cover2.det, Secondpdf.pdf

Format of the cover file could be:

Firstpdf.pdf|22|03/31/2012

that is

pdfname|page num|date generated

which is then converted into ebcdic format.

I want to merge all these files in a single file in the order first text file, first pdf file, second text file, second pdf file.

The idea is to then push this single merged file into mainframes using scp.

1) How to merge above mentioned four files into a single file?

2) Do I need to convert pdf files also in ebcdic format ? If yes, how ?

3) As far as I know, mainframe files also need record length details during transit. How to find out record length of the file if at all I succeed in merging them in a single file ?

I remember reading somewhere that it could be done using put and append in ftp. However since I have to use scp, I am not sure how to achieve this merging.

Thanks for reading.

Was it helpful?

Solution 2

File merging could easily be achieved by using Cat command in unix with > and >> append operators.

Also, if the next file should start from a new line (as was my case) a blank echo could be inserted between files.

OTHER TIPS

1) Why not use something like pkzip?

2) I don't think converting the pdf files to ebcdic is necessary or even possible. The files need to be transfered in Binary mode

3) Using pkzip and scp you will not need the record length

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top