Portal | 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
 
BMS map length field greater than zero

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

New User


Joined: 19 Jul 2018
Posts: 26
Location: Greece

PostPosted: Fri Oct 09, 2020 5:40 pm    Post subject: BMS map length field greater than zero
Reply with quote

Hi all,

I have a program in which the users are seeing data from a database (in a map) and are able to change or add records.
At first the program is filling the map with data that are already in the database and then , after the enter key has been pressed, it is getting all the data from the map and inserts into the database.
My problem is that I cannot specify when the data is coming from the database , therefore should not be inserted again , and when they are coming from a user action , therefore are new records to be inserted.
I tried checking the length field of a map field greater than zero but still data are inserted twice because when it receives data from the database it is getting set to greater than zero.
I do not have a duplicate error because i have a field in my primary key defined as identity generated always by default.
My next idea for this is to delete all the relevant records from the db and insert from the map but I dont like it.
Any ideas please?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8567
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 09, 2020 6:41 pm    Post subject: Reply to: BMS map length field greater than zero
Reply with quote

Put something in DFHCOMMAREA to let you know which fields were populated from the database before sending the map. If the database record(s) are short enough, you could copy the actual data into DFHCOMMAREA; otherwise, use an indicator byte for each field on the map to denote that it is coming from the database. Check that byte before updating the database with that field.
Back to top
View user's profile Send private message
Ziko13

New User


Joined: 19 Jul 2018
Posts: 26
Location: Greece

PostPosted: Fri Oct 09, 2020 6:47 pm    Post subject:
Reply with quote

yes...I will try the commarea solution
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2492
Location: NY,USA

PostPosted: Fri Oct 09, 2020 9:40 pm    Post subject:
Reply with quote

Don't FSET help to make that decision? If changed to 1 then insert else no.
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 Break a record into fields, each fiel... jackare SYNCSORT 2 Thu Oct 08, 2020 5:26 am
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... arunn SYNCSORT 10 Sun Oct 04, 2020 4:10 pm
No new posts How do i verify the char field is hav... Raghu M N PL/I & Assembler 1 Tue Sep 22, 2020 9:26 pm
No new posts RPLDDDD field for extended VSAM - ESDS amitsjcntl JCL & VSAM 0 Tue Sep 22, 2020 1:45 pm
No new posts Using L' to get length of instruction WilliamDownie PL/I & Assembler 1 Thu Jul 09, 2020 9:20 pm

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