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
 

 

JCL with a VB file - File created with Zero records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nartcr

New User


Joined: 06 Jun 2007
Posts: 78
Location: anada

PostPosted: Fri Oct 19, 2012 7:11 am    Post subject: JCL with a VB file - File created with Zero records
Reply with quote

I have been trying to troubleshoot this from last many hours, any insight would be helpful for me at this stage. The issue i am facing is, when i execute the below JCL, the dataset ( X12EXT ) is getting created with ZERO records.

I have the following JCL:

Code:
//TESTD37  EXEC PGM=TESTD37
//STEPLIB  DD DSN=CMNP.RWIP0.P.X.TSTP.#002443.LDB,DISP=SHR
//         DD DSN=CMNP.PLODB.P.TSTP.PROD,DISP=SHR
//TEMPDS   DD DSN=TSTD.SAIFB.N.GAMEXT.F83H.G0016V00,DISP=SHR
//X12EXT   DD DSN=VF0009.TEST.N.NARA.TST,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),
//            DCB=(RECFM=VB,LRECL=254)
//SYSUDUMP DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*


This is my FD section for the above file.

Code:
FILE SECTION.

FD  TEMPDS-FILE
    RECORDING MODE IS V
    LABEL RECORDS STANDARD
    BLOCK CONTAINS 0 RECORDS
    RECORD IS VARYING IN SIZE FROM 1 TO 250 CHARACTERS.

01  TEMPDS-REC               PIC X(250).

FD  X12OUT-FILE
    RECORDING MODE IS V
    LABEL RECORDS STANDARD
    BLOCK CONTAINS 0 RECORDS
    RECORD IS VARYING IN SIZE FROM 1 TO 250 CHARACTERS.
01  X12OUT-REC               PIC X(250).



This is my write Para:
Code:
150-WRITE-X12OUT-FILE.

    DISPLAY 'NARA:' WS-X12OUT-RECORD.
    WRITE X12OUT-REC   FROM WS-X12OUT-RECORD.
    ADD 1              TO   OUT-REC-CNT.

150-WRITE-X12OUT-FILE-END.
    EXIT.


The display details are shown in SPOOL.

Code:
NARA:TEST RECORD FOR CUSTOMER A
NARA:HELLO GOOD MORNING


would someone be able to throw some insight to this? If you need more info, let me know.

Spool shows that the dataset was retained - and i couldnt find a trace of job not doing it.

Code:
IEF142I TESTL9LF TESTD37 - STEP WAS EXECUTED - COND CODE 0000
IGD104I CMNP.RWIP0.P.X.TSTP.#002443.LDB              RETAINED,  DDNAME=STEPLIB
IGD104I CMNP.PLODB.P.TSTP.PROD                       RETAINED,  DDNAME=
IGD104I TSTD.SAIFB.N.GAMEXT.F83H.G0016V00            RETAINED,  DDNAME=TEMPDS
IGD104I VF0009.TEST.N.NARA.TST                       RETAINED,  DDNAME=X12EXT
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Oct 19, 2012 7:58 am    Post subject:
Reply with quote

1. your select statements
2. do you display OUT-REC-CNT at eoj?
3. what is the data definition of structure WS-X12OUT-RECORD
4. show us the ALLOCATE entries of the spool. (start of job)

your fd statements are TEMPDS and X12OUT,
why not X12EXT?

Quote:
and i couldnt find a trace of job not doing it.

what does this mean?
what is contained in ds VF0009.TEST.N.NARA.TST

why do you think this is a JCL issue and not COBOL?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 19, 2012 8:17 am    Post subject:
Reply with quote

What is the file status code from the OPEN? WRITE?
What compile options are you using?
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 78
Location: anada

PostPosted: Fri Oct 19, 2012 8:23 am    Post subject:
Reply with quote

I feel like crying - Thanks a lot Dick.

"your fd statements are TEMPDS and X12OUT,
why not X12EXT? " was the reason. JCL was just allocating dataset, and wasnt doing anything further.

Thanks a lot for your response.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Oct 19, 2012 8:27 am    Post subject:
Reply with quote

well, you are welcome,


BTW JCL does nothing other than communicate (via Job Control Language)
to the system,
what should be done.

then the system takes over,
and the individual parts of the system (services)
do things.

and,
as Robert implied,
you should start implementing files status codes,
and checking of the status code after every i/o request.
would have saved you some tears.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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