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     [CLOSED] Hex values, un-packed, negatives

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Hex values, un-packed, negatives
 Login/Join
 
Platinum Member
posted
Hi there, I have a 144 byte alpha field that stores 24 occurences of a signed packed data element that I had to use the HEX() and SUBSTR() functions on to get the data out. However, I now notice that I have problems with data validation because Report Assistant does not recognize the signed bit of the field. It appears that SUBSTR() makes the element an alpha on the backside, and my Data Migrator job creates the output field as an A11.

I have tried changing the usage to D8.2 and playing with ACTUAL= on the MFD to no success. Is there any simple way to pull these data elements out to recognize positive and negative values? What I plan on doing if there's not an internal way of solving it is to pull the first 11 bits into one field, then pull the 12th bit that holds an F for positive and D for negative and using that on the reporting end to determine the sign.

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


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
<JG>
posted
search the forum for occurs and position.

A similar issue was raised quite recently

If you really do have packed data it's just what you need.
 
Report This Post
Expert
posted Hide Post
I would also suggest familiarising your self with the documentation on master files.

http://documentation.informati...g/source/topic60.htm


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Can't do occurs. DB2 wont allow for internal tables. I tried that a few weeks ago and never got it working.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
You could use an intermediate file to hold the data. Then remodel the master file for that intermediate file to contain the occurs. Maybe that way you can access the fields separately and as packed fields.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Can you explain that a little further? I don't totally understand what you're suggesting.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Expert
posted Hide Post
TABLE FILE [DB2 Table}
PRINT fields galore
ON TABLE SAVB AS [interim hold file]
END
-RUN

TABLE FILE [interim hold file]
etc. etc. etc.

SAVB holds the data in internal format but doesn't create a master file for the output. You create one manually to descibe the data coming into your [interim hold file].

Best way to do this is perform a HOLD with READLIMIT EQ 1, capture the master file and re-model it as recommended above. Then in your actual code use SAVB and ensure that your re-modelled master file is available in the correct path. "Simples ntch".

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
I'll give it a try. Thanks!


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
You have 24 occurences of a 6-byte field.

1. If you managed to isolate each field with SUBSTR, then all you need is to convert the alpha to a packed field. There is a function that does that: CHKPCK (page 12-7 in the 7.6 functions manual)

2. You can go the way that was suggested here. I seem to remember that I once did a redefine in DB2. If you post your MASTER, I might be able to help.

3. If that doesn't work, go Tony's way.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
Danny,
I thought CHKPCK only returned a Y or N? Does it actually convert the field that way too? I'll email you the MFD and the SQL that Data Migrator is using to get the data out and see if you can find what you need.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
What are your plaforms?

If DB2 uses EBCDIC and the WF platform uses ASCII, the Char field holding these 24 6-byte packed decimal values, when pulled by WF into an A144 field, will undergo a character-set transformation which will obliterate the packed values. So you (or the next developer in a comparable position) may need to find a way for WF to address the numeric values as such on the DB2 server side.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Have you tried modifing your 144 char alpha field into 24 fields with usage P12 and actual P6?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Master
posted Hide Post
Sorry, I got interrupted while I was replying to this. I mean in your master file, you can redefine a field using position.
FILENAME = EXAMPLE3, SUFFIX = FIX,$
SEGNAME = ONE, SEGTYPE=S0,$
FIELDNAME = A1 ,ALIAS= ,USAGE = A14 ,ACTUAL = A14 ,$
FIELDNAME = QFIL ,ALIAS= ,USAGE = A32 ,ACTUAL = A32 ,$  <---  This field
FIELDNAME = A2 ,ALIAS= ,USAGE = I2 ,ACTUAL = I2 ,$
FIELDNAME = A3 ,ALIAS= ,USAGE = A10 ,ACTUAL = A10 ,$
FIELDNAME = A4 ,ALIAS= ,USAGE = A15 ,ACTUAL = A15 ,$
SEGNAME = TWO, SEGTYPE=S0, PARENT = ONE, POSITION = QFIL, $  <---- is now 4 fields.
FIELDNAME = Q1 ,ALIAS= ,USAGE = D8 ,ACTUAL = D8 ,$
FIELDNAME = Q2 ,ALIAS= ,USAGE = D8 ,ACTUAL = D8 ,$
FIELDNAME = Q3 ,ALIAS= ,USAGE = D8 ,ACTUAL = D8 ,$
FIELDNAME = Q4 ,ALIAS= ,USAGE = D8 ,ACTUAL = D8 ,$
  


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report 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     [CLOSED] Hex values, un-packed, negatives

Copyright © 1996-2020 Information Builders