[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pointer math (merging ifs files)



Sender: Magne Kofoed <magne@xxxxxxxxx>

Hi,

I am trying to merge 3 ifs files to a user space.

1.  s_data = pointer to ifs file nbr 1

eval      xf = open(%trimr(stmf1):
                    O_RDONLY + O_TEXTDATA)
if        read(xf: s_data: st_size) < st_size

2.  p_data = pointer to ifs file nbr 2
eval      sf = open(%trimr(stmf2):         
                    O_RDONLY + O_TEXTDATA)
if        read(sf: p_data: st_size) < st_size

3.  e_data = pointer to ifs file nbr 3
eval      ef = open(%trimr(stmf3):
                    O_RDONLY + O_TEXTDATA)
if        read(ef: e_data: st_size) < st_size


4.  u_data = pointer to a user space

How can I put the ifs data in the user space?
eval u_data = s_data + p_data + e_data  is not allowed (I get 
a compile error).

What I really needs to do is to insert xml (file 1) in front 
of file2 and add xml (file3) to the end of file2.

I can use the lseek() api (SEEK_END) to add xml to the end of 
file2, but is it possible to insert xml to the start of file2?

I have read Scott's web article 
http://www.scottklement.com/rpg/pointers.html
and iSeries News article about IFS and Binary Stream Files 
and it's excellent reading!


Best regards
Magne



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------