Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JSON in cobol 6.1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
srikant314

New User


Joined: 26 Oct 2016
Posts: 4
Location: INDIA

PostPosted: Wed Jan 22, 2020 5:39 pm    Post subject: JSON in cobol 6.1
Reply with quote

Hello team,

We have recently migrated to cobol 6.1 from 4.2 cobol version.
Now when I excute the below code I get a junk output. If anyone can assist me here.

Group variable declaration

Code:
01 G.                                   
   05 h.                               
      10 a pic x(10) Value 'Eh?'.       
      10 3_ pic 9 Value 5.             
      10 C-c pic x(10) Value 'See'.



In the main section I have put in the below code --

Code:
JSON GENERATE json-text FROM G   
DISPLAY 'JSON ......:' json-text

output as below --

Code:
JSON ……: #    #   #  /               '''


You should know by now that you should use the code tags to present code and data. I've done it for you this time. In future do it yourself.
Back to top
View user's profile Send private message

shyamkumar15

New User


Joined: 29 Jan 2020
Posts: 1
Location: India

PostPosted: Wed Jan 29, 2020 12:12 pm    Post subject: Reply to: JSON in cobol 6.1
Reply with quote

You need to use MOVE FUNCTION DISPLAY-OF(FUNCTION NATIONAL-OF(GROUP VARIABLE (1:LENGTH OF GROUP) 1208)) to display in valid characters.
Also to use national variable you must compile with DBCS option.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Restart logic by using cursor name in... Twinkle22 Mainframe Interview Questions 1 Wed Jul 29, 2020 11:26 am
No new posts COBOL Developers Perspectives on Soft... achakarov COBOL Programming 4 Sat Jul 18, 2020 1:26 am
No new posts CALL statement in COBOL for VSE Kirthishine COBOL Programming 3 Fri Jun 26, 2020 12:12 pm
No new posts Question for Cobol Report Writer jackzhang75 COBOL Programming 3 Wed May 27, 2020 4:35 am
No new posts Compare multiple files using JCL/Rexx... tanvi110788 JCL & VSAM 4 Tue May 19, 2020 5:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us