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

"RECORD VARYING FROM" Clause


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhavishya_bhandari

New User


Joined: 30 May 2006
Posts: 7

PostPosted: Wed Jul 12, 2006 11:48 am
Reply with quote

Hi .

In case of having variable length record we can use
"RECORD VARYING FROM" Clause but in that case the maximum
record length will be considered.

But what if we have different files with different record length ??
i.e I may have file with maximum record length say 1000 at some
instant while same file might have maxi record length say 5000 ...

So is there any way i can get the file attributes (i.e maximum record
length etc) in the prog at run time ??
Back to top
View user's profile Send private message
nagae

New User


Joined: 17 May 2005
Posts: 1

PostPosted: Wed Jul 12, 2006 12:44 pm
Reply with quote

Hi ,

See below statement ..
input-file
BLOCK 0
RECORDING MODE V
RECORD VARYING FROM 1 TO 4092 DEPENDING ON W00-IN-REC-LEN.

When ever u excute read para, the lenth of the record will be stored in W00-IN-REC-LEN variable.

u have to decalre that varibale in working stoarge section as mentioned below.

W00-IN-REC-LEN PIC 9(9) BINARY.

Regards
nagae
Back to top
View user's profile Send private message
bhavishya_bhandari

New User


Joined: 30 May 2006
Posts: 7

PostPosted: Wed Jul 12, 2006 2:52 pm
Reply with quote

Ok ...
fine just lemme knw that is there any way either thru COBOL or thru JCL by which I can knw the input file(Flat-File) Attributes (viz Record Length etc ..) during run time in the Program ...
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
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 To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top