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 COBOL - Array result in single variab... vinu78 COBOL Programming 3 Thu Feb 20, 2020 5:29 pm
No new posts Dynamic cursor name in Cobol program Jlevine COBOL Programming 1 Fri Feb 14, 2020 2:55 am
No new posts Indent cobol code Renato Zangerolami COBOL Programming 6 Thu Feb 13, 2020 12:53 am
No new posts Eliminating blank space in XML parsed... elixir1986 COBOL Programming 0 Tue Feb 11, 2020 4:41 am
No new posts I need help with analysis of a COBOL ... John Poulakos All Other Mainframe Topics 14 Fri Jan 24, 2020 9:08 pm

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