A newbie tries to create a new DS using DD



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

A newbie tries to create a new DS using DD

Postby INGBI » Fri Nov 18, 2011 10:52 pm

Guys, i understand that this question is a newbie one, but i really need your help!
//DEXTR JOB                                                       
//RUNPROG EXEC PGM=IKJEFT01,DYNAMNBR=20                             
//STEPLIB DD DSN=DB2.V9R1.SDSNLOAD,DISP=SHR                         
//ORDERDAT DD DSN=XXXXX.FFFF.EEEEE,DISP=(NEW,CATLG),               
//         SPACE=(CYL,(1,1)),DCB=(RECFM=FB,BLKSIZE=32000)           
//SYSPRINT DD SYSOUT=A                                             
//SYSIN DD *
  DSN SYSTEM (DB1S)
   RUN PROG (DEXTR)-               
       PLAN (DEXTR)-               
       LIB ('DBS.SELL.PART.LOAD')
   END                               
 /*       

What's wrong with this job? Why it creates data set that is empty? I just need to know what to look at to discover this mystery!
INGBI
 
Posts: 12
Joined: Fri Nov 18, 2011 10:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: A newbie tries to create a new DS using DD

Postby Akatsukami » Fri Nov 18, 2011 11:00 pm

Presumably the file ORDERDAT is to be written to by the program DEXTR (although since I don't have the source for the program, I can't say for sure).

  1. What did you expect to be in XXXXX.FFFF.EEEEE?
  2. You show JCL, but no sysout. Are there any obvious messages or codes (like an S806 abend) that would explain the absence of output data?
  3. Hi, Opal!
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: A newbie tries to create a new DS using DD

Postby INGBI » Fri Nov 18, 2011 11:26 pm

//DB2EXTR JOB                                                       
//RUNPROG EXEC PGM=IKJEFT01,DYNAMNBR=20                             
//STEPLIB DD DSN=DB2.V9R1.SDSNLOAD,DISP=SHR                         
//ORDERDAT DD DSN=XXXXX.HIST.ORDS,DISP=(NEW,CATLG),               
//         SPACE=(CYL,(1,1)),DCB=(RECFM=FB,BLKSIZE=32000)           
//SYSPRINT DD SYSOUT=A                                             
//SYSIN DD *
  DSN SYSTEM (DB1S)
   RUN PROG (DB2EXTR)-               
       PLAN (DB2EXTR)-               
       LIB ('XXX.CONTEST1.PART2.LOAD')
   END                               
 /*       

 IKJ56250I JOB DB2EXTR(JOB00489) SUBMITTED
 ***                                     

I expected an a report of the total sales to date this year for each retailer.
The question is do I need to use DCB in DD?
(And i do not know what is (or who is?) Opal )
(Sorry about the name of the job in beginning, thought more of anonymity then about smthn else).
INGBI
 
Posts: 12
Joined: Fri Nov 18, 2011 10:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: A newbie tries to create a new DS using DD

Postby enrico-sorichetti » Fri Nov 18, 2011 11:31 pm

Why it creates data set that is empty?

if the dataset was created, it there after the execution of Your jcl

did it occur to You that most probably the program wrote nothing into it...

not a jcl issue, nor anything for which, given the info provided, we can provide help,
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: A newbie tries to create a new DS using DD

Postby INGBI » Fri Nov 18, 2011 11:39 pm

    The existing program to extract all sales data since the beginning of the year from the DB2 database is
    called DB2EXTR and is stored in ZOS.CONTEST1.PART2.LOAD. In order to execute this program you will
    need to submit a JCL job.

That is the JCL i had at beginning:
//RUNDB2AP JOB MSGCLASS=H,NOTIFY=&SYSUID,TYPRUN=SCAN               
//RUNPROG EXEC PGM=IKJEFT01,DYNAMNBR=20                             
//STEPLIB DD DSN=DB2.V9R1.SDSNLOAD,DISP=SHR                         
//SYSTSPRT DD SYSOUT=A                                             
//SYSTSIN DD *                                                     
 DSN SYSTEM (DB2ID)                                                 
 RUN PROG (MYPROG) -                                               
     PLAN (MYPLAN) -
    LIB ('MY.PROGS.LOAD')
 END                       
/*   


I had to do this stuff with it:
    The first line in the job contains a JOB statement that assigns a name to the job.
    ➔Change the name of the job to DB2EXTR.
    The next statement in the job is an EXEC statement, which marks the beginning of a step in the job and causes a program to be executed. In this case, the program being executed is IKJEFT01, the TSO Terminal Monitor Program. This program will execute the commands specified in the SYSTSIN data definition statement.
    The DSN command connects the application to a particular DB2 subsystem.
    ➔Change the name of the subsystem to DB1S.
    The RUN command runs the application program.
    ➔Change both the name of the program and the DB2 plan name to DB2EXTR, and the library where the program can be found to ZOS.CONTEST1.PART2.LOAD.
    ➔Submit the DB2EXTR job and check the output.
    It turns out that this job contains a parameter that requests that the system validates the syntax of the JCL you have written without proceeding to execute the job. This parameter can be useful for checking for errors when writing or modifying jobs, but you will need to remove it and submit the job once again in order to run the program.
    ➔Check the job output in SDSF to see if it completed successfully.
    There doesn't seem to be any output from the program execution, and it executed for zero time. I don't think the program was executed by the job...Hmm, more problems. Your job isn't complete yet!
    The DB2EXTR program outputs the data it extracts from the database to a file called ORDERDAT. However, this isn't the name of the data set because z/OS uses symbolic file names to provide naming redirection between the file name used within the program and the actual data set used during the execution of the program. This indirection allows the same program to be run against different data without needing to change it or add support for passing in many parameters.
    The JCL data definition (DD) statement allows you to define a file in a job step that will be available to the program being executed, and specify the data set that this file refers to.
    Your job was unable to open the output file as there was no corresponding DD statement in the job step. Therefore, you need to add a DD statement named to allocate a data set that the program can use for output.
    ➔Call new new DD statement ORDERDAT, and specify the necessary parameters so that the data set will be allocated with the following attributes:
    Use the DSN parameter to specify a data set name of xxxxxxx.HIST.ORDS
    Use the SPACE parameter to specify a primary and secondary space allocation of 1 cylinder.
    Use the DISP parameter to allocate a new data set when the job step is executed and catalog the data set when the step has completed successfully
    ➔Now that you've made those changes, submit the DB2EXTR job again.
    It should with a return code of zero, which indicates that it completed successfully. Browse the output data set to confirm that the program has successfully extracted the sales data from the database, and to familiarize yourself with the format of the data.
    Note: If you run the job more than once, you will need to delete the data set it creates first. If you do not do this, you will get a JCL Error and a message in the job output indicating that the new data set couldn't be allocated due to a duplicate data set name.
That is the info i have. It's lots of text i know, i am really sorry for that and for not knowing such easy things. Just i beg your help.
INGBI
 
Posts: 12
Joined: Fri Nov 18, 2011 10:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: A newbie tries to create a new DS using DD

Postby enrico-sorichetti » Fri Nov 18, 2011 11:58 pm

Your last post was completely useless and reading it just a waste of time

You described the <process> done to change the job and submit it.
now back to the original question...

answer YES/NO

did the job complete
was the dataset allocated
does the dataset contain any data ==> NO

please use Your brain cells ...
what info did You provide that could be used to determine why the dataset is empty ?
absolutely nothing

That is the info i have. It's lots of text i know, i am really sorry for that and for not knowing such easy things. Just i beg your help.

the info You have is useless
being sorry is useless
not knowing is irrelevant
begging for help is useless

/tautology on
posting useless data is useless
/tautology off
not answering the questions asked is a show stopper
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: A newbie tries to create a new DS using DD

Postby Akatsukami » Sat Nov 19, 2011 12:04 am

You need to supply a bit more -- actually a lot more -- information. I will try to explain.

(But first, "Opal". I used to be a member of a message board, one of the other members of which was a woman using the screenname "OpalCat". She was quite vehement in her opinion that a list had to have at least three items in it. The custom grew up that, whenever one of the members was going to post a two-item list, he would make it a three-item list by appending "Hi, Opal!" As can be seen, I still do that.)

The output is "held". Presumably you have a TSO ID from which the job is submitted. Your site will have some tool -- SDSF, IOF, (E)JES, or smething similar -- that will allow you to view it. View the file named JESMSGLG. Find the IEF403I (start) message and the IEF404I (end) message. Copy and paste everything between the two (if there are a reasonable number) here.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: A newbie tries to create a new DS using DD

Postby INGBI » Sat Nov 19, 2011 12:10 am

did the job complete ==> YES
was the dataset allocated ==> YES
does the dataset contain any data ==> NO

I have SDSF, what command should i use to view JESMSGLG.
INGBI
 
Posts: 12
Joined: Fri Nov 18, 2011 10:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: A newbie tries to create a new DS using DD

Postby enrico-sorichetti » Sat Nov 19, 2011 12:18 am

so it is not a jcl problem
the data being processed is...
we do not know anything about ...
the databases involved
the input data
the process to be done

so unless You post the sysout of the run it is time to stop wasting time with all this nonsense
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: A newbie tries to create a new DS using DD

Postby INGBI » Sat Nov 19, 2011 12:24 am

what is "sysout of the run", you mean this?
 IKJ56250I JOB DB2EXTR(JOB00555) SUBMITTED
 *** 

This is my problem idk what are you asking for. How to get this "sysout" where it lays?
INGBI
 
Posts: 12
Joined: Fri Nov 18, 2011 10:43 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post