HERE IS MY CODE
*    SUBROUTINE CUS.DISPLAY.TEST
***
    PROGRAM CUS.DISPLAY.TEST
***
    $INSERT I_COMMON
    $INSERT I_EQUATE
    $INSERT I_F.CUSTOMER
***
    GOSUB INIT
    GOSUB OPENFILES
    GOSUB PROCESS
    RETURN
**
INIT:
    FN.CUS = 'FBNK.CUSTOMER'
    F.CUS = ''
    Y.CUS.ID = ''
    Y.MNEMONIC = ''
    Y.NATIONALITY = ''
    R.CUSTOMER = ''
    CUS.ERR1 = ''
***
    FN.EX = "FILE.EXTRACT"
    FV.EX = ""
    OPEN FN.EX TO FV.EX ELSE OPEN.ERROR = -1
    CUS.DATA = ''
    CUS.DATA<-1> = "CUSTOMER ID*MNEMONIC*NATIONALITY"
    RETURN
OPENFILES:
*****
    CALL OPF(FN.CUS,F.CUS)
    RETURN
PROCESS:
***
    CRT "ENTER YOUR CUSTOMER ID :"; INPUT Y.CUS.ID

    CALL F.READ(FN.CUS,Y.CUS.ID,R.CUSTOMER,F.CUS,CUS.ERR1)
    Y.MNEMONIC = R.CUSTOMER<EB.CUS.MNEMONIC>
    Y.NATIONALITY = R.CUSTOMER<EB.CUS.NATIONALITY>
    CUS.DATA<-1> = Y.CUS.ID:'*':Y.MNEMONIC:'*':Y.NATIONALITY
***
* CRT "Customer Id: ":Y.CUS.ID
* CRT "Customer Mnemonic: ":Y.MNEMONIC
* CRT "Customer Nationality: ":Y.NATIONALITY
****
WRITE CUS.DATA TO FV.EX, "CUS.INFO" ON ERROR WRITE.ERR = -1
     RETURN
     RETURN
 END

On 2/25/13, Dick Thiot <[email protected]> wrote:
> What type of file are you accessing?  There are different solutions for the
> different file types.  If the CustomerID is the key to the file and you are
> using a "hashed" file then your data shouldn't be overwritten using
> different CustomerIDs since hashed files require a unique key field and
> store the data (record) into the file based on that key field.  If you are
> using a flat (O/S) file then the OPENSEQ and WRITESEQ statements are
> appropriate.
>
>
> On Mon, Feb 25, 2013 at 7:29 AM, Daniel Klein
> <[email protected]>wrote:
>
>> rec1<-1> = rec2
>>
>> Dan
>>
>>
>> On Mon, Feb 25, 2013 at 3:18 AM, Neeraj <[email protected]> wrote:
>>
>>> How to Append Data to the End of Existing File using infobasic?
>>>
>>> scenario:
>>>
>>> currently when i enter the customer id, 193577 , then the related data
>>> to
>>> the Customer id is retrieved and write to a file . and then again when i
>>> run the same program and give another customer id , 193588 then the
>>> previous data was overwrite by new one.
>>> but i would like to append  all the data in same file.
>>> How it will be possible?
>>>
>>> Please Suggest me with solution.
>>>
>>> Regard
>>> Neeraj
>>>
>>>  --
>>> --
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>
>>> To post, send email to [email protected]
>>> To unsubscribe, send email to [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/jBASE?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> --
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>
>> To post, send email to [email protected]
>> To unsubscribe, send email to [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/jBASE?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
> --
> --
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


--

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to