Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FILEDEF MASTER -WRITE ERROR FOC42256 and FOC209

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] FILEDEF MASTER -WRITE ERROR FOC42256 and FOC209
 Login/Join
 
Expert
posted
I'll show three scenarios which detail my issue. I think it's all due to the -WRITE command and the last character being a comma or a blank.
One thing that weird about this is that the TABLE FILE request runs fine after the fex completes that creates the synonym and run again is a new session. Yes, i have a -CLOSE tstmstr2 in there.
Please let me know your thoughts on solving this issue.

Scenarios 1 and 2 shows error with a COMMA as the last character in the -WRITE line and without the COMMA.
Scenario 3 shows positive results, no error, after a comma was added as the last character of the first -WRITE after the synonym was created and rechecked.

-* SCENARIO 1: THIS CODE
FILEDEF tstmstr2 DISK /{serverName}/app/ibi/apps/test_s3/tstmstr2.mas (LRECL 1024 RECFM V
-RUN
-WRITE tstmstr2 FILENAME=jsn, SUFFIX=JSON    ,
-WRITE tstmstr2  DATASET=/{serverName}/app/ibi/apps/jsn.json, $
-WRITE tstmstr2   SEGMENT=SEGMENT1, SEGTYPE=S0, $
-WRITE tstmstr2 FIELDNAME='FIELD1', USAGE='A32', ACTUAL=A128, TITLE='Field 1' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
-WRITE tstmstr2 FIELDNAME='FIELD2', USAGE='A32', ACTUAL=A128, TITLE='Field 2' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
-RUN
-CLOSE tstmstr2
-SET &ECHO = OFF ;
CHECK FILE tstmstr2 
TABLE FILE tstmstr2 PRINT *
END
?FF tst1
-EXIT

-* DISPLAYS THIS HTML:
 (FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: JSON    WRITE tstmstr2
 ---------------------vvvvvvvvvvvvvvvvvvvvvv
 FILENAME=jsn, SUFFIX=JSON    WRITE tstmstr2  DATASET=/{serverName}/app/ibi/apps/jsn.json, $
 (FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: JSON    WRITE tstmstr2
 BYPASSING TO END OF COMMAND
 (FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: JSON    WRITE tst1
 ---------------------vvvvvvvvvvvvvvvvvv
 FILENAME=jsn, SUFFIX=JSON    WRITE tst1  DATASET=/{serverName}/app/ibi/apps/jsn.json, $

-* CREATES THIS SYNONYM:
FILENAME=jsn, SUFFIX=JSON    WRITE tstmstr2  DATASET=/{serverName}/app/ibi/apps/jsn.json, $
  SEGMENT=SEGMENT1, SEGTYPE=S0, $
FIELDNAME='FIELD1', USAGE='A32', ACTUAL=A128, TITLE='Field 1' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
FIELDNAME='FIELD2', USAGE='A32', ACTUAL=A128, TITLE='Field 2' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $


-* SCENARIO 2: THIS CODE
 
FILEDEF tstmstr2 DISK /{serverName}/app/ibi/apps/test_s3/tstmstr2.mas (LRECL 1024 RECFM V
-RUN
-WRITE tstmstr2 FILENAME=jsn, SUFFIX=JSON    
-WRITE tstmstr2  DATASET=/{serverName}/app/ibi/apps/jsn.json, $
-WRITE tstmstr2   SEGMENT=SEGMENT1, SEGTYPE=S0, $
-WRITE tstmstr2 FIELDNAME='FIELD1', USAGE='A32', ACTUAL=A128, TITLE='Field 1' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
-WRITE tstmstr2 FIELDNAME='FIELD2', USAGE='A32', ACTUAL=A128, TITLE='Field 2' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
-RUN
-CLOSE tstmstr2
-SET &ECHO = OFF ;
CHECK FILE tstmstr2 
TABLE FILE tstmstr2 PRINT *
END
?FF tst1
-EXIT

-* DISPLAYS THIS HTML:
 0 NUMBER OF ERRORS=     0
 NUMBER OF SEGMENTS=   1  ( REAL=    1  VIRTUAL=   0 )
 NUMBER OF FIELDS=     2  INDEXES=   0  FILES=     1
 TOTAL LENGTH OF ALL FIELDS=  256
 (FOC42256) CONTENT NOT ALLOWED AT ROOT LEVEL. '<' EXPECTED
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 (FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: JSON    WRITE tst1
 ---------------------vvvvvvvvvvvvvvvvvv
 FILENAME=jsn, SUFFIX=JSON    WRITE tst1  DATASET=/{serverName}/app/ibi/apps/jsn.json, $

-* CREATES THIS SYNONYM:
FILENAME=jsn, SUFFIX=JSON
 DATASET=/{serverName}/app/ibi/apps/jsn.json, $
  SEGMENT=SEGMENT1, SEGTYPE=S0, $
FIELDNAME='FIELD1', USAGE='A32', ACTUAL=A128, TITLE='Field 1' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
FIELDNAME='FIELD2', USAGE='A32', ACTUAL=A128, TITLE='Field 2' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $

-* SCENARIO 3: THIS CODE
-*MANUALLY ADDING A COMMA AFTER JSON, IN THE FIRST LINE, ELIMINATES THE FOC ERROR.
-*IGNORE THE ZERO RECORDS, I'LL DAEL WITH THAT LATER.

FILENAME=jsn, SUFFIX=JSON,
 DATASET=/{serverName}/app/ibi/apps/jsn.json, $
  SEGMENT=SEGMENT1, SEGTYPE=S0, $
FIELDNAME='FIELD1', USAGE='A32', ACTUAL=A128, TITLE='Field 1' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $
FIELDNAME='FIELD2', USAGE='A32', ACTUAL=A128, TITLE='Field 2' ,MISSING=ON, REFERENCE=SEGMENT1, PROPERTY=ELEMENT,  $

-*AND DISPLAYS THIS HTML: Everything is fine with teh synonym creation.
 *** Done creating the Dynamic Synonym for tstmstr2 ...
 /{serverName}/app/ibi/apps/test_s3/tstmstr2.mas
 /{serverName}/app/ibi/apps/test_s3/tstmstr2.acx
 *** TABLE FILE tstmstr2 ...
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0
 *** ?FF tstmstr2 ...
 FILENAME=  TSTMSTR2
 FIELD1                      A32
 FIELD2                      A32
 LIST                        I5
 *** CHECK FILE tstmstr2 PICTURE ...
 0 NUMBER OF ERRORS=     0
 NUMBER OF SEGMENTS=   1  ( REAL=    1  VIRTUAL=   0 )
 NUMBER OF FIELDS=     2  INDEXES=   0  FILES=     1
 TOTAL LENGTH OF ALL FIELDS=  256
 1SECTION 01
 STRUCTURE OF JSON     FILE TSTMSTR2 ON 02/20/20 AT 17.37.49
 SEGMENT1
 01      S0
 **************
 *FIELD1      **
 *FIELD2      **
 *            **
 *            **
 *            **
 ***************
 **************
 *** Started on Feb 20, 2020 at 17.37.49 ***


Thanks for making it to the end of this post. You get an extra AtaBoy (generically speaking)!

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Doug,
I'm not sure why you have REFERENCE=SEGMENT1.
References in the field definition points to a field which defines the highter level Element.
So, a field defined either as a PROPERTY=ELEMENT or PROPERTY=ATTRIBUTE will have a REFERENCE equal to a FIELD which defines the higher level ELEMENT.

For example:
{
"status": "success",
"data": {
"account": {

FIELDNAME=DUMROOT, ALIAS=JSON_DUMMY_EL, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL), $
FIELDNAME=STATUS, ALIAS=status, USAGE=A55, ACTUAL=A55,
MISSING=ON,
REFERENCE=DUMROOT, PROPERTY=ELEMENT, $
FIELDNAME=DATA, ALIAS=data, USAGE=A1, ACTUAL=A1,
MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
REFERENCE=DUMROOT, PROPERTY=ELEMENT, $
FIELDNAME=ACCOUNT, ALIAS=account, USAGE=A1, ACTUAL=A1,
MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
REFERENCE=DATA, PROPERTY=ELEMENT, $

I'm not sure why you have the REFERENCE equal to a SEGMENT definition.
 
Posts: 229 | Location: New York | Registered: July 27, 2004Report This Post
Platinum Member
posted Hide Post
I think the comma is a line continuation character for the -WRITE statement. You can

-SET &Comma = ','; 

Then use it like this:

-WRITE tstmstr2 FILENAME=jsn, SUFFIX=JSON  &Comma 


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Expert
posted Hide Post
dbeagan, Brilliant!!! And it works just fine. I think I tried putting a comma in a variable. But, sadly enough, I added the '.EVAL' which interpreted it as the continuation character instead of the desired comma as needed.

So, Thanks Again dbeagan Smiler




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Efrem,

BTW, I'm not sure why the REFERENCE=SEGMENT1 is there either (yet). But, it was automatically added during the synonym creation. This is an AWS S3 synonym.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
You are welcome. I'm glad the mystery is solved.


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FILEDEF MASTER -WRITE ERROR FOC42256 and FOC209

Copyright © 1996-2020 Information Builders