If the data for the ID of the destination file is in attribute 29 of the
source file then, yes, change line 0007 to:

destination_id = source_rec<29>

As far as the other issue, what you describe is (I believe) what the
program is doing. I suggest you run the program and see if it creates the
correct record structure in the destination file.

Dan




On Tue, Apr 8, 2014 at 10:10 PM, <[email protected]> wrote:

> Wow, thanks Dan - this will be great if I can get it working.  Can you
> stomach some dumb noob follow-up questions?
>
> 0001     OPEN 'SOURCE' TO source_file ELSE STOP
>> 0002     OPEN 'DESTINATION' TO destination_file ELSE STOP
>> 0003     IF SYSTEM(11) ELSE CRT 'SAVE-LIST required from SOURCE file
>> sorted by ID'; STOP
>> 0004     LOOP
>> 0005         READNEXT source_id ELSE EXIT
>> 0006         READ source_rec FROM source_file, source_id THEN
>> 0007             destination_id = source_rec<1> ;* assumes the data us in
>> attribute 1
>>
>> *** Got this far and didn't know what to use for the destination ID - I
>> am creating a new file, how do I establish the destination ID? I know the
>> source file record label and ID from existing documentation, but I don't
>> know how to set the ID and record label in a new file.
>>
>
>
>> And the data from the source file that will end up the record key in the
>> destination file in is in attribute 29 - so I assume I should use  
>> source_rec<29>
>> instead of source_rec<1> here?
>>
>
>
>> 0008             IF destination_id # '' THEN
>> 0009                 READ destination_rec FROM destination_file,
>> destination_id ELSE destination_rec = ''
>>
>> *** Same issue - how do I establish the destination_rec label in a new
>> file I create?
>>
>> 0010                 destination_rec<1,-1> = source_id  ;* assumes you
>> want the data in attribute 1
>>
>
>
>> *** I want the unique values for attribute 29 in the source going into
>> attribute 0 - the record key - in the destination, and attribute 0 from the
>> source multivalued in attribute 1 in the destination.  Is this line placing
>> source 0 in destination 1?  If so, then yes, I want the data in attribute 1.
>>
>
>
>> 0011                 WRITE destination_rec ON destination_file,
>> destination_id
>> 0012             END
>> 0013         END
>> 0014     REPEAT
>>
>> Thanks!
>
>
> --
> --
> 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/d/optout.
>

-- 
-- 
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/d/optout.

Reply via email to