Home » SQL & PL/SQL » SQL & PL/SQL » Cobol high values/Low values (oracle 11g)
Cobol high values/Low values [message #462537] Thu, 24 June 2010 15:51 Go to next message
rareraja
Messages: 22
Registered: March 2005
Location: NJ, USA
Junior Member
Hi,

My requirement is while sending a data file from oracle to mainframe, first 3 bytes for the header row should contain low values and trailer should contain high value.

If anyone has any idea how to pass oracle values to mainframe high and low values ?
Re: Cobol high values/Low values [message #462560 is a reply to message #462537] Thu, 24 June 2010 22:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Post a DETAILED example.

Regards
Michel
Re: Cobol high values/Low values [message #462584 is a reply to message #462537] Fri, 25 June 2010 02:29 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
We need to know what you mean by 'low values' and 'high values'
Re: Cobol high values/Low values [message #462662 is a reply to message #462584] Fri, 25 June 2010 08:42 Go to previous messageGo to next message
rareraja
Messages: 22
Registered: March 2005
Location: NJ, USA
Junior Member
Binary Hexadecimal low and high values i.e. x[00] and x[FF].

e.g. the file generated out of oracle script as follows


HEADER 06252010
0031888899 RAJA88898399323
0031888899 RAJA88898399324
0031888899 RAJA88898399325
TRAILER 000003


The above text file is the out put of a oracle script contains 3 records with one header and one trailer information. The header record contains hard coded "HEADER" and the date, the trailer record contains hard coded "TRAILER" and no of records.

My requirement is in header and trailer record, first 3 places should be hexadecimal high and low values which is required for mainframe, currently it is space.

Nay help would be highly appreciated!
Re: Cobol high values/Low values [message #462667 is a reply to message #462662] Fri, 25 June 2010 08:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
One out of many ways to do it:
SQL> col ord noprint
SQL> set head off
SQL> select 1 ord, 'HEADER '||to_char(sysdate,'MMDDYYYY') from dual
  2  union all
  3  select 2, empno||' '||ename from emp
  4  union all
  5  select 3, 'TRAILER '||to_char(count(*),'fm000000') from emp
  6  order by 1, 2
  7  /
HEADER 06252010
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS
7900 JAMES
7902 FORD
7934 MILLER
TRAILER 000014

Regards
Michel

[Updated on: Fri, 25 June 2010 08:54]

Report message to a moderator

Re: Cobol high values/Low values [message #462672 is a reply to message #462667] Fri, 25 June 2010 09:45 Go to previous messageGo to next message
rareraja
Messages: 22
Registered: March 2005
Location: NJ, USA
Junior Member
Hi Michel,

Perhaps you don't understand my requirement, here it is ..

The file should contain first three positions as "LOW-VALUES" for header and "HIGH-VALUES" in trailer record.
we need to generate the first 3 position as such , mainframe will read them as low-values and high-values in header and trailer records respectively.

Currently we send 3 spaces for the first 3 positions in header and trailer records.

The generated output files header should starts with low-values(hexadecimal) in first 3 positions


The generated output files Trailer should starts with high-values(hexadecimal) in first 3 positions.

My question is how to generate the hexadecimal low and high values which will be read by mainframe out of oracle script ?
Re: Cobol high values/Low values [message #462674 is a reply to message #462672] Fri, 25 June 2010 09:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>My question is how to generate the hexadecimal low and high values which will be read by mainframe out of oracle script ?

CHR(0)
CHR(255)
Re: Cobol high values/Low values [message #462675 is a reply to message #462672] Fri, 25 June 2010 10:03 Go to previous message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
erhaps you don't understand my requirement, here it is ..

And perhaps you didn't post the example I asked several times. I posted EXACTLY your example.

Quote:
The file should contain first three positions as "LOW-VALUES" for header and "HIGH-VALUES" in trailer record.

What does this mean? Post an example of what this means.
What is LOW-VALUE and what is HIGH-VALUE? Give a defintion and an example.

Quote:
My question is how to generate the hexadecimal low and high values

My question is what are the hexadecimal value of low and high values?

Regards
Michel

[Updated on: Fri, 25 June 2010 10:03]

Report message to a moderator

Previous Topic: to get the last month record
Next Topic: external table does not show all records
Goto Forum:
  


Current Time: Sun Aug 03 10:31:28 CDT 2025