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

Need help with ADABAS query (COBOL-ADAPREP)


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RTE200

New User


Joined: 06 Nov 2024
Posts: 5
Location: Israel

PostPosted: Mon Nov 11, 2024 5:41 pm
Reply with quote

Howdy, everyone.

I want to hit a range of records, not based on any existing key.

Code:
@ADADCL111,  FILE-NAME   DESCRIPTOR-KEY-NOT-HELPING-OR-MISSING,
             FIELD-SOURCE
             FIELD-TARGET
           ,,SUFFIX88 .


A condition for update is when FIELD-TARGET not equals to FIELD-SOURCE.

(FIELD-TARGET gets value from FIELD-SOURCE if the condition true)

I did relatively solid amount of reading at the official S-AG website, but I still don't get how can I implement such a query.

P.S.
Currently I'm iterating sequentially, using READISN, and checking the values via plain IF statement.
Back to top
View user's profile Send private message
RTE200

New User


Joined: 06 Nov 2024
Posts: 5
Location: Israel

PostPosted: Mon Feb 10, 2025 4:15 pm
Reply with quote

Ok, maybe someone will find it useful:

  • If you need full-file-scan, it is better to use READ PHYSICAL (L2).
  • Know your prod-data: make sure you're not drilling too deep into current record, when you can filter-out the record early (inverse search). Maybe you only need to update 0.1 % of your records.
  • Make sure you are not leaving transaction open for too long (lets say you did 1 update, and a bunch of reads after that, eventually leading to trx-timeout-abend).
  • Keep separate ADADCL for updated fields, so that you could use INITIALIZE RECORD-BUF, when needed.
  • Only do read-hold when it's time to update, and keep track of updates count.
  • Multifetch can be useful, but I never tried it myself.

Have a good one, mates.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts COBOL Infinite loops COBOL Programming 7
No new posts Problem moving a cobol program into E... COBOL Programming 3
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
Search our Forums:

Back to Top