IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Why we cannot create the blank file with IEFBR14


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
deshmukhec

New User


Joined: 23 Jul 2008
Posts: 7
Location: india

PostPosted: Tue Jul 29, 2008 12:51 pm
Reply with quote

Why we cannot create the blank file with IEFBR14 and then input in to a program and what are the possibilities of unpredictable result?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jul 29, 2008 1:05 pm
Reply with quote

IEFBR14 is a "dummy" program which just returns control to the system immediately. It can be used to allocate/delete files but does not do any record processing. The results of inputting a file created by IEFBR14 to a program are very predictable - you get the ENDFILE condition every time.

You can output records to the file from the program.

If you need a blank record in the file, suggest you try using another utility such as IEBGENER or IEBDG.

Regards,
Garry.
Back to top
View user's profile Send private message
deshmukhec

New User


Joined: 23 Jul 2008
Posts: 7
Location: india

PostPosted: Tue Jul 29, 2008 2:35 pm
Reply with quote

@murmohk1
i don't want 2 say "we cannot create the blank file with IEFBR14"
i know we can allocate/delete Files thru IEFBR14

Code:
Reading an empty file?? You should understand the possibilities before using it
.
ADJACTELY!!! so can you please let me know the posssibilities???????? icon_smile.gif

@Garry Carroll
please read the steps below what i am trying to do:
1) STEP1-> thru rexx it will check the dataset either it's on mainframe or not.
2) STEP2-> if DSN is not on mainframe then it will create the file thru IEFBR14.
3) STEP3-> we are using the same file in QUIKJOB, to update the file.

actually my Job is getting Failed with U3336 ABEND in STEP3, when the DSN is not Present , but if dataset is already cataloged and we bypass the STEP2 then we didn’t get any ABEND/Failure.
[/code]
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Jul 29, 2008 2:37 pm
Reply with quote

Hi,

Quote:
Why we cannot create the blank file with IEFBR14 and then input in to a program and what are the possibilities of unpredictable result?

It's kinda half truth, if your shop is SMS managed (usually most of the shops are these days..) IEFBR14 would create an empty file with proper EOF which would not lead to any "unpredictable" outcome. If the file does not have an EOF marker, the code will typically abend. (case non-SMS managed sites)

The EOF marker is internal, you don't write code to look for the "EOF value" in your program - when program code issues a read, the "at end" condition is raised when the EOF is encountered.

In days past, simply cataloging a dataset caused the problem of no EOF which in turn caused abends (or running with incorrect data). With SMS-managed data, an EOF is created automatically when the file is allocated.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Jul 29, 2008 2:40 pm
Reply with quote

Hi,
Quote:
my Job is getting Failed with U3336 ABEND in STEP3, when the DSN is not Present
A very wild guess- how about using DISP=(MOD,?,?)
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jul 29, 2008 3:30 pm
Reply with quote

Quote:
please read the steps below what i am trying to do:
1) STEP1-> thru rexx it will check the dataset either it's on mainframe or not.
2) STEP2-> if DSN is not on mainframe then it will create the file thru IEFBR14.
3) STEP3-> we are using the same file in QUIKJOB, to update the file.

If you are checking the existence of the file in REXX why not just create it in the REXX if not found?
Do you expect to update existing records or add new records?

Anuj's suggestion of disp=(MOD,,) seems eminently sensible if just adding records and you wouldn't need REXX to check for existence. If the file is there it stays there, else it gets allocated. The QUIKJOB step would also use DISP=MOD to add to the file.

Regards,
Garry.
Back to top
View user's profile Send private message
deshmukhec

New User


Joined: 23 Jul 2008
Posts: 7
Location: india

PostPosted: Tue Jul 29, 2008 4:07 pm
Reply with quote

please see the Program:
Code:
/TEST123 JOB ('xxxP77',12),'RAJ',
//         MSGCLASS=T,CLASS=4,REGION=0M
//STEP1     EXEC CMDEXIST,                       
//         CLIST=PPC.TSG.REXX,                   
//         CLNAME=DSNFIND,                       
//         DSNAME=T91IPXX.DGN.SUPP.CHKTAB.M0508 
//*                                             
//* IF FILE NOT EXIST                         
//*                                             
//IFSTEP IF STEP1.EXIST.RC¬=0 THEN                                   
//STEP2    EXEC PGM=IEFBR14                                 
//DD1    DD DSN=T91IPXX.DGN.SUPP.CHKTAB.M0508,             
//          DISP=(,CATLG,DELETE),                         
//          UNIT=FPRARZ,                                   
//          SPACE=(CYL,(10,10),RLSE),                     
//          DCB=(RECFM=FB,LRECL=21,BLKSIZE=27993)     
//          ENDIF     
//*                                                       
//STEP3  EXEC PGM=QUIKJOB,PARM='9006X'                   
//SYSPRINT DD SYSOUT=*                                     
//SYSOUT   DD SYSOUT=*                                     
//SYSUT1   DD DSN=T91IPXX.DGN.SUPP.CHKTAB.M0508,DISP=SHR   
//SYSUT2   DD DSN=&&CHKTMP,                               
//          DISP=(,PASS,),                                 
//          UNIT=SYSWRK,                                   
//          SPACE=(CYL,(10,10),RLSE),                     
//          DCB=(RECFM=FB,LRECL=21,BLKSIZE=27993)         
//SYSIN    DD DSN=T91IPXX.PROD.QJOBLIB(RAJQJOB),DISP=SHR
//*                                                       
//STEP4     EXEC PGM=SYNCGENR                       
//SYSIN    DD  DUMMY                               
//SYSUT1   DD  DSN=&&CHKTMP,DISP=(OLD,DELETE)     
//SYSUT2   DD  DSN=T91IPXX.DGN.SUPP.CHKTAB.M0508, 
//          DISP=(,CATLG,DELETE),                 
//          UNIT=FPRARZ,                           
//          SPACE=(CYL,(10,10),RLSE),             
//          DCB=(RECFM=FB,LRECL=21,BLKSIZE=27993) 
//SYSPRINT DD  SYSOUT=*                           
//*                                   
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jul 29, 2008 5:10 pm
Reply with quote

