IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PGM=IGYCRCTL; I need record the letter Ñ


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Emmanuel Diaz

New User


Joined: 14 Feb 2009
Posts: 2
Location: PRODESIS

PostPosted: Wed Jun 17, 2009 5:12 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 17, 2009 6:06 am
Reply with quote

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
View user's profile Send private message
Emmanuel Diaz

New User


Joined: 14 Feb 2009
Posts: 2
Location: PRODESIS

PostPosted: Tue Dec 08, 2009 10:45 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Dec 08, 2009 11:04 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top