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

Converting a copybook value into Json Format.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srikant314

New User


Joined: 26 Oct 2016
Posts: 5
Location: INDIA

PostPosted: Mon Jun 03, 2019 11:17 am
Reply with quote

Hello Everyone,
I have tried to convert a copybook into JSON Format in Cobol but was unable to do as the Z/OS version 4.1 does not support JSON generator.
Then I tried to run a JCL which a selcopy utility. This worked fine and I was able to get the JSON format. But due to my copybook using redefine clause I am unable to get the required format. Can anyone help me with any idea how Json file format can be achieved ? My file has 3or 4 rows for a particular request and hence redefine clause is very essential and due to this I am facing problem while conversion using Selcopy utility.
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: Mon Jun 03, 2019 6:17 pm
Reply with quote

The Enterprise COBOL Language Reference manual for version 6.2 states that JSON GENERATE does not support REDEFINES. The CICS Transaction Server 5.2 Configuring manual indicates that the DFHLS2JS utility does not support REDEFINES. So even if you were using a version of COBOL that supported JSON GENERATE, you would not be able to use the REDEFINES.

You need to think of another way to get what you want rather than just focusing on what cannot work. Perhaps a hand-coded REDEFINES would accomplish your goal? If not, you may just have to accept that it is not possible to do what you want and move on to more feasible objectives.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top