I would think that you don't need the REXX step. Coding DISP=(MOD,CATLG,DELETE) in STEP02 should be enough.

You have the same file then as DISP=SHR in STEP03 and again as DISP=(,CATLG,DELETE) in STEP04. This will surely give you a JCL error in STEP04 ??

Regards,
Garry.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Jul 29, 2008 7:03 pm
Reply with quote

rajesh said:
Code:
actually my Job is getting Failed with U3336 ABEND in STEP3 (QUIKJOB)
What does the U3336 mean to QUIKJOB? This may be more helpful.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 29, 2008 7:33 pm
Reply with quote

This is a continuation of this topic http://ibmmainframes.com/viewtopic.php?t=32746&start=0&postdays=0&postorder=asc&highlight=quikjob
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Jul 29, 2008 8:23 pm
Reply with quote

Quote:
It's kinda half truth, if your shop is SMS managed (usually most of the shops are these days..)

Just to add my bit to this-
DFSMSdfp comes as default with z/OS, so all the shops using the z/OS should have it.
One more point- I see UNIT=FPRARZ in the JCL, could this be causing any problem? We don't know much about his site standards to know about FPRARZ properties.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Jul 29, 2008 9:29 pm
Reply with quote

Hello,

Quote:
The results of inputting a file created by IEFBR14 to a program are very predictable - you get the ENDFILE condition every time.
Unfortunately, not every time. . .

If the dasd is sms-managed there will be a valid eof. If the dasd is not sms-managed, the results are unpredictable - someimes a dcb mis-match abend occurs, sometimes incorrect data is read depending on what was on the dasd prior to the new file being allocated, sometmes an eof is processed.

Quote:
This is a continuation of this topic ibmmainframes.com/viewtopic.php?t=32746&start=0&postdays=0&postorder=asc&highlight=quikjob

Yup, and one should be locked - suggestions?
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Jul 30, 2008 12:34 am
Reply with quote

I use IEFBR14 to create datasets frequently.

In my experience at several shops (my current shop runs z/os and I believe SMS) If DSORG=PS is not specified and you create the dataset with IEFBR14 you may not be able to read it.

Code:
                                        Dsorg  Recfm  Lrecl  Blksz
------------------------------------------------------------------
hlq.TESTBR14.NODSORG                           FB        80      0
hlq.TESTBR14.WDSORG                      PS    FB        80  27920


I would use DCB=(RECFM=FB,LRECL=21,BLKSIZE=0,DSORG=PS)

As mentioned before if DISP=(MOD,CATLG,CATLG) is used the REXX to check to see if the dataset exists will not be needed.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Jul 30, 2008 12:53 pm
Reply with quote

I have a question at this point. Maybe expat will come for help here.

Suppose user is creating a dataset in a SMS managed environment without specifying STORCLAS/DATACLAS. Then the ACS routines will decide the DATACLAS. If what douglas has mentioned is correct (DSORG=PS is not specified and you create the dataset with IEFBR14 you may not be able to read it. ) then does it indicate problem related to ACS?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 30, 2008 1:18 pm
Reply with quote

The ACS routines have the capability of assigning a default DSORG for new dataset allocations, so if set up correctly they would remove the need for having to specify DSORG in the JCL or panel when a new dataset is allocated.

So, in my view, not a problem with the ACS routines, only the people that wrote them icon_biggrin.gif
Back to top
View user's profile Send private message
deshmukhec

New User


Joined: 23 Jul 2008
Posts: 7
Location: india

PostPosted: Wed Jul 30, 2008 2:52 pm
Reply with quote

many thanks for all instructive suggetions.

now what i tried is instead of using IEFBR14 i am creating/updating the dataset through Quikjob and it went fine.

again many thanks for your help icon_razz.gif

Quote:
i am deleting the below post: ibmmainframes.com/viewtopic.php?t=32746&start=0&postdays=0&postorder=asc&highlight=quikjob
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 30, 2008 3:18 pm
Reply with quote

I suppose that to be certain you could always use a little PROC to setup the datasets, and ensure that they are correctly written to to stop any problems.

Here's one I prepared earlier
This one can also create PDS & PDSE datasets, works with GDG's too.

Code:
//*                                             
//SETFILE  PROC DSN=,RF=,LR=,UN=TRK,PR=1,SC=1,DR=
//SETFILE  EXEC PGM=IEBGENER                     
//SYSOUT   DD SYSOUT=*                           
//SYSPRINT DD SYSOUT=*                           
//SYSIN    DD DUMMY                             
//SYSUT1   DD DUMMY,RECFM=&RF.,LRECL=&LR         
//SYSUT2   DD DSN=&DSN.,                         
//            DISP=(,CATLG,DELETE),             
//            SPACE=(&UN.,(&PR.,&SC.&DR.)),     
//            RECFM=&RF.,LRECL=&LR               
//SETFILE  PEND                                 
//*                                             
//FILE01   EXEC SETFILE,                         
//              DSN='data.set.name',             
//              RF=FB,LR=80,DR=',44'             
//*                                             
//FILE02   EXEC SETFILE,                         
//              DSN='data.set.name(+1)',             
//              RF=FB,LR=80

FILE01 is a PDS with 44 directory blocks
FILE02 is a plain old PS file AND a GDS as well.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts How can I add/create a new INIT(initi... TSO/ISPF 2
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top