concatenation of two PRN files

Discussions about CSEntry
Post Reply
khurshid.arshad
Posts: 618
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

concatenation of two PRN files

Post by khurshid.arshad »

Dear Gregory

I have concatenate two PRN files in another new PRN file. I need your advice on concatenation of two PRN files. Is this procedure is fine or you have better idea. For reference file is attached.

1st Dictionary Name is "Name"
2nd Dictionary Name is "Age"
3rd Dictionary Name is "Concat" for new PRN file.

Regards.
a.
You do not have the required permissions to view the files attached to this post.
Gregory Martin
Posts: 1947
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: concatenation of two PRN files

Post by Gregory Martin »

What you did is not what I was thinking about. If you PRN file is too long, you can split half the columns into one file:

Val1,Val2,Val3

And the other columns in another file:

Val4,Val5,Val6

You can just read in the files as text files (using the fileread command, not loadcase), and manipulate them that way:
file input1,input2,output;
alpha (300) str1,str2;

// ...

while fileread(input1,str1) and fileread(input2,str2) do
    
filewrite(output,concat(strip(str1),strip(str2)));
enddo;
khurshid.arshad
Posts: 618
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: concatenation of two PRN files

Post by khurshid.arshad »

Dear Gregory
Done. Thankssssssssss.
a.
Post Reply