Results 1 to 4 of 4

Thread: Cobol

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Cobol

    How can you submit a job from COBOL programs?


  2. #2
    Junior Member
    Join Date
    Aug 2008
    Answers
    2

    Re: Cobol

    One way is to write to the internal reader the needed JCL statements.


  3. #3
    Junior Member
    Join Date
    Sep 2008
    Answers
    5

    Re: Cobol

    by using display statement write u r entire jcl and compile u r cobol program as usual and run it by using (INTRDR,...) like this
    or
    write u r entire jcl program in one ps file and call it like a file while running use INTRDR command


  4. #4
    Junior Member
    Join Date
    Sep 2008
    Answers
    5

    Re: Cobol

    The below given is an example of how to submit a jcl from a cobol pgm:
    ============================================================
    ============ cobol code which has the jcl statements:
    ========================================= identification division. Program-id. Prog55. Environment division. Input-output section. File-control. Select in-file assign ddfile1 organization is sequential file status is in-status. Data division. File section. Fd in-file. 01 in-rec pic x(80). Working-storage section. 01 in-status pic x(2). Procedure division. Open output in-file. Display in-status. Move '//sort002 job msgclass=x,class=t,' to in-
    rec. Write in-rec. Move '// msglevel=(1,1),notify=xxxxx' to in-
    rec. Write in-rec. Move '//stepdef exec pgm=iefbr14' to in-
    rec. Write in-rec. Move '//data1 dd dsn=tnl.pv.intrdr.samf,disp=
    (new,catlg),' to in-
    rec. Write in-rec. Move '// lrecl=80' to in-
    rec write in-rec. Display in-status. Close in-file. Stop run. This is the jcl to run the above cobol pgm 'prog55' from endevor library. Note: '//ddfile1 dd sysout=(*,intrdr)' used below. Also the ddfile1 is used as the dd name in the above cobol pgm
    ============================================================
    =============== edit ,xxxxx.general.jcl(intr1) - 01.03 ******,***************************** top of data ******************************
    000001,//xxxxx98 job class=a,
    000002,// msgclass=x,time=nolimit,
    000003,// notify=&sysuid,
    000004,// msglevel=(1,1)
    000005,//step0010 exec pgm=prog55
    000006,//ddfile1 dd sysout=(*,intrdr)
    000007,//sysprint dd sysout=*
    000008,//sysudump dd sysout=*
    000009,//steplib dd dsn=pmi.cr.supt.loadlib,disp=shr
    000010,//sysin dd dummy
    ******,**************************** bottom of data **************************** this is the job that is created & submitted by the cobol pgm:
    ============================================================
    === sysview ispf1 rcem --------------,job queues,------- 26jan08 11:08:50 ,* ,all, ,all ,all ,
    cmd jobname type jobnr queue stat| ccode ,sort002 job 93409 outp hldc,..................... 0,
    ********************************* end of data ********************************* this new jcl contains the below given jcl statements:
    ====================================================== ******,***************************** top of data ******************************
    000001,//sort002 job msgclass=x,class=t,
    000002,// msglevel=(1,1),notify=xxxxx
    000003,//* $acfj219 acf2 active rcemp1
    000004,//stepdef exec pgm=iefbr14
    000005,//data1 dd dsn=tnl.pv.intrdr.samf,disp=(new,catlg),
    000006,// lrecl=80
    ******,**************************** bottom of data ****************************


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact