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
 

 

Record length based on a Copy book

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

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jun 18, 2008 7:18 pm    Post subject: Record length based on a Copy book
Reply with quote

Hi,

I have to calculate record length of a file based on a copy book.

I have the following cases in it--

15 Acc-Rec Pic X(02).

15 New-Acc-Rec Redefines Acc-Rec Pic X(02).
***********************************************************

15 Product-Code Pic X(04).

15 New-Product-Code Redefines Product-Code Pic X(05).


To determine the record length----

In the first case of Acc-Rec , do i need to claculate 2 bytes again?

In the second case i.e., Product code, the redefined varaible has one more extra byte so how should i deal there.

If, in case there is a scenario where redefined variable size is lesser than what it redefines then what to do ?

If, a variable is alphanumeric and redefines a numeric variable with different permutations and combinations of sizes then how to deal in such cases?

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

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jun 18, 2008 7:34 pm    Post subject:
Reply with quote

Do a compile with the MAP option and it will show you the length in the listing.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Jun 18, 2008 7:41 pm    Post subject:
Reply with quote

Hi Meenakshi !

A easy-peasy way is to include that copybook in a programm. Complile the programm and look at the generated listing. There it is, the length.

And looking there, you can all answer your questions by yourself.
Good luck !
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Jun 19, 2008 12:35 pm    Post subject: Reply to: Record length based on a Copy book
Reply with quote

I compile the code with compiler option MAP.

In the compiler listing "SYSUT2 COMPILE" , the
below copybook COPY IDMS APPLCNT is expanded.

But where to find the record length in compiler listing?

Regards
R KARTHIK
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 19, 2008 12:40 pm    Post subject:
Reply with quote

Hello,

Quote:
below copybook COPY IDMS APPLCNT is expanded.
Scroll down to where the copy expansion begins and scroll to the right.
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Jun 19, 2008 12:52 pm    Post subject: Reply to: Record length based on a Copy book
Reply with quote

Hi .

Ya .. I found that .

033400* COPY IDMS WK-DOHBPA13-APPLCNT-LN-EXTC.
01 WK-APPLCNT-CLM-LN-EXTC-RECORD. BLW=00004+020 0CL1371
Back to top
View user's profile Send private message
prem_ibm

New User


Joined: 15 Sep 2007
Posts: 31
Location: Chennai

PostPosted: Thu Jun 19, 2008 2:07 pm    Post subject: Reply to: Record length based on a Copy book
Reply with quote

Hi karthikr44

Can you please let us know what length have got in Compile listing for the variable which u have mentioned in u r query.

Thanks

Prem
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Jun 19, 2008 6:05 pm    Post subject: Reply to: Record length based on a Copy book
Reply with quote

In query i give APPLCNT instead of WK-DOHBPA13-APPLCNT-LN-EXTC wrongly.
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 HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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