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
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 4 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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