PxPlus User Forum

Twitter Twitter Twitter

Author Topic: File maintenance panel creation for flat files,  (Read 3557 times)

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
File maintenance panel creation for flat files,
« on: July 24, 2018, 07:17:39 AM »
Hi,


 I have created a data dictionary, the physical files are placed in different folder based on company code. so i am using global variables in physical file path string for file access. how can i create file maintenance panel on nomads for such files.
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: File maintenance panel creation for flat files,
« Reply #1 on: July 24, 2018, 08:50:49 AM »
Not certain what you mean by 'Flat' files -- are you referring to Serial/text files?  If so the file maintenance system is designed to work with keyed files and not serial files.

If you do mean keyed files, then you should be able to set the global variable before running the file maintenance generator.  Once the pane/program is generated it will use whatever is in your global variables.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #2 on: July 25, 2018, 07:00:29 AM »

Hi Mike King,
    Thank you for the information. I meant data files in data dictionary here. I need one more solution from you that; its getting getting error as "File has no key defined in the data dictionary", when try to create file maintenance panel for the files in data dictionary. please help me
« Last Edit: July 25, 2018, 07:13:25 AM by Prajin P K »
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 280
    • View Profile
    • PVX Plus Technologies
Re: File maintenance panel creation for flat files,
« Reply #3 on: July 25, 2018, 09:01:11 AM »
File definitions in the data dictionary consist of field definitions and key definitions. It looks like you have not defined any key(s) for your file. If you load the file definition in Data Dictionary Maintenance, there is a Define Keys button on the toolbar that will allow you to specify the key(s) by which you can read the file. When you have finished defining keys, be sure to click the Update File button to add the new info into the file.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #4 on: July 25, 2018, 10:44:51 AM »

Hi Jane,
In existing application, we have defined key as given below.


XNUM=0 XA_ID+XB_NUMBER+XC_DATE+XD_TIME


When we try to define the key using nomads, we are not able to define in the above format. Not sure, how to define in existing format.. Please help..


Thank you,
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 280
    • View Profile
    • PVX Plus Technologies
Re: File maintenance panel creation for flat files,
« Reply #5 on: July 25, 2018, 02:57:52 PM »
When defining key for your file, click on the Define Keys button, which will invoke the Key Definition interface. Click New Key to add your primary key.


The Primary Key Definition interface will list the Data Fields for the file in a list box at the left. Add the fields that make up the key to the Key Segments list box by double clicking on the field name, or by highlighting it and clicking the Ascending or Descending button(depending on the desired sort order) to add it to segments. You can specify substrings and segment options by highlighting the key segment and clicking on the appropriate button. When all the key segments have been chosen, you can optionally give the the key a Key Name, and press OK to save the definition.


The Key Definition panel will now show the key definition. You can then add alternate keys for your file in a similar way.


This is documented at:
https://manual.pvxplus.com/page/Data%20Dictionary/Data%20Dictionary%20Maintenance/Defining%20Keys.htm
« Last Edit: August 17, 2018, 09:06:25 AM by Jane Raymond »
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #6 on: July 26, 2018, 07:33:14 AM »
Hi jane,


     What ever the data files we have, are copied from development machine to local. all keys are already defined there. its able to access those data files through coding. Problem here is not able to create file maintenance panel on nomads, popup showing message like "file has no keys defined". In Data Dictionary Maintenance tool, there data files are coming under group without any name (its mentioned none). when open a file, its not showing keys and asking to create keys when click on update file option. after creating a new key, on update its giving message like this:


"C:\PxPlus\devxx\daxx\xx\xxxxx contains 644 records.
It has undergone the following changes:
  Record size has increased.
  Key structure
new:[1:1:10]+[1:11:2]+[1:24:5]
old:[1:1:10]+[1:11:2]+[1:13:8]+[1:21:4]+[1:25:5],[1:25:5]+[1:13:8]+[1:21:4]+[1:283:1]
.File Type has been changed to Variable Length. "


After updating file its able to create panel, but on test its getting error #55: cannot locate statement label; with:


"Error occurred processing: PERFORM "*win/flmaint;init" ...."


We not able to identify the problem. please help us to find out the problem.


Thank you,
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 280
    • View Profile
    • PVX Plus Technologies
Re: File maintenance panel creation for flat files,
« Reply #7 on: July 26, 2018, 09:03:19 AM »
There are two steps to defining a file in Data Dictionary Maintenance. First is creating the file definitions, consisting of file attributes, elements and key definitions. This meta data is stored in providex.ddf and providex.dde files. Second is applying the definition to the file, i.e. pressing the Update File button which creates the file and keys and embeds the definition right into the actual physical file  It is only after both steps have been completed that the physical file can be processed properly.  As you found, after you pressed Update File you were able to generate the File Maintenance panel.


As for the error 55, try doing a LOAD "*win/flmaint" to see if you have access to the file.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #8 on: July 31, 2018, 05:21:53 AM »
Hi Jain,
   I am sorry, i don't know whether u already given answer for my this doubt; How can i copy data dictionary and related data files from one directory to another. when i copied, there is problem with defined keys. the problem is already mentioned above,
please let me know where is the wrong.


Thank you, 
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #9 on: August 03, 2018, 11:52:31 AM »
Hi team,


   Could you update your valuable input in this ticket.
[/size][/color]
[/size]Thanks,[/color]
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 296
    • View Profile
Re: File maintenance panel creation for flat files,
« Reply #10 on: August 03, 2018, 05:35:14 PM »
As Jane had suggested, "try doing a LOAD "*win/flmaint" to see if you have access to the file."

From command mode, type:
LOAD "*win/flmaint"

If the program loads, then there is something else that is the problem. If not, then be sure your PREFIX and/or Working Directory (lwd) and/or Home Directory (hwd) include the path to your PxPlus lib directory. Once that is set, you should be able to proceed.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services