|
View previous topic :: View next topic
|
| Author |
Message |
Emmanuel Diaz
New User
Joined: 14 Feb 2009 Posts: 2 Location: PRODESIS
|
|
|
|
Hi! I need to record the letter Ñ in a file; my compiler has the next lines:
//COB EXEC PGM=IGYCRCTL,COND=(4,LT,PC),
// PARM='RENT,DATA(31),XREF,MAP,NUMPROC(PFD),OPTIMIZE(FULL),
// DYNAM,TEST,APOST,OFFSET,LIB'
Can you help me? thanks. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Using FUNCTION NATIONAL-OF and CCSID 284 should give you what you want -- read the COBOL manuals (link at the top of the page) for the details of how to use this function. |
|
| Back to top |
|
 |
Emmanuel Diaz
New User
Joined: 14 Feb 2009 Posts: 2 Location: PRODESIS
|
|
|
|
My boss did this:
| Code: |
IF FIELD-Q = 'Ñ'
MOVE 'µ' TO FIELD-Q-OUT
END-IF |
File in TSO: (hex)
| Code: |
2009-04-01µ
FFFF6FF6FFA
20090040010 |
in file .txt
2009-04-01Ñ
OK, but............. i have another problem:
In my COBOL source:
| Code: |
IF FIELD-X = 'Ñ'
WRITE REG-OUT
END-IF |
In compiled:
IF FIELD-X = ' ' (WHERE'S THE Ñ?)
My file IS EMPTY and FIELD-X has 'Ñ' (is a column of DB2 table and I see it in QMF)
| Code: |
//COB EXEC PGM=IGYCRCTL,COND=(4,LT,PC),
// PARM='RENT,DATA(31),XREF,MAP,NUMPROC(PFD),OPTIMIZE(FULL),
// DYNAM,TEST,APOST,OFFSET,LIB' |
Can you help me? THANKS |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
1. Posting this is completely useless:
| Quote: |
//COB EXEC PGM=IGYCRCTL,COND=(4,LT,PC),
// PARM='RENT,DATA(31),XREF,MAP,NUMPROC(PFD),OPTIMIZE(FULL),
// DYNAM,TEST,APOST,OFFSET,LIB' |
since we didn't ask to see the compile options.
2. Did you read up on NATIONAL-OF and CCSID as previously requested? You may be able to put a character into COBOL using your emulator, but the character you put in the IF statement may not be the character you think it is. You would need to look at the hex value of the compiler output to see how the character was handled. And it may not match the input file character, either.
And learn to use BBcode for code and hex -- it at least is not a proportional font! |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|