Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HP Query Utility extract of Binary fields

Status
Not open for further replies.

DJRB

Programmer
Apr 24, 2002
3
0
0
US
Hi,
I'm trying to use Query on an HP957 MPExl OS. I am selecting records from an IMAGE/VSAM Master dataset into a flat Ascii file for input into a Cobol program. However, some of the fields in the dataset are described Pic S9(07)V99 COMP. Such fields appear as packed data in the extracted flatfile. Does anyone know of a Query method, or other HP utility which can unpack such fields. I'm trying to avoid writing a Cobol program to select and unpack this data. Thanks, DJRB
 
I'm confused and may not understand your question.

You seem to be mixing things up here. I assume, since you're using Query, that you're extracting data from an IMAGE database (KSAM can be dealt with essentially as a flat file using FCOPY or other flat file tools). If so, if I recall correctly, you can output the data essentially as DISPLAY direct from Query and read it that way in COBOL. You can also output the data in a self-describing file where binary (type I & J) items remain binary (i.e. COMP), but you have no control over the layout of the record, it is basically a record dump.

If what you're trying to do is extract the data with Query and put it into a format defined by the COBOL program to include COMP fields (which are binary, not packed), I think you're out of luck; you'll have to modify the COBOL program to accept the dumped format, or use another tool to extract the IMAGE data (e.g. Suprtool, Quiz, QTP).

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top