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
 

 

Smart/restart logic implememtation
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Wed Jul 03, 2013 12:33 pm    Post subject: Smart/restart logic implememtation
Reply with quote

Hi ,

I am writing a cobol program where i copy one sequential file records to various output files. But i want to implement SMART/Restart logic. Please give me a stepwise solution of how i can implement it. What i want is a sample cobol program template and a sample JCL.

Thanks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Jul 03, 2013 12:40 pm    Post subject: Reply to: Smart/restart logic implememtation
Reply with quote

Assuming that you mean Smart/RESTART, why don't you consult the manuals or the vendor.

From their website "Knowledgeable and responsive support is available 24 hours a day, 7 days a week to supplement our clear and thorough product documentation."
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Wed Jul 03, 2013 12:58 pm    Post subject:
Reply with quote

Hi Bill,

Actually there is not enough documentation available. :-)

Thanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Jul 03, 2013 1:19 pm    Post subject: Reply to: Smart/restart logic implememtation
Reply with quote

Explain that to your boss. Expect that they sort it out. Find out who is allowed to talk to the vendor. There may be no-one with experience of the product on this site, but there certainly is lots of knowledge with the vendor.

Anyway, if you are just copying one input to several outputs, have you considered using your SORT product? It'll be faster.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Wed Jul 03, 2013 2:52 pm    Post subject:
Reply with quote

Do you wanted to know restart logic for Cobol or Cobol-db2 program?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 03, 2013 3:21 pm    Post subject: Re: Smart/restart logic implememtation
Reply with quote

shah.yameen wrote:
I am writing a cobol program where i copy one sequential file records to various output files.
Though I've not used SMART/restart ever however, curious to know - What type of output files are they? Are they QSAM (Sequential Files)?
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Wed Jul 03, 2013 4:05 pm    Post subject:
Reply with quote

ya, they are Physical Sequential Files
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 03, 2013 4:10 pm    Post subject:
Reply with quote

If they are sequential files, then how would you maintain the "position" in them, after an abend? I might sound silly but my experience is with GSAM, they are treated as "single occurence of IMS DB segment" and can serve the purpose for restart...
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Wed Jul 03, 2013 4:12 pm    Post subject:
Reply with quote

Using SMART/RESTART there will be actually autorestart process i.e it will restart by itself from the point where the abend occured. But we have to mention in JCL the parameter file which contains the Environment (PROFILE), Check Point frequency and wheter it is an Initial run or a restart run..and incase of restart files will be auto positioned .. Still lots of doubts because i used to do the restart using the old method by skipping teh records..

But need to do it using SMART/RESTART...
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Wed Jul 03, 2013 4:17 pm    Post subject:
Reply with quote

Here the basic intro :

http://www.google.ch/url?sa=t&rct=j&q=smart%20restart%20cobol&source=web&cd=4&ved=0CEUQFjAD&url=http%3A%2F%2Fwww.relarc.com%2Fdox%2Ff_srs5.pdf&ei=qQDUUcD_KpOg7Aaiv4HoAg&usg=AFQjCNEHiOqKUmO5qQ-m-FC8lIfCkEpDFg
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jul 03, 2013 9:05 pm    Post subject:
Reply with quote

Hello,

If the program only processes sequential data, why does someone believe a restart should be implemented. . . icon_confused.gif

There no reason that a purely sequential process needs a restart.
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Thu Jul 04, 2013 12:43 pm    Post subject:
Reply with quote

Mr. Scherrer

I would like to give you a Program description .. icon_smile.gif

I have one sequential file (XL2RF001) which contains records extracted from DB2 (hosted on z/os master ).

I have another system that runs on Abacus (z/os Slave) and it has data for 7 different environments.

what my program does is :
1.Reads the record from sequential file XL2RF001
2.Check the Target env
3. And write the record in one of the 7 target env sequential fiiles (which will be loaded to database on slave to respective env)

What if program abends in the middle ? At that time we should be having some mechanism to reset the poineters,data structures to the last sucessful commit point and We used to do this manually

