(GRX) Export Command Functionality
Chris Sellitto
sellich at guaranteedreturns.com
Mon Apr 10 07:43:29 PDT 2006
Hello all,
I am using filePro 5.0.13 on a Windows 2003 server.
I am running a simple export process, and had a question about the export command.
If you notice on line 21(below), it is commented out, as well as line 35 which does a gosub
to a routine that would set out(18) to equal something. I would think that with the
code listed below, there should not be 18 columns, but when I look at the file that is created,
column 18 shows up and it contains blanks (header, and detail). My question is, does the export
command write a column just by the fact that there is an uncommented reference(lines 41, 42)
to it in the process, even though my code does not actually execute those lines?
Your insight is greatly appreciated.
Thank you
Christopher Sellitto
VP Computer Operations
Guaranteed Returns
1 ------- - - - - - - - - - - - - - - - -
? If: @rn lt "0"
Then: print
2 ------- - - - - - - - - - - - - - - - -
? If:
Then: ct(6,.0,g)=ct+"1"
3 ------- - - - - - - - - - - - - - - - -
? If: ct eq "1" 'writes column headers once
Then: gosub wrthdr
4 ------- - - - - - - - - - - - - - - - -
? If: 5 ne ""
Then: gosub filedet
5 ------- - - - - - - - - - - - - - - - -
? If:
Then: end
6 ------- - - - - - - - - - - - - - - - -
? If: '*****************************************************************
Then: '**************** W R I T E T H E F I L E ********************
7 ------- - - - - - - - - - - - - - - - -
tofile ? If: 'write to file
Then:
8 ------- - - - - - - - - - - - - - - - -
? If:
Then: ej="XNET2_vsamt"
9 ------- - - - - - - - - - - - - - - - -
? If:
Then: bs(1,*)=chr("92")
10 ------- - - - - - - - - - - - - - - - -
? If:
Then: ek(27,*)=bs{bs{"nyweb1"{bs{"grxdrop"{bs{"pre_drop"{bs
11 ------- - - - - - - - - - - - - - - - -
? If:
Then: ec(50,allup,g)=ek{ej{".csv"
12 ------- - - - - - - - - - - - - - - - -
? If:
Then: export ascii out = (ec) r=\n F=, O=| C=|
13 ------- - - - - - - - - - - - - - - - -
? If:
Then: return
14 ------- - - - - - - - - - - - - - - - -
wrthdr ? If: 'write the header record
Then:
15 ------- - - - - - - - - - - - - - - - -
? If:
Then: gosub tofile
16 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(1)="Customer#";out(2)="Batch#";out(3)="Store#";out(4)="VendorNName"
17 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(5)="EstimatedReturnableAmt";out(6)="VendorCode";out(7)="DirectVend"
18 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(8)="Dist1Amt";out(9)="Dist2Amt";out(10)="Dist3Amt"
19 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(11)="Dist4Amt";out(12)="Dist5Amt";out(13)="Dist6Amt"
20 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(14)="Dist7Amt";out(15)="Dist8Amt";out(16)="Dist9Amt";out(17)="UniqueStore#"
21 ------- - - - - - - - - - - - - - - - -
? If:
Then: 'out(18)="Itemize"
22 ------- - - - - - - - - - - - - - - - -
? If:
Then: write out
23 ------- - - - - - - - - - - - - - - - -
? If:
Then: return
24 ------- - - - - - - - - - - - - - - - -
filedet? If: 'write to file detail records
Then:
25 ------- - - - - - - - - - - - - - - - -
? If: "25264 43740 42741 25299" co 1
Then: goto useit
26 ------- - - - - - - - - - - - - - - - -
? If:
Then: end
27 ------- - - - - - - - - - - - - - - - -
useit ? If:
Then: gosub tofile
28 ------- - - - - - - - - - - - - - - - -
? If:
Then: ky=1&3
29 ------- - - - - - - - - - - - - - - - -
? If:
Then: lookup sto = gr_store k=ky i=a -nx
30 ------- - - - - - - - - - - - - - - - -
? If: not sto
Then: end
31 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(1)=1;out(2)=2;out(3)=3;out(4)=4;out(5)=5
32 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(6)=6;out(7)=7;out(8)=8;out(9)=9;out(10)=10
33 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(11)=11;out(12)=12;out(13)=13;out(14)=14;out(15)=15;out(16)=16
34 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(17)=sto(62)
35 ------- - - - - - - - - - - - - - - - -
? If:
Then: 'gosub itemize
36 ------- - - - - - - - - - - - - - - - -
? If:
Then: write out
37 ------- - - - - - - - - - - - - - - - -
? If:
Then: return
38 ------- - - - - - - - - - - - - - - - -
itemize? If:
Then:
39 ------- - - - - - - - - - - - - - - - -
? If: 'key-custno/batchno/vendcd
Then: kx(15,*)=1 & 2 & 4
40 ------- - - - - - - - - - - - - - - - -
? If:
Then: lookup crd = gr_creda k=kx i=E -nx
41 ------- - - - - - - - - - - - - - - - -
? If: not crd
Then: out(18)="";return
42 ------- - - - - - - - - - - - - - - - -
? If:
Then: out(18)=crd(45)
43 ------- - - - - - - - - - - - - - - - -
? If:
Then: return
44 ------- - - - - - - - - - - - - - - - -
@done ? If:
Then:
45 ------- - - - - - - - - - - - - - - - -
? If:
Then: DECLARE GLOBAL Key(2,allup,g)
46 ------- - - - - - - - - - - - - - - - -
? If:
Then: Key="VS"
47 ------- - - - - - - - - - - - - - - - -
? If:
Then: call "g:\filepro\call_lib\xnet2runctlfin"
48 ------- - - - - - - - - - - - - - - - -
? If:
Then: end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Christopher Sellitto (E-mail).vcf
Type: text/x-vcard
Size: 504 bytes
Desc: Christopher Sellitto (E-mail).vcf
Url : http://lists.celestial.com/pipermail/filepro-list/attachments/20060410/af084070/ChristopherSellittoE-mail.bin
More information about the Filepro-list
mailing list