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
 

 

Initializing an ESDS with a low-values record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Initializing an ESDS with a low-values record
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 13, 2011 9:49 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 13, 2011 11:04 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jul 14, 2011 12:47 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jul 14, 2011 1:05 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jul 14, 2011 1:34 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jul 14, 2011 1:57 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Jul 14, 2011 2:02 pm    Post subject: Reply to: Initializing an ESDS with a low-values record
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    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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm


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