T24 : Local references

1,620 views
Skip to first unread message

hareendra seneviratne

unread,
Feb 17, 2010, 11:51:39 PM2/17/10
to jB...@googlegroups.com
Hi all,
 
I want to extract T24 table to a text file. In the output of my routine, all local reference fields are recognized as one single field. example record :
 
SHORT.NAME|MNEMONIC| ...........  | LOCAL1^ LOCAL2^ LOCAL3 ^LOCAL 4| .....
 
I want the output to be like
 
SHORT.NAME|MNEMONIC| ...........  | LOCAL1| LOCAL2 |LOCAL3 | LOCAL 4| ....
 
I use the below mentioned code.
 
 
 LOOP
        REMOVE CUSTID FROM CUSTLIST SETTING MORE
    WHILE CUSTID:MORE
        CUSTREC = ''; CUSTERR = ''
        CALL F.READ(FN.CUS,CUSTID,R.CUS,FP.CUS,CUSTERR)
 
         CONVERT FM TO '|' IN R.CUS
        CONVERT VM TO '^' IN R.CUS
       CONVERT SM TO '%' IN R.CUS
       
        WRITESEQ R.CUS TO NDB.CUST ELSE PRINT "ERR"
   
 REPEAT
 
 
What might've gone wrong???
 
Many thanks for your kind replies...  
 
 

JOSE L MARTINEZ-AVIAL

unread,
Feb 18, 2010, 12:53:43 AM2/18/10
to jb...@googlegroups.com
The Local Ref fields of a table are not really fields(separated by FM), but subfields (separated by @VM) in a field. So the output you got is consistent with the program you made. All the fields are separated by '|', and the subfields in Local Ref are separated with '^'. You may want to rethink how you are extracting that information.

JL

2010/2/17 hareendra seneviratne <haree...@gmail.com>
 

--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines
 
IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Anureka Rajesh

unread,
Feb 18, 2010, 3:23:07 AM2/18/10
to jb...@googlegroups.com
Immediately after reading customer record., do the following
CONVERT VM TO '|' IN R.CUS<EB.CUS.LOCAL.REF>
 
This will solve your issue

 

--

praveen kumar

unread,
Feb 18, 2010, 7:34:22 AM2/18/10
to jb...@googlegroups.com
Hi,

Actually Local reference is single field only.

what you need to do is only a small work around. before converting the
multi value to '^' , you need to get the position of LOCAL.REF and
convert the multivalue in R.CUST(LOCAL.REF.POS) to '|' .

hope this might help you.

Thanks & Regards,
Praveen

On Thu, Feb 18, 2010 at 10:21 AM, hareendra seneviratne
<haree...@gmail.com> wrote:

jaro

unread,
Feb 18, 2010, 4:18:48 PM2/18/10
to jBASE
why are you converting the VM and SM to different values when you want
the '|' delimiter?

CONVERT VM TO '^' IN R.CUS
CONVERT SM TO '%' IN R.CUS

you should do the same as for FM like
CONVERT FM:VM:SM to "|||" IN R.CUS

hareendra seneviratne

unread,
Feb 19, 2010, 4:21:06 AM2/19/10
to jb...@googlegroups.com
Hi all,
 
Many thanks for ur replies....
I modified the loop as and it works for me. What I did was converting the VM in local reference first and then ament it to the final result.
 
  CURR.LOCAL.REF=''

    LOOP
        REMOVE CUSTID FROM CUSTLIST SETTING MORE
    WHILE CUSTID:MORE
        CUSTREC = ''; CUSTERR = ''
        CALL F.READ(FN.CUS,CUSTID,R.CUS,FP.CUS,CUSTERR)
        CURR.LOCAL.REF = R.CUS<EB.CUS.LOCAL.REF>
        CONVERT VM TO '|' IN CURR.LOCAL.REF
        R.CUS<EB.CUS.LOCAL.REF> = '|':CURR.LOCAL.REF:'|'
        CONVERT FM TO '|' IN R.CUS
        CONVERT VM TO '^' IN R.CUS
        CONVERT SM TO '#' IN R.CUS
        WRITESEQ CUSTID:'|':R.CUS TO NDB.CUST ELSE PRINT "SORRY"
    REPEAT
Reply all
Reply to author
Forward
0 new messages