PeopleSoft NA Payroll or HCM Functional Training:

PeopleSoft NA Payroll or HCM Functional Training:

Please send email to nandu.peoplesoft@gmail.com for enrolling the course or call me @8897575066. Please see below HCM Functional training AGENDA.

Payroll for North America training AGENDA.

This is an online Functional Training. Training goes through webex and explain you with real time execution of processes with examples. Recordings and documentation will be given once the training is done.

Friday, January 31, 2014

Convert Tab file to CSV and Load - From PeopleSoft Blog

If you got a tab limited file and want to read it as a CSV file, using the file layout, use the below code snippet.

Local File &TABFILE, &CSVFILE;
Local string &FILE_NAME, &DATA, &NEWDATA;

&FILE_NAME = "Test.txt";
&TAB = Char(9);

&TABFILE = GetFile(&FILE_NAME, "r");
&FileName = &TABFILE.Name;
&POS = Find(".", &FileName);
&NEWFILE_NAME = Substring(&FileName, 1, &POS) | "dat";
&CSVFILE = GetFile(&NEWFILE_NAME, "N", %FilePath_Absolute);
If &TABFILE.IsOpen And
&CSVFILE.IsOpen Then
While &TABFILE.ReadLine(&DATA);
&NEWDATA = Substitute(&DATA, &TAB, ",");
&CSVFILE.WriteLine(&NEWDATA);
End-While;
&TABFILE.Close();
&CSVFILE.Close();
End-If;

Will be handy...