× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You can specify file level keyword UNIQUE then your key fields will be unique. You can do this to same PF or you can create a separate LF for this


Regards,

Chamara Withanachchi
IBM Certified Power System Expert
RPG Programmer
(owner of www.rpgiv.info)

WWW.RPGIV.INFO
Mob: +971 50 5698644
Tel: +971 6 5595887
chamaraw@xxxxxxxxxx
www.rpgiv.info
i want to be future ready. i want control. i want an i.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: "lwl" <lwl@xxxxxxxxxxxxx>

Date: Wed, 25 Feb 2009 13:36:18
To: 'Midrange Systems Technical Discussion'<midrange-l@xxxxxxxxxxxx>
Subject: Specifying Unique keys


To the list.



This posting is a duplication of one sent to RPG400-l. I couldn't determine
which list was the proper place to post questions regarding DB2 so I'm
posting to both.



Here's an example of a file DSS created using STRPDM:



0009.00 A R WHE5FR TEXT('UPGRADES')


0011.00 A USHPNO 6 0 TEXT('SHIPMENT')


0012.00 A ULINENUM 4 0 TEXT('SALES ORDER LINE
NUMBER')

0013.00 A UUPGTYPE 1 TEXT('UPGRADE TYPE+


0014.00 A 1 = BEFORE
PACKING+

0015.00 A 2 = WHILE
PACKING')

0016.00 A UUPGNAME 20 TEXT('UPGRADE NAME')


0017.00 A UUPGSTAT 1 TEXT('UPGRADE STATUS+


0018.00 A A = ACTIVE+


0019.00 A C = COMPLETE')


0020.00 A UUPGDTE 8 0 TEXT('FOLLOWUP/COMPLETED
DATE')



I want to establish the fields at lines 11 and 16 as unique keys - for any
record inserted in the file these 2 fields must be unique to the file.



Specifically what coding is required to make this happen?





Roy Luce

Systems Plus - Midwest



Direct: 847-540-9635

800-913-PLUS (7587)

Cell: 847-910-0884

Email: rluce@xxxxxxxxxxxxxxxxxxx




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.