[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Fwd: [sqr-users] trying to create an array



Thanks to all for the great help and suggestions. That did it. 

Thanks again.

>>> Amy Eldridge <emgeac@muohio.edu> 7/14/2006 2:40 PM >>>
If total and priority are numbers per your array, why are you feeding them 
into character variables ($TOTAL and $C.UMH_PRIORITY_ORDER)?

Shouldn't that be #TOTAL and #C.UMH_PRIORITY_ORDER?

A.

>X-Mailer: Novell GroupWise Internet Agent 6.5.4
>Date: Fri, 14 Jul 2006 14:27:55 -0400
>From: "Laura Mayer" <lmayer@gw.housing.umass.edu>
>To: <sqr-users@sqrug.org>
>Subject: [sqr-users] trying to create an array
>X-BeenThere: sqr-users@sqrug.org 
>X-Mailman-Version: 2.1.5
>Reply-To: "This list is for discussion about the SQR database reporting
>         language from Hyperion Solutions." <sqr-users@sqrug.org>
>List-Id: "This list is for discussion about the SQR database reporting
>         language from Hyperion Solutions." <sqr-users.sqrug.org>
>List-Unsubscribe: <http://www.sqrug.org/mailman/listinfo/sqr-users>,
>         <mailto:sqr-users-request@sqrug.org?subject=unsubscribe>
>List-Post: <mailto:sqr-users@sqrug.org>
>List-Help: <mailto:sqr-users-request@sqrug.org?subject=help>
>List-Subscribe: <http://www.sqrug.org/mailman/listinfo/sqr-users>,
>         <mailto:sqr-users-request@sqrug.org?subject=subscribe>
>Sender: sqr-users-bounces+emgeac=muohio.edu@sqrug.org 
>X-Real-ConnectIP: 199.164.165.113
>X-Scanned-By: MIMEDefang 2.45
>X-Scanned-By: MIMEDefang 2.52 on 134.53.6.11
>
>Afternoon,
>
>I cant seem to get this. Every time I run this it says:
>Error on line 49:
>   (SQR 3514) PUT and GET variables must match array field types.
>
>I checked and they are the right types. I used the code from the manual 
>but no matter what I do I cant make this work. I cant find any good 
>tutorials out there either. Any help anyone can offer would be great.
>
>Thanks in advance
>
>Laura
>
>!********************************************************
>begin-setup
>!********************************************************
>  create-array
>name=preference_array
>size=16500
>   field=EMPLID:char
>   field=TOTAL:number
>   field=UMH_PRIORITY_ORDER:number
>
>end-setup
>
>!********************************************************
>begin-program
>!********************************************************
>  do select_data
>  do print_array
>end-program
>
>!********************************************************
>begin-procedure select_data
>!********************************************************
>let #counter = 0
>begin-select
>C.EMPLID (,1)
>(C.UMH_TRMS_IN_HS_PTS + C.UMH_OTHER_PTS) &TOTAL (,10)
>C.UMH_PRIORITY_ORDER (,16)
>position (+1)
>   put &C.EMPLID &TOTAL &C.UMH_PRIORITY_ORDER into preference_array(#counter)
>   add 1 to #counter
>FROM PS_UM_H_SNRTY C, PS_UM_H_PRC_PD_TBL A
>WHERE C.STRM = '1067'
>AND C.STRM = A.STRM
>AND A.EFFDT =
>    (SELECT MAX(A_ED.EFFDT)
>     FROM PS_UM_H_PRC_PD_TBL A_ED
>      WHERE A.UMH_PROC_PD = A_ED.UMH_PROC_PD
>      AND A_ED.EFFDT <= SYSDATE)
>AND A.UMH_PROC_PD = '106730'
>ORDER BY C.UMH_TRMS_IN_HS_PTS DESC, C.UMH_PRIORITY_ORDER DESC
>end-select
>end-procedure ! select_data
>
>!********************************************************
>begin-procedure print_array
>!********************************************************
>let #i = 0
>while #i < #counter
>   get $C.EMPLID $TOTAL $C.UMH_PRIORITY_ORDER from preference_array(#i)
>   print $C.EMPLID (,1)
>   print $TOTAL  (,7)
>   print $C.UMH_PRIORITY_ORDER (,24)
>   position (+1)
>   add 1 to #i
>end-while
>
>end-procedure
>
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org 
>http://www.sqrug.org/mailman/listinfo/sqr-users 



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users