Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with Interpreting Code

Status
Not open for further replies.

david52

Programmer
Jan 18, 2006
6
US
Hello All,
I have some old Paradox code that I am trying to interpret so that I can rewrite it in VB. I know nothing about Paradox. Where can I find a syntax manual or PAL manual for Paradox? I just need to understand the one program.

Thanks in Advance,
David
 
Is this Paradox for Windows, or Paradox for DOS?

Either way, which version.

Likely you can find what you are looking for on Steve Green's site:


The least expensive you are likely to find, unless you come across someone who happens to have a copy they'll just give you for cost of shipping (good luck on that).





Tony McGuire
"It's not about having enough time. It's about priorities.
 
Thanks! Actually if someone could answer one question then perhaps I wouldn't need a reference manual. The code:

qry = Query
ANSWER: :pRIV:primClas.db
:STIMECRD:dbo.PREMST|EMPNUM|EMGRD| |_3 |_2|
:STIMECRD:dbo.PRECLS|ECEMPNUM|ECGCOD|ECEDAT |ECPRIM|ECSCOD |Check_3|_2 |calc MAX as latest|Y |NOT D..|

Now I think the code is querying a SQL database and storing the results in PrimClas.db (Paradox Table?) My question is..."What are the _3 and Check_3 parameters? I am also a little fuzzy on NOT D..



 
_2 and _3 are field names in the table being queried, Not D.. says exclude any string that starts with the letter "D"

 
Actually, that COULD be an SQL type database, now that I look at the alias+tablename

It is a QBE, however.

The _3 and _2 *should* be example elements.

To try to line things up, and maybe make better sense:
Code:
qry = Query
ANSWER: :PRIV:PrimClas.db
:STIMECRD:dbo.PREMST |  EMPNUM  |  EMGRD  |
                     |  _3      |  _2     |

:STIMECRD:dbo.PRECLS | ECEMPNUM |   ECGCOD |
                     | Check  _3|   _2     |

:STIMECRD:dbo.PRECLS |  ECEDAT             | ECPRIM|  ECSCOD  |
                     |  calc MAX as latest | Y     |  NOT D.. |




Tony McGuire
"It's not about having enough time. It's about priorities.
 
I think the "_3" and "_2" are values to be used as criteria for selecting records in the table. I was wondering what does the "Check _3" as opposed to "_3" mean?
 
NO!

The _2 and _3 are elements to match values in those fields from each table. Only include records where ECEMPNUM and EMPNUM contain the same values, and where ECGCOD and EMGRD have the same value.

It could have been written as
Code:
qry = Query
ANSWER: :PRIV:PrimClas.db
:STIMECRD:dbo.PREMST |  EMPNUM  |  EMGRD  |
                     |  _A      |  _B     |

:STIMECRD:dbo.PRECLS | ECEMPNUM |   ECGCOD |
                     | Check  _A|   _B     |

:STIMECRD:dbo.PRECLS |  ECEDAT             | ECPRIM|  ECSCOD  |
                     |  calc MAX as latest | Y     |  NOT D.. |

Starting a value in the field in a query with an underscore indicated a JOIN element, generally.

'Check' means to include the field in the answer table, with unique values (only one of each, not every instance) included in the response. 'Calc Max..' means for each of those values, calculate the max value in that field.

'Not D..' means "do NOT include records that have a value that 'STARTS WITH' D in this field".

The 'Y' is the same; "do not include records with a "Y" value in this field".


Tony McGuire
"It's not about having enough time. It's about priorities.
 
Thanks Tony. The only confusing point is the "Y". You are saying that "Y" and "NOT Y.." is the same? Or is "Y" the value to include?
 
'Y' is the value to include.

'NOT Y' would be 'do not include records with a Y value'.

Sorry, the 'not' should NOT have been there :)


Tony McGuire
"It's not about having enough time. It's about priorities.
 
Hey Tony,
Maybe you can help me with another Paradox command. It is the importAsciiFix command. The importAsciiFix command in this program has three parameters. All three appear to be file names. Can you tell me what the parameters of this command represents?
 
Yea, I have found the answer to may question. You have been a great help in my interpretation of this code, so that it can be ported to VB.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top