DDM file
Last Post 27 Jun 2002 09:17 AM by Lynne Noll. 10 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Eric Wasek
Basic Member
Basic Member
Posts:88

--
27 Jun 2002 03:59 AM
Hello.. Can anyone tell me how to copy (new) records from a PF on an other AS400 using DDM and the CPYF statement without retrieving the deleted records ? Kind regards, Eric
Lynne Noll
Senior Member
Senior Member
Posts:6567

--
27 Jun 2002 09:17 AM Accepted Answer
I don't know how you can use this method to copy a file and GET the deleted records. It will automatically leave them out. On the receiving system: CRTDDMF FILE(QTEMP/MYDDMF) RMTFILE(MYLIB/MYFILE) RMTLOCNAME(myrmtsys) CPYF QTEMP/MYDDMF TOFILE(NEWFILELIB/NEWFILE) CRTF(*YES) MBROPT(*REPLACE) This is a fairly slow way of sending a whole file: if you do the CPYF on the local system, you can send a deleted record free file with SNADS or TCPIP.
Eric Wasek
Basic Member
Basic Member
Posts:88

--
27 Jun 2002 10:32 PM Accepted Answer
Thanx Lynne.. Well the initial copy of the file is OK (CRTF(*YES)) but the copies to add new records also adds the deleted records to my receiving file (I use FROMRCD filled with the local file RRN which I saved the last time I copied the file). I use COMPRESS(*YES) and the local file is defined REUSEDLT(*NO). Kind Regards, Eric
Lynne Noll
Senior Member
Senior Member
Posts:6567

--
28 Jun 2002 09:25 AM Accepted Answer
Strange, I ran this with a relative record number, and the deleted records were gone. The default is to compress the out the deleted records, and that is what I used. The receiving file was reuse *no. Then I ran it with compress *NO and got the deleted records. Then I tried it with compress *YES and did not get them. Any chance the compress value is not actually *YES in the program? Also, if you are adding to an existing file, the copy will not get rid of any deleted records already in it.
Jeffrey Herman
Veteran Member
Veteran Member
Posts:3514

--
30 Jun 2002 02:22 PM Accepted Answer
Eric, for accessing objects (files) between iSeries, take a look at the /QfileSvr.400 file system. This filesystem was developed for accessing objects on another iSeries. It works with both TCP/IP and SNA. The fastest and most reliable way of transferring objects between 2 iSeries is by using the SAVRSTOBJ command (SNA). You find more information in the "Backup and Recovery guide", search for "Object connect".
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
30 Jun 2002 06:29 PM Accepted Answer
...some applications go by the controversial technique of "Adopted Authority" Since when is AA controversial? According to Wayne Evans, architect of OS/400 security, this is a great technique for securing data. Just read his security books or at least the 2 most recent issues of iSeries News. What techniques do you use for application and file security on the AS/400? Chris
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
01 Jul 2002 06:33 AM Accepted Answer
Controversial simply means some are for it and some against it. Both have their own reasons that are a result of their own circumstances. In my last shop it was all AA and DDM files were disbanded outright. The one before that disbanded AA and had DDM files jumping from one box to other all over the world. What technique did they use? Pretty primitive you would say. They had different boxes for different environments. In consulting environment it is very dangerous to say if a certain technique is good or bad. Clients get offended. We can give options per our experience but have to "Adopt as per their Authority" :)
Lynne Noll
Senior Member
Senior Member
Posts:6567

--
01 Jul 2002 09:51 AM Accepted Answer
When I ran some checks (because of errors in an application when I restricted authority), DDM seemed to use the QUser profile to access files on the remote AS400, whatever the authority of the initiating user. I don't know if this can be changed somewhere, but QUser seems to be the default, and you cannot specify the remote user id on the CRTDDMF. This sets up CRTDDMF as a way for programmers with no authority to production data but command line access on developmental machines to access production data. Hmmn... However, in this particular case, DDMF/CPYF may well be good enough. Given the security holes in most of the I Series shops out there, this authority discussion is causing snickers.
Eric Wasek
Basic Member
Basic Member
Posts:88

--
03 Jul 2002 12:10 AM Accepted Answer
Hiya Lynne... Thanx for your reaction..I am very sure compress(*YES) is defined in the program. It seems it does not work when I define the CPYF MBROPT(*ADD) but works fine when I use MBROPT(*REPLACE)..but that is not really what I want.. I think I will use a TRIGGER now....
Eric Wasek
Basic Member
Basic Member
Posts:88

--
03 Jul 2002 12:19 AM Accepted Answer
Thanks Herman, I think this is a very useful solution....... Kind regards, Eric
Lynne Noll
Senior Member
Senior Member
Posts:6567

--
03 Jul 2002 01:49 PM Accepted Answer
Wierd. I did do it with add, and it seemed to work fine. But I did not do it in a program: I just did it from the command line. If you trigger the adds and deletes, you will still get the deleted records. You might as well do the CPYF and then reorganize the resulting file.
You are not authorized to post a reply.

Acceptable Use Policy