Cobol high values/Low values [message #462537] |
Thu, 24 June 2010 15:51  |
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 #462662 is a reply to message #462584] |
Fri, 25 June 2010 08:42   |
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   |
 |
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   |
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 #462675 is a reply to message #462672] |
Fri, 25 June 2010 10:03  |
 |
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
|
|
|