View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Do a compile with the MAP option and it will show you the length in the listing. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
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 |
|
|
prem_ibm
New User
Joined: 15 Sep 2007 Posts: 31 Location: Chennai
|
|
|
|
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 |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
In query i give APPLCNT instead of WK-DOHBPA13-APPLCNT-LN-EXTC wrongly. |
|
Back to top |
|
|
|