You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Applicatin enginee error

3 replies [Last post]
Guest's picture
Guest

HI,
I am getting following error while uploading a file through file layout in appengine from from end.
Though its working fine fron backend....
error message is as follows...........

PeopleTools 8.49.07 - Application Engine
Copyright (c) 1988-2010 PeopleSoft, Inc.
All Rights Reserved

Open of file Z:\PSCustom\name.csv failed: No such file or directory. (2,633) AP_PB3.MAIN.GBL.default.1900-01-01.Step01.OnExecute PCPC:3719 Statement:57

Process 21171 ABENDED at Step AP_PB3.MAIN.Step01 (PeopleCode) -- RC = 8 (108,524)

Process %s ABENDED at Step %s.%s.%s (Action %s) -- RC = %s

pavanig's picture
User offline. Last seen 8 years 24 weeks ago. Offline
Joined: 06/16/2010
Posts: 3
Re: Applicatin enginee error

Since the file location u have specified in the AE is from your local machine you r able to run it successfully in 2-tier . Please try keeping the file on FTP and then run the AE frm frnt end.
if still the problem persists, please post the code on the forum

PARITOSH's picture
User offline. Last seen 8 years 1 week ago. Offline
Joined: 06/16/2010
Posts: 19
Re: Applicatin enginee error

Hi,
I HAD PUT MY FILE ON FTP IN E DRIVE,STILL THE SAME ERROR.
\\172.17.106.86\Share\name
in E DRIVE
----------------------------------------------------------------------------------------------
Function EditRecord(&REC As Record) Returns boolean;
Local integer &E;
REM &REC.ExecuteEdits(%Edit_Required + %Edit_DateRange + %Edit_YesNo + %Edit_TranslateTable + %Edit_PromptTable + %Edit_OneZero);
&REC.ExecuteEdits(%Edit_Required + %Edit_DateRange + %Edit_YesNo + %Edit_OneZero);
If &REC.IsEditError Then
For &E = 1 To &REC.FieldCount
&MYFIELD = &REC.GetField(&E);
If &MYFIELD.EditError Then
&MSGNUM = &MYFIELD.MessageNumber;
&MSGSET = &MYFIELD.MessageSetNumber;
&LOGFILE.WriteLine("****Record:" | &REC.Name | ", Field:" | &MYFIELD.Name);
&LOGFILE.WriteLine("****" | MsgGet(&MSGSET, &MSGNUM, ""));
End-If;
End-For;
Return False;
Else
Return True;
End-If;
End-Function;

Function ImportSegment(&RS2 As Rowset, &RSParent As Rowset)
Local Rowset &RS1, &RSP;
Local string &RecordName;
Local Record &REC2, &RECP;
Local SQL &SQL1;
Local integer &I, &L;
&SQL1 = CreateSQL("%Insert(:1)");
&RecordName = "RECORD." | &RS2.DBRecordName;
&REC2 = CreateRecord(@(&RecordName));
&RECP = &RSParent(1).GetRecord(@(&RecordName));
For &I = 1 To &RS2.ActiveRowCount
&RS2(&I).GetRecord(1).CopyFieldsTo(&REC2);
If (EditRecord(&REC2)) Then
&SQL1.Execute(&REC2);
&RS2(&I).GetRecord(1).CopyFieldsTo(&RECP);
For &L = 1 To &RS2.GetRow(&I).ChildCount
&RS1 = &RS2.GetRow(&I).GetRowset(&L);
If (&RS1 <> Null) Then
&RSP = &RSParent.GetRow(1).GetRowset(&L);
ImportSegment(&RS1, &RSP);
End-If;
End-For;
If &RSParent.ActiveRowCount > 0 Then
&RSParent.DeleteRow(1);
End-If;
Else
&LOGFILE.WriteRowset(&RS);
&LOGFILE.WriteLine("****Correct error in this record and delete all error messages");
&LOGFILE.WriteRecord(&REC2);
For &L = 1 To &RS2.GetRow(&I).ChildCount
&RS1 = &RS2.GetRow(&I).GetRowset(&L);
If (&RS1 <> Null) Then
&LOGFILE.WriteRowset(&RS1);
End-If;
End-For;
End-If;
End-For;
End-Function;

rem *****************************************************************;
rem * PeopleCode to Import Data *;
rem *****************************************************************;
Local File &FILE1;
Local Record &REC1;
Local SQL &SQL1;
Local Rowset &RS1, &RS2;
Local integer &M;

&FILE1 = GetFile("E:\share\name.csv", "r", "a", %FilePath_Relative);
&LOGFILE = GetFile("E:\share\name.csv.err", "W", %FilePath_Relative);
&FILE1.SetFileLayout(FileLayout.FL_PB);
&LOGFILE.SetFileLayout(FileLayout.FL_PB);
&RS1 = &FILE1.CreateRowset();
&RS = CreateRowset(Record.RECORD123);
&SQL1 = CreateSQL("%Insert(:1)");
&RS1 = &FILE1.ReadRowset();
While &RS1 <> Null;
ImportSegment(&RS1, &RS);
&RS1 = &FILE1.ReadRowset();
End-While;

&FILE1.Close();
&LOGFILE.Close();
----------------------
ERROR MESSAGE
-----------------------------------
Open of file C:\DOCUME~1\289415\LOCALS~1\Temp\E:\share\name.csv failed: Invalid argument. (2,633) AP_PB3.MAIN.GBL.default.1900-01-01.Step01.OnExecute PCPC:3711 Statement:57
Message Set Number: 2
Message Number: 633
Message Reason: Open of file %1 failed: %2. (

PARITOSH's picture
User offline. Last seen 8 years 1 week ago. Offline
Joined: 06/16/2010
Posts: 19
Re: Applicatin enginee error

Neverthless got the output...........
For beginners : While trying to run Ap eng from front end using file layout u need to save the file on server and not on local machine......