0

There is a ProgramCall which when run writes a PF in the QTEMP file. I want to access that PF inside the QTEMP but it says CPF3012 FIle not found in QTEMP Library. Since each job has its own QTEMP. Is it possible to track down the PF created in the QTEMP of the ProgramCall job. If yes then please suggest how to do it using JTOPEN/Java.

jmarkmurphy
  • 11,030
  • 31
  • 59
Alok
  • 929
  • 10
  • 26

1 Answers1

1

ProgramCall and jdbc access from Java use different jobs, even if you use the same jt400 connection. So you can't access to the same QTEMP if you want to use SQL. Perhaps if you use another ProgramCall to access your file ? The job will be the same.

Dam
  • 986
  • 1
  • 14
  • 20
  • Thanks for the reply. Can you suggest a code snippet how to access the file using the ProgramCall?? – Alok Dec 20 '18 at 08:36
  • To process you file, you have to write a CL or RPG program and call it via programCall... You can't process the file on the Java side with this method ! There are also methods in jt400 to access file by other ways than SQL, via record access. But don't know if it use the same job as ProgramCall. [Record access][1] Can't you write your file elsewhere than QTEMP ? [1]: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzahh/javadoc/com/ibm/as400/access/doc-files/RLReadFileExample.html – Dam Dec 20 '18 at 14:42
  • Or encapsulate your initial program in a CL and move the file in another library... And delete the file after you process it with your Java program. A little bit dirty.. – Dam Dec 20 '18 at 14:43