Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
Retrieve multiple records with metacobol from CA Datacom

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Jose Juan J

New User

Joined: 25 Jul 2020
Posts: 1
Location: Mexico

PostPosted: Sat Jul 25, 2020 1:36 am    Post subject: Retrieve multiple records with metacobol from CA Datacom
Reply with quote


Let's say there is a table in CA DATACOM having a primary key of 2 records one numeric of 3 positions and another numeric 5 positions, now the first one may be duplicated but in combination with the second one we get an unique key, example, imagine these are keys

Fld1 Fld2
001 00001
001 00002
002 00001
002 00002
002 00005
099 00234

The number of records is not fixed there might be only 10 or 100 we don't know.

Now if I want to retrieve let's say all the records where the first field (3 numeric positions) equals to 002.. if this was DB2 I would just simply declare a cursor and fetch as many times necessary.
If it was a file I would use maybe Easytrieve and retrieve the records.

But the requirement is to use CA DATACOM and Metacobol I cannot even use SQL
What I was thinking was maybe using the command 'GETIT' from Metacobol which is supposed to do read sequential and use a perform until to read one by one until I found Field1 != 002.

Does anyone can visualize another way to do it?
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating a single-record file with CO... Joerg.Findeisen DFSORT/ICETOOL 8 Tue Oct 06, 2020 8:19 pm
No new posts JCL to extract repeating records saikarthik94 DFSORT/ICETOOL 6 Mon Oct 05, 2020 8:05 pm
No new posts Read 4MB message and split into multi... myselfsk15 COBOL Programming 9 Fri Sep 25, 2020 7:24 am
No new posts Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 16 Sun Sep 13, 2020 3:38 am
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm

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