But nowadays the Smart/Restart tool automates all this stuff for us and we dont have to write the Restart Logic by ourself anymore as it takes a snapshot of everything at the commit point and if abend occurs it will auto restart the program and will reset the structures as well as file pointers..
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Jul 04, 2013 1:05 pm    Post subject: Re: Reply to: Smart/restart logic implememtation
Reply with quote

Bill Woodger wrote:
Assuming that you mean Smart/RESTART, why don't you consult the manuals or the vendor.

From their website "Knowledgeable and responsive support is available 24 hours a day, 7 days a week to supplement our clear and thorough product documentation."
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Thu Jul 04, 2013 1:10 pm    Post subject:
Reply with quote

i have resolved the Issue now.. icon_smile.gif

Thank you All..!!
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 04, 2013 2:56 pm    Post subject:
Reply with quote

shah.yameen wrote:
i have resolved the Issue now.. icon_smile.gif
Just curious about the solution, can you please share?
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Thu Jul 04, 2013 5:48 pm    Post subject:
Reply with quote

Mr Anuj Dhawan

Ya.. I have done it.. I have used the SMART/RESTART in my program and i forcefully abended my program and i resubmitted the job and it completed sucessfully from the point where it left off.. I had to modify the JCL also.. Thank GOD .. icon_smile.gif
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Thu Jul 04, 2013 7:20 pm    Post subject:
Reply with quote

I would like to share the solution.

Lets assume that we are dealing with sequential files . File1 is Input & File2 is output
Write the program as usual. Ie open the Input file, Output file.
read the record from the Input File unitl eof and write the record to the output file. Once you write the record perform a commit (logical commit). I dont know if anyone of you have used Delta Macros and we have a macro named HYQREST which can be used to perform the commit. the syantax is
.ADD HYQREST,COMMIT,FORCE=N

That was the program..

Now comming to JCL.

In JCL u have to include the Control Parameter File (specified in your Smart/restart maual) and set the Parameters like CHECKPOINT FREQUENCY,REPOSITIONING FILE DDNAMES,REPOSITION STYLE etc

Dats it..!! icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 05, 2013 9:20 pm    Post subject:
Reply with quote

Hello,

Quote:
What if program abends in the middle ? At that time we should be having some mechanism to reset the poineters,data structures to the last sucessful commit point and We used to do this manually
I suggest this is a design deficiency. The sequential run should process the input qsam file and create the needed outputs.

When the job successfully completes, the 7 files should be sent to the target system(s) and not before.

This does Not need a checkpoint/restart.
Back to top
View user's profile Send private message
shah.yameen

New User


Joined: 03 Jul 2013
Posts: 11
Location: INDIA

PostPosted: Fri Jul 05, 2013 9:34 pm    Post subject:
Reply with quote

Mr scherrer

When the extraction process for each individual file is complete, we have to update the DB2 table for each order (status completed) .. Possibly an abend can occur while updating a table..
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 05, 2013 9:57 pm    Post subject:
Reply with quote

Hello,

As long as the "rules" keep changing, it will be difficult (or impossible) to make usefuil suggestions/observations.

Until this last post of yours, we (i at least) understood the process only had sequential output.

Even with this new wrinkle i believe there is still NO reason to complicate things with a restart trying to syncronize the db and 7 qsam outputs. With the little i know about your process, i believe i would consider passing the input table(s) once, writing out the 7 qsam files. Then, in 7 steps, i would read the 7 new files and apply the changes to the database. Each step would force a cneckpoint at the end and if some kind of restart was needed, it is rather straightforward.

Again, this is only from the little i see here and may not work if there are more new "understandings".
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 -> COBOL Programming All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Wildcard logic in COBOL dudenithy COBOL Programming 13 Thu Sep 01, 2016 7:36 pm
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm
No new posts Tricky sort logic required pgopi92 DFSORT/ICETOOL 3 Mon Jan 25, 2016 3:29 pm
No new posts DB2 - CURRENT DATE + 2 YRS logic balaji81_k DB2 3 Thu Nov 26, 2015 3:07 am


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