View previous topic :: View next topic
|
Author |
Message |
Gary Carter
New User
Joined: 05 Jul 2011 Posts: 5 Location: Canada
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Gary Carter
New User
Joined: 05 Jul 2011 Posts: 5 Location: Canada
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Gary Carter
New User
Joined: 05 Jul 2011 Posts: 5 Location: Canada
|
|
|
|
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.
Thanks a lot for the shortcut! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I beg to differ, nothing that could not be done with a bit of ingenuity
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|