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

Initializing an ESDS with a low-values record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gary Carter

New User


Joined: 05 Jul 2011
Posts: 5
Location: Canada

PostPosted: Wed Jul 13, 2011 9:38 pm
Reply with quote

I have an ESDS dataset that is allocated in STEPA of my job.

I want to initialize the file with a "low-values" record in STEPB before opening the file for INPUT in a COBOL program in STEPC (to prevent a file status code = 35).

Is there a way to get a record into my file without create a little dummy COBOL or Easytrieve program? Perhaps Syncsort or IDCAMS?

I've searched the forum but didn't find a solution that exactly fit my problem.

Any help is greatly appreciated.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 13, 2011 9:49 pm
Reply with quote

You can use an IDCAMS REPRO. I'm not sure about SyncSort. How big is the record?

Do you have access to DITTO?

Bill
Back to top
View user's profile Send private message
Gary Carter

New User


Joined: 05 Jul 2011
Posts: 5
Location: Canada

PostPosted: Wed Jul 13, 2011 10:16 pm
Reply with quote

I've have not seen DITTO used on the system I'm now supporting, so I'd rather use IDCAMS.

The record is VB. The record size definition is:
RECORDSIZE (16000 22031)

What would the REPRO statement look like? Would I have to allocate a sequential file with a low-values record in it or is there a way to have a "DUMMY" input?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 13, 2011 11:04 pm
Reply with quote

First, go to ISPF 3.2 and allocate a VB sequential file, with a length of 22031 and a blocksize of 22035.

Then, edit the file, inserting one line, which should default to 22031 bytes of SPACES.

After that, C X'40' X'00' ALL and save it. You now have a VB sequential file of 22031 bytes of LOW-VALUES.

The REPRO should be easy enough to figure out.

Just check existing site JCL. I'm sure you'll find the correct syntax....

Bill
Back to top
View user's profile Send private message
Gary Carter

New User


Joined: 05 Jul 2011
Posts: 5
Location: Canada

PostPosted: Wed Jul 13, 2011 11:40 pm
Reply with quote

Bill,
I knew I could REPRO a record into my VSAM file; I just wasn't sure the best way to create an input file. icon_redface.gif

Thanks a lot for the shortcut!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 14, 2011 12:47 pm
Reply with quote

the best way is to use Your <SORT> facilities, sort can write a VSAM dataset
so just use something along the lines of

Code:
 000004 //S1      EXEC PGM=SORT                                                 
 000005 //SYSOUT    DD SYSOUT=*                                                 
 000006 //SORTIN    DD *                                                       
 000007 DUMMY                                                                   
 000008 //SORTOUT   DD SYSOUT=*                                                 
 000009 //SYSIN     DD *                                                       
 000010   OPTION COPY                                                           
 000011   OUTREC BUILD=(80X'00')                                               
 000012 /*                                                                     


obviously use for sortout Your freshly defined ESDS and instead of 80 use an appropriate length
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 14, 2011 12:54 pm
Reply with quote

sort has a 4k (i think it is 4k) limitation on a lot of commands,
not sure if you can build=(22031X'00')

(i am at home, on vacation and can not test!) how's that for an excuse.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 14, 2011 1:05 pm
Reply with quote

I beg to differ, nothing that could not be done with a bit of ingenuity icon_biggrin.gif

the vsam definiton is for (16000,22031) which means ...
16000 average klength, 22031 maximum length.

so the proper approach would be to fill the dataset with a minimum length record

if the minimum length is 16000 nothing that a

Code:
OUTREC BUILD=(4000X'00',4000X'00',4000X'00',4000X'00')


could not do, I did not want to deal with the exact repeat factor and used a nice to carry on computations with value icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 14, 2011 1:34 pm
Reply with quote

a small correction ... to build a proper variable length record the sor control card should look


Code:
000026   OUTFIL FTOV,BUILD=(1024X'00')


TESTED with 1024,4000 and the 4x4000 giving a 16000 record icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 14, 2011 1:57 pm
Reply with quote

here is the TESTED jcl snippet
Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,                                         
 000002 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X                       
 000003 //DEFINE  EXEC PGM=IDCAMS                                               
 000004 //SYSPRINT  DD SYSOUT=*                                                 
 000005 //SYSIN     DD *                                                       
 000006   DELETE ENRICO.TEST.ESDS CLUSTER                                       
 000007   SET MAXCC=0                                                           
 000008   DEFINE CL (  NAME(ENRICO.TEST.ESDS) -                                 
 000009                RECORDSIZE(16000 22031) -                               
 000010                CYLINDERS(1 1) VOLUMES(MFTEST) -                         
 000011                NONINDEXED )                                             
 000012 //*                                                                     
 000013 //INIT    EXEC PGM=SORT                                                 
 000014 //SYSOUT    DD SYSOUT=*                                                 
 000015 //SORTIN    DD *                                                       
 000016 DUMMY                                                                   
 000017 //SORTOUT   DD DISP=OLD,DSN=ENRICO.TEST.ESDS                           
 000018 //SYSIN     DD *                                                       
 000019   OPTION COPY                                                           
 000020   OUTFIL FTOV,BUILD=(1024X'00')                                         
 ****** **************************** Bottom of Data ****************************

change the build to provide proper length constants for Your need
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 14, 2011 2:02 pm
Reply with quote

If the records are variable length, I doubt there is a problem with putting a single-byte-record on the file. There's no minium length. Maybe even a zero-length record would do.

To "avoid the file status 35", you don't need to actually have a record on the VSAM dataset at the OPEN. It works either if the file has record(s) or the file had had them previously. So you could put something on, then remove it, if you don't want the low-value record hanging around for ever.

If you want the low-value record for some purpose other than avoiding the 35, you have some options already
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top