Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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: 8165
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: 6968
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us