Hello!
First of all, sorry if my question sounds stupid... I'm just new to the AS400 world, so I'm not very familiar with it. In fact, this is my first post. I come from the Unix world so there are some things that I don't know how to do it in the AS400 environment. Ok... I will try to describe the scenario in order to clarify my problem. Sorry if the post is a little large.
We have an application written in C for encryption of files. This application generates a binary encrypted file with certain characteristics from any source file. We want to use this application in order to encrypt our backups in the AS400 evironments. So, I ported the application to an AIX system and then copy the generated binary to the AS400. By using the PASE framework in the AS400 (call qp2term), the application works without any problem. The idea is that the sysadmins of the AS400 generates the backups as a SAVF file in the /qsys.lib path, and then I encrypt the generated files by using my application. After that, the encrypted file must be copied to the tapes, which is responsability of the sysadmins. And now my questions...
Thank you in advance!
Novice400
First of all, sorry if my question sounds stupid... I'm just new to the AS400 world, so I'm not very familiar with it. In fact, this is my first post. I come from the Unix world so there are some things that I don't know how to do it in the AS400 environment. Ok... I will try to describe the scenario in order to clarify my problem. Sorry if the post is a little large.
We have an application written in C for encryption of files. This application generates a binary encrypted file with certain characteristics from any source file. We want to use this application in order to encrypt our backups in the AS400 evironments. So, I ported the application to an AIX system and then copy the generated binary to the AS400. By using the PASE framework in the AS400 (call qp2term), the application works without any problem. The idea is that the sysadmins of the AS400 generates the backups as a SAVF file in the /qsys.lib path, and then I encrypt the generated files by using my application. After that, the encrypted file must be copied to the tapes, which is responsability of the sysadmins. And now my questions...

- If I try to generate the encrypted file inside the same path of the source SAVF file inside the /qsys.lib, the application breaks and it is not possible to generate such file. I suspect (I'm not sure) that AS400 dislikes the format of my binary encrypted file, since if I perform a simple echo "hello world" > encdata.file in /qsys.lib the system truncates the content of the file. Is the format of the binary encrypted file the problem and the reason why the application can't generate the destination file?
- We have tried to encrypt a SAVF file from /qsys.lib to /tmp in order to avoid the previous problem, and it works without any problem. However, if we consider the decryption.. that is to decrypt a file from /tmp to /qsys.lib the process is very very very slow. In fact, if I just only copy a file of 11GB from /tmp to /qsys.lib it needs about 45 minutes. However if I copy the same file from /tmp to /tmp (with a different name), the process just only need 6 minutes. Therefore, this proofs that there isn't a problem related with the storage/disks. Does anyone knows if there is a way to improve the speed of this process, and if it is normal that the process of copying from /tmp to /qsys.lib is slow?
- As an alternative, we are planning to migrate the application and use the crypto API of the AS400 directly (i.e. Qc3EcryptData, etc...). Does anyone know if it is possible to use the crypto API in order to generate an encrypted SAVF file directly? That is... by avoiding to generate the SAVF file first, and then to encrypt it? Is there any example code as a starting point?
Thank you in advance!
Novice400




We use v5r4, is this the cause why we don't get the same type of error messages?
Comment