Focal Point
[SOLVED] Help Needed for Message (FOC36335)

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3541072792

August 28, 2008, 02:25 AM
geet
[SOLVED] Help Needed for Message (FOC36335)
Hi,

I am using FOCUS Version 7.3 for generating reports in Mainframe.

In one of reports, i am getting the following message and a RC=08
(FOC36335) THE LENGTH OF A FIELD OR A CONSTANT BEYOND LIMITS

Any pointers for solving the problem will be appreciated.

TIA

This message has been edited. Last edited by: geet,
August 28, 2008, 08:42 AM
PBrightwell
Check to see if you have a defined or computed field without a semicolon at the end or missing an ending quote mark.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
August 28, 2008, 02:50 PM
Kerry
Hi geet,

Has this issue been resolved? If not, it is suggested that you open a case with Information Builders' Customer Support Services for further assistance, as we will need to know much more details. To open a case, you may either call at 1-800-736-6130, or access online at InfoResponse.

Hope this helps. Many thanks for Pat's input too. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
September 05, 2008, 04:03 AM
geet
Thank You for your pointers!!but the issue is still not solved..and very confused...

This message has been edited. Last edited by: geet,
September 05, 2008, 06:25 AM
GamP
Geet,

Please post the offending code here (place it between the code brackets so its stays readable) in order for us to try and come up with a rreason and/or solution for you.
We really can't do much with just the fact that you get this message.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 05, 2008, 07:46 AM
geet
Hi,

PFB the code
{

DYNAM ALLOC FILE HOLDGUR SPACE 1,3 CYL MOD

DEFINE FILE TGUR
FIL1/A1 = ' ';
G_DSC/A32 = ''''|| GUR_DESC||'''';
END

TABLE FILE TGUR
PRINT
FIL1
J_DSC
BY GUR
ON TABLE SAVE AS HOLDGUR
END
-RUN
-RUN
-SET &SV = 'N';
-SET &SSV = 'N';
-SET &SRI = 'N';
-SET &SGR = 'N';
-SET &SEI = 'N';
-SET &SBI = 'N';
-SET &SBD = 'N';
-SET &LST_SRT_FLD = 'C_N_CD';
-SET &LST_SRT_FLD = 'STATE_CD';
-SET &LST_SRT_FLD = 'GUR';
-SET &SBD = 'Y';
-SET &LST_SRT_FLD = 'BILL_DT';
-SET &SGR = 'Y';
-SET &LST_SRT_FLD = 'L_G_TYP';
-SET &SRI = 'Y';
-SET &LST_SRT_FLD = 'SEI';
-SET &SSV = 'Y';
-SET &LST_SRT_FLD = 'S_CD';
-SET &F_NM = ' ';
-SET &NAME_COR = IF &SV EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_HOLD_CO = IF 'N' EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_COMPANY = IF 'Y' EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_STATE = IF 'Y' EQ 'N' THEN
-'ALL'
- ELSE '-SET &GUR_NO = 0;
-SET &NAME_GUR1 = 'ALL';
-SET &GUR_NO = &GUR_NO + 1;
-SET &GUR_CD = 'II ';
-SET &NAME_GURX = DECODE &JUR_CD(HOLDJUR);
-SET &NAME_GUR1 = IF &JUR_NO EQ 1 THEN NAME_GURX
- ELSE &GUR_DSC;
-SET &NAME_GUR = IF 'Y' EQ 'N' THEN &NAME_GUR1
- ELSE '-*
-SET &CURR_DT = 12345678;
-SET &CURR_DT = TODAY(&CURR_DT);
-SET &CURR_DT1 = 12345678;
-SET &CURR_DT1 = EDIT(&CURR_DT,'$$$$$$99') |
- EDIT(&CURR_DT,'99$$$$$$') | EDIT(&CURR_DT,'$$$99$$$');
-SET &OUTDATE = AYMD(&CURR_DT1,-90,'I6YMD');
-SET &CUTOFF_DT = EDIT(&OUTDATE,'99$$$$') | '/' |
- EDIT(&OUTDATE,'$$99$$') | '/' | EDIT(&OUTDATE,'$$$$99');
-IF 'R' EQ 'N' THEN GOTO NONREC;
-SET &FILENM = IF 'R' EQ 'R' THEN 'HLDRPTS9'
- ELSE IF 'R' EQ 'E' THEN 'HLDRPTS0' ELSE ' ';
-RUN
-*

}

this is the part of the code snippet.

Hope this helps in understanding my problem better.

