Transferring control to another job in same easytrieve pgm

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
sivaguru
Member
Posts: 6
Joined: Fri Sep 09, 2011 9:45 pm
Location: Chennai, India

Transferring control to another job in same easytrieve pgm

Post by sivaguru » Fri Sep 09, 2011 10:03 pm

Hello everyone,
I have started programming in easytrieve very recently. I have been using this forum till now as a reader. This would be my first post. I truly appreciate all the hard learned knowledge being shared.

I was able to successfully code two job statements separately within a single easytrieve program. Now, I am trying to transfer control from one job to another job inside the same easytrieve program. Is this possible?

I tried naming the job using NAME optional parameter. But I am lacking the knowledge to execute another job passing a key and retrieve the control back to the main job. I tried with GO TO statement. But I either get "B056 UNRESOLVED LABEL REFERENCE" or "B049 PARAMETER IGNORED" when using the job name before and after respective.

I am also wondering how to call an easytrieve subprogram. The manuals I read clearly state I can call subprograms in other languages. Does Easytrieve allow calling a subprogram written in Easytrieve? If yes, how should I go about LINKing the programs or should I use ENVIRONMENT NONE in my program?

Kindly help me on this.

Many thanks,
Sivaguru

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Sep 10, 2011 12:03 am

So far, i've not seen 2 JOB statements in the same program. If there is some reason for 2 JOB statements, suggest you create 2 programs or write the code so that the files are read under program control rather than the JOB statement.

Read about LINK to "call" an Easytrieve module - i believe this will do what you want.
Have a good one

sivaguru
Member
Posts: 6
Joined: Fri Sep 09, 2011 9:45 pm
Location: Chennai, India

Post by sivaguru » Sat Sep 10, 2011 1:30 am

Hi Dik,

Thank you so much for ur response.

Please post a link where i can learn about linking another easytrieve program. I am unable to find it. I will try the functionality with ur suggestion.

BTW, is there a way we can reset the EOF set by the system to enable the program to read from the first record again in a PS file?
I must b implementing this logic in easytrieve.

Please advise.

Thanks very much,
Sivaguru
Thanks,
Sivaguru

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Sep 10, 2011 9:07 am

There is almost NEVER a good reason to start back at the beginning of a sequential file. Why does someone believe it is needed here?

The info about LINK is in the Easytrieve Documentation. If your organization is licensed to use the product, all of the material may be downloaded free from CA Support.
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others