Focal Point
[SOLVED]PACKED Fields

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

June 21, 2012, 04:36 PM
moyer1dl
[SOLVED]PACKED Fields
I have a USAGE P14.2 ACTUAL Z14 field in a file that I have read successfully but when I report these and store them in a hold file either alpha or binary I cant get this field to report from the hold file. Does anybody know what the USAGE and ACTUAL should be when I have them stored as ALPHA. BINARY would be secondary preference because it has the padding in it. These are mainframe fixed files.

Any Help

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


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
June 21, 2012, 04:51 PM
Don Garland
How are you holding it?

I'm not familiar with MainFrame but I would take a look at the hold file field formats and see how it's being stored.

  TABLE FILE CAR
PRINT
     'CAR.ORIGIN.COUNTRY'
     'CAR.COMP.CAR'
     'CAR.CARREC.MODEL'
	 ON TABLE HOLD AS CARTEST
END
-RUN

CHECK FILE CARTEST HOLD
TABLE FILE HOLD
PRINT
FILENAME
FIELDNAME/A100 AS 'Field'
TITLE AS 'Description'
USAGE AS 'Format'
ACTUAL AS 'WebFocus Format'
END



WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
June 21, 2012, 05:43 PM
Waz
If you hold as FORMAT ALPHA, then each row will be a line, and all fields will be stored as alpha.

For BINARY, I think you will find that the rows will be stored without an end of line marker (Can't remember what it is on MF), Numerics will be stored as binary.

Are you holding this, and trying to read the files in another program ?, it may all be related to the allocation of the file.


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!

June 22, 2012, 02:00 AM
Danny-SRL
quote:
TABLE FILE CAR
PRINT
'CAR.ORIGIN.COUNTRY'
'CAR.COMP.CAR'
'CAR.CARREC.MODEL'
ON TABLE HOLD AS CARTEST
END
-RUN

I would add after the END:
?FF CARTEST
You will see the formats of your fields

If this doesn't help, then tell us: Are you on a M/F? If so, VM? MVS? If not, what machine?
Are you maybe using the name of another file the Master of which precedes your HOLD file name in the PATH?


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

June 22, 2012, 01:12 PM
moyer1dl
OK I have gotten the packed amount field to display correctly under binary hold file format USAGE P14.2 Actual p8. The problem now is I am pulling the system date with.

-SET &YESTERDAY=AYMD(&YMD,-1,'I8YYMD');
DEFINE FILE BCMSTRN
DATE/YYDM=&YESTERDAY;

When I go to report off of the this hold file the format is stored with USAGE: YYMD ACTUAL: I4. It seems to truncate the field and I get meaningless numbers.

We are using MVS. Is there another way to display this date.


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
June 22, 2012, 02:04 PM
j.gross
I presume you actually coded

DATE/YYMD=&YESTERDAY;



The I4 integer stored for DATE is not truncated -- it's a date offset. Quite meaningful -- just the meaning is not so obvious.

[Incidentally, that's exactly how Excel stores a date value, but they use a different base date.]

If you are "reporting off this hold file" within Focus, there should be no problem.

If you are trying to read the file outside of the IBI environment, you'd probably do better with

DATE/I8YYMD=&YESTERDAY;

which will store a +yyyymmdd value as I4.

This message has been edited. Last edited by: j.gross,
June 22, 2012, 02:48 PM
moyer1dl
J Gross,

That seemed to help. Thanks much.

I also noticed pulling my variable in with a &yymd helped also.


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7