The message i see the spool is as follows:
DCB USED WITH FILE HOLDGUR IS DCB=(RECFM=FB,LRECL=00035,BLKSIZE=00700)
OFFLINE...
SAVED...
(FOC36335) THE LENGTH OF A FIELD OR A CONSTANT BEYOND LIMITS IN TODAYI


--Geet
September 05, 2008, 09:36 AM
GinnyJakes
quote:
-SET &NAME_COR = IF &SV EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_HOLD_CO = IF 'N' EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_COMPANY = IF 'Y' EQ 'N' THEN
-'ALL'
- ELSE '-SET &NAME_STATE = IF 'Y' EQ 'N' THEN
-'ALL'
- ELSE '-SET &GUR_NO = 0;

I'm not sure what your problem is but this looks really strange. Can you tell us what you are trying to do here?

Also please update your profile signature with your product suite, release, and platform.

Thanks.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 05, 2008, 09:43 AM
j.gross
Also, in a -SET further down...
-SET &NAME_GUR = IF 'Y' EQ 'N' THEN &NAME_GUR1
- ELSE '-*

the quote is unclosed, and there is no (unquoted) ";" to end the -SET.


- Jack Gross
WF through 8.1.05
September 05, 2008, 09:51 AM
GinnyJakes
You are also setting &NAME_GUR1 twice within just a few lines of code.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 05, 2008, 09:55 AM
GamP
I think Ginny is right with her observation that it looks a bit strange.
You should put your code between the code brackets to avoid losing information.
Since you get the message that the file has been saved, the error occurs somewhere after saving the file. Most probable cause are the set statements that Ginny indicated. They should read:
-SET &NAME_COR     = IF &SV EQ 'N' THEN 'ALL'
-                        ELSE  '<COR';
-SET &NAME_HOLD_CO = IF 'N' EQ 'N' THEN 'ALL'
-                        ELSE  '<NAME_HOLD_CO';
-SET &NAME_COMPANY = IF 'Y' EQ 'N' THEN 'ALL'
-                        ELSE  '<NAME_COMPANY';
-SET &NAME_STATE   = IF 'Y' EQ 'N' THEN 'ALL'
-                        ELSE   '<NAME_STATE';

The biggest problem in your originalk code is that a DM continuation line must start with a '-' sign, followed by at least one space and then the rest of the statement. In your case the 'ALL' was immediately following the '-', possibly causing the error.
If correcting this does not help, then place a -EXIT at a line follwing the SAVE, run it and see if it still errors out. If not, replace the -EXIT line to a place a little further in the code and run. Use this method until the error occurs and you have found the problem.

Hope this helps ....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 05, 2008, 10:22 AM
GinnyJakes
quote:
IF 'N' EQ 'N'

That's not all. What I meant is that it looks like this code was pasted from an ECHO output. Ususally folks would say IF &VAR EQ 'N'...

Also his original code looks like he is trying to set a variable to be a full line of code with a -SET.

Maybe this should be clarified.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 08, 2008, 06:02 AM
geet
Hi,

Thank You for all your suggestions/replies.
As suggested by GamP, by placing -EXIT at various points, i have finally pin pointed the place where the error is generated:

PFB the code:
 -SET &&CURR_DT = 12345678;                                      
 -SET &&CURR_DT = TODAY(&&CURR_DT);                           
 -SET &&CURR_DT1 = 12345678;                                     
 -SET &&CURR_DT1 = EDIT(&&CURR_DT,'$$$$$$99') ||                 
 - EDIT(&&CURR_DT,'99$$$$$$') || EDIT(&&CURR_DT,'$$$99$$$');     
 -SET &&OUTDATE = AYMD(&&CURR_DT1,-90,'I6YMD');                  
 -SET &&CUTOFF_DT = EDIT(&&OUTDATE,'99$$$$') || '/' ||           
 - EDIT(&&OUTDATE,'$$99$$') || '/' ||  EDIT(&&OUTDATE,'$$$$99'); 

 



to be exact the error is caused due to

-SET &&CURR_DT = TODAY(&&CURR_DT);

I belive the syntax of TODAY is correct. Not sure what is causing the problem.

Any pointers will be appreciated.

--Geet

FOCUS Version 7.3
September 08, 2008, 06:06 AM
GamP
Geet,

Syntax of today is NOT correct.
In Dialog manager, the output should be given as a literal value, thus it should read:
-SET &&CURR_DT = TODAY('A8');

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 08, 2008, 06:39 AM
geet
Hi GamP,

Thank You!! My problem has been resolved and now the report is been generated.

Once again Thank You Big Grin
September 08, 2008, 06:49 AM
GamP
Geet,

Please be so kind to change the subject of this post so that it indicates [SOLVED].

Thanks.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988