Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Implement JSON in CICS from COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Rick Silvers

New User


Joined: 31 Mar 2012
Posts: 9
Location: USA

PostPosted: Wed Dec 16, 2015 4:44 am    Post subject: Implement JSON in CICS from COBOL
Reply with quote

Hi!

We are trying to implement JSON in CICS from COBOL but keep getting some weird things going on. We are using bottom-up approach ...taking COBOL copybooks created from a .NET JSON request and creating the JSON schemas. Using the example chapter 11 in redbook Implementing IBM CICS JSON Web Services for Mobile Applications. All the artifacts are created in the z/FS along with the wsbind file. Code has been added to COBOL program using CICS commands to create channels/containers and web open and web post and the DFHJSON link program to convert cobol data to JSON. Bundle and URIMAP created to point to .NET web services

All works well containers DFHJSON-TRANSFRM gets created, DFHJSON-DATA gets created and the link to DFHJSON works and creates the JSON schema containing the data from DFHJSON-DATA

web open works fine but the web converse gets a HTTP 400 - bad request ...what we found out the DFHJSON is putting the whole schema and the .NET side is only expecting the 4 request fields

also when I use the JSON assistants to recreate the wsbind file it doesn't get refreshed and it tries to use previous version of the wsbind/bundle part even though it has been deleted out of the z/FS directory before the new/changed JSON runs

If anyone has experience setting up a CICS JSON as a client to another environment such as .NET ...any suggestions would be greatly appreciated

Thank you,
Rick
Back to top
View user's profile Send private message

Rick Silvers

New User


Joined: 31 Mar 2012
Posts: 9
Location: USA

PostPosted: Sun Jan 03, 2016 1:30 am    Post subject: Reply to: CICS JSON
Reply with quote

We have it working after few trial and errors. CICS is acting as a web service client requesting information from Azure. NET....using top-down approach (JSON objects to JSON Schema and COBOL COPYBOOKs) via the JSON assistant DHFJS2LS...no RESTful...Below explains how it works

Have CICS System programmers define

URIMAP - with endpoint
BUNDELS - have to be in own separate z/FS directory (request,response1, response2)
TRANSids

Application programmers do this

1.Use JSON objects supplied by Azure .NET and create JSON schemas at http://jsonschema.net/#/
2. Add the schemas into z/FS with dir names matching to the BUNDLE names which also match the JSON container DFHJSON-TRANSFRM
3. Run DFHJS2LS for each schema with parms pointing to z/FS directory where schemas are located ...this step also creates the COBOL COPYBOOKS
4. After running DFHJS2LS.... JSBIND dir and Metadata and log files will be created in z/FS directory
5. Add the generated COBOL Copybooks and CICS commands PUT/GET JSON CONTAINERs,OPEN/CONVERSE/CLOSE WEB into your COBOL program using examples in Chapter 11 Developing a simple JSON web of the Implementing IBM CICS JSON Web Services for Mobile Applications service client application REDBOOK. The examples from the REDBOOK worked just like they are explained.....
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us