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
 

 

Comparing file format of variable files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 4:16 pm    Post subject: Comparing file format of variable files
Reply with quote

Hi,

I have a variable file F1.When I'm rewriting this file and trying to clone it, it's abending. When I tried to clone the same file before rewriting it's getting cloned.Pls tell how to compare two variable files, so that I can check whether any format changed after rewriting this file.

3.13 will do only data compare.

Thanks,
Paul
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 17, 2008 4:57 pm    Post subject:
Reply with quote

What do you mean by cloning the file? Copying it? If so, rewrite would NOT be the right thing to do -- rewrite merely replaces an existing record in the file and does not create a copy.

And what do you mean by "whether any format changed"? Files don't have formats -- files have data. ISPF option 3.13 will do data compares and tell you the differences between two files.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1239
Location: Richfield, MN, USA

PostPosted: Fri Oct 17, 2008 5:06 pm    Post subject:
Reply with quote

Also, what do you mean by "variable file"? A file with variable length records?
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 5:24 pm    Post subject:
Reply with quote

Cloning means copying only..As per my requirement I want to rewrite the file,then copy it.

By format I meant whether the LRECL of the file.

By variable file I meant a file variable length records.

Thanks,
Paul
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 17, 2008 5:31 pm    Post subject:
Reply with quote

Quote:
so that I can check whether any format changed after rewriting this file.
followed by
Quote:

By format I meant whether the LRECL of the file.

Unless your job changes the LRECL of the file, it will not change on its own. For a variable length file, the LRECL needs to be the length of the longest record plus 4 bytes for the RDW.

However, I suspect what you're wanting to know is whether or not a particular record length changed -- which is extremely different from asking if the LRECL is different (LRECL applies to the entire file, not a single record in the file). Again, ISPF 3.13 will tell you changed record lengths.

What are you using to copy the file -- program or utility? You say when you rewrite and try to copy you're getting an abend. Which abend -- what's the code? What messages are you getting? Can the rewrite change the record length? Are you doing the rewrite with a program or a utility?
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 5:52 pm    Post subject:
Reply with quote

The maximum record length of my file is 1957.Please find the file details below

Volume serial: DEV929
File Type: KSDS
Device type: 3390
CI Size: 8192
Key length: 18
Key location: 8
Record format: V
Average record length: 1953
Maximum record length: 1957
Physical block size: 13682
Primary cylinders: 13
Secondary cylinders: 50


This file I'm rewriting through a COBOL program as below

SELECT FILE1 ASSIGN UT21
ORGANIZATION IS INDEXED
ACCESS IS SEQUENTIAL
RECORD KEY IS F1-KEY
FILE STATUS IS W120-FILE-STATUS.

FD FILE1.
01 FILE1-REC.
03 FILLER PIC X(8) VALUE SPACES.
03 F1-KEY PIC X(18).
03 FILLER PIC X(1931) VALUE SPACES.


READ FILE1.
MOVE FILE1-REC TO WS-F1-REC( where WS-F1-REC =X(1957))

REWRITE FILE1-REC FROM WS-F1-REC after editing the some records

The rewriting is going fine.
But after that when I'm trying to copy FILE1 using IDCAMS code its abending

//COPY1 EXEC PGM=IDCAMS
//SYSIN DD *
REPRO IFILE(F1PREV) OFILE(HEADER) COUNT(1)

//F1PREV DD DSN=XXXXX.XXX.XXX,
// DISP=SHR
//HEADER DD DSN=XXXX.XXX.XXXX,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(1957,(500,500),RLSE),AVGREC=U,
// DCB=(RECFM=VB,LRECL=1957,BLKSIZE=0)


This cloning is part of some project requiremnt

Thanks,
Paul


REPRO IFILE(F1PREV) OFILE(HEADER) COUNT(1)
IDC3302I ACTION ERROR ON XXXX.XXX.XXXX
IDC3309I ** RECORD X'002D000000' NOT WRITTEN. LENGTH INVALID
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 17, 2008 5:57 pm    Post subject:
Reply with quote

The VSAM file record length is 1957. Your LRECL on a flat file must be 1961 to allow for the 4-byte Record Descriptor Word that is part of variable length files. The BLKSIZE must be at least 4 bytes greater than the LRECL to allow for the Block Descriptor Word. Your REPRO fails because you wrote a record of 1957 bytes, which cannot be placed in the HEADER file as it is too long (1953 is the longest record you can put in it).
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 6:01 pm    Post subject:
Reply with quote

But when if I'm manually editing this FILE1 and trying to copy it, it's copying..That's why I got confused.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 17, 2008 6:05 pm    Post subject:
Reply with quote

You probably have EDIT-SETTINGS set to not preserve trailing blanks in your ISPF edit. In which case you could edit the file, the trailing blanks on the record would be removed, and the file record could be saved in 1953 bytes (as long as there were at least 4 trailing blanks in the record)
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 6:06 pm    Post subject:
Reply with quote

Can you please be much more detailed on the IDCAMS step as what should be the details I should give for the HEADER
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Fri Oct 17, 2008 6:07 pm    Post subject:
Reply with quote

Code:
//HEADER DD DSN=XXXX.XXX.XXXX,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(1961,(500,500),RLSE),AVGREC=U,
// DCB=(RECFM=VB,LRECL=1961,BLKSIZE=0)
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Fri Oct 17, 2008 7:07 pm    Post subject:
Reply with quote

But abending due to one more issue as down the line

//IEBCOMP1 EXEC PGM=IEBCOMPR
//SYSIN DD *
COMPARE TYPORG=PS
//SYSUT1 DD DSN=XXXXX.XXXXXX.XXXXX.XXXXXX1,
// DISP=SHR
//SYSUT2 DD DSN=XXXXX.XXXXXX.XXXXX.XXXXXX2,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSABEND DD SYSOUT=X,HOLD=YES
// ENDIF

where
XXXXX.XXXXXX.XXXXX.XXXXXX1 and XXXXX.XXXXXX.XXXXX.XXXXXX2
are having same file attributes

the abend is as follows

COMPARE TYPORG=PS
IEB255I CORRESPONDING RECORD LENGTHS ARE NOT EQUAL

DDNAME = SYSUT1
PHYSICAL RECORD NUMBER = 00000001 LOGICAL RECORD NUMBER WITHIN PHYSICAL RECORD = 00000001

DDNAME = SYSUT2
PHYSICAL RECORD NUMBER = 00000001 LOGICAL RECORD NUMBER WITHIN PHYSICAL RECORD = 00000001


Thanks,
Paul
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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