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

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: 8569
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 Printing a dataset in DUMP format wit... ABENDS & Debugging 2
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts Converting Hex to PD Special Condition SYNCSORT 3
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top