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

Replacing FILLER with FILLER<SeqNum> in COBOL Copybook


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Sun Sep 29, 2024 8:59 am
Reply with quote

i/p :
Code:

123456  01  W-RECORD.                                     
123456     05  W-SEG-PREFIX        PIC X(10).             
189600     05  W-SEG-COUNT         PIC X(04).             
189700     05  FILLER          REDEFINES W-SEG-COUNT.     
190000         10  W-K1-COUNT      PIC 99.                 
190100         10  W-K2-COUNT      PIC 99.                 
196200                                                     
196300       05  W-K1-SEGMENT   OCCURS 0 TO 5 TIMES       
196400                             DEPENDING ON W-K1-COUNT.
196500           10  W-SEG-ID     PIC X(2).               
196600           10  W-P-IND      PIC 9(1).               
196700           10  W-NAME       PIC X(30).               
196800           10  FILLER          PIC X(1).             
196900                                                     
196300       05  W-K2-SEGMENT   OCCURS 0 TO 5 TIMES         
196400                             DEPENDING ON W-K2-COUNT.
196500           10  W-SEG-ID     PIC X(2).                 
196600           10  W-P-IND      PIC 9(1).                 
196700           10  W-NAME       PIC X(30).               
196800           10  FILLER          PIC X(1).             
196900                                                     


o/p :
Code:

123456  01  W-RECORD.                                     
123456     05  W-SEG-PREFIX        PIC X(10).             
189600     05  W-SEG-COUNT         PIC X(04).             
189700     05  FILLER-01       REDEFINES W-SEG-COUNT.     
190000         10  W-K1-COUNT      PIC 99.                 
190100         10  W-K2-COUNT      PIC 99.                 
196200                                                     
196300       05  W-K1-SEGMENT   OCCURS 0 TO 5 TIMES       
196400                             DEPENDING ON W-K1-COUNT.
196500           10  W-SEG-ID-01  PIC X(2).               
196600           10  W-P-IND-02   PIC 9(1).               
196700           10  W-NAME-01    PIC X(30).               
196800           10  FILLER-02       PIC X(1).             
196900                                                     
196300       05  W-K2-SEGMENT   OCCURS 0 TO 5 TIMES       
196400                             DEPENDING ON W-K2-COUNT.
196500           10  W-SEG-ID-02  PIC X(2).   
196600           10  W-P-IND-02   PIC 9(1).   
196700           10  W-NAME-02    PIC X(30). 
196800           10  FILLER-03       PIC X(1).
196900                                       



We use the Delphix tool for data masking. Delphix does not support duplicate variable names (including FILLERs).

In this example,

    FILLER
    W-SEG-ID
    W-P-IND
    W-NAME


are the duplicate variables. They need to be suffixed with two-digit numerals, as shown in the output code, to resolve the issue of duplicate variable names. I am currently handling this manually, as this task has just begun. I plan to write a REXX script to automate the process. However, I believe that correcting the FILLER names can be accomplished using SORT/ICETOOL.

As we know, FILLER is a frequently occurring case, while the duplication of other variable names is less probable which can be done manually. I believe FILLER name correction can effectively be done with SORT/ICETOOL by replacing ' FILLER ' with ' FILLER-<SeqNum> '

For the manual process I execute x all; f all ' FILLER ' command in ISPF EDITOR:

Code:

***************************** Top of Data ******************************
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
189700     05  FILLER          REDEFINES W-SEG-COUNT.                   
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  8 Line(s) not Displayed
196800           10  FILLER          PIC X(1).                         
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  6 Line(s) not Displayed
196800           10  FILLER          PIC X(1).                         
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  1 Line(s) not Displayed
**************************** Bottom of Data ****************************


This makes it easy to edit small copybooks manually.

Any assistance with this would be greatly appreciated.

Thank you.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1313
Location: Vilnius, Lithuania

PostPosted: Sun Sep 29, 2024 10:45 am
Reply with quote

Get a better tool, FILLER variables have been part of COBOL since about forever, so a tool that cannot handle them AD 2024 isn't worth the money spend on it!!!
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Sun Sep 29, 2024 11:15 am
Reply with quote

prino wrote:
Get a better tool, FILLER variables have been part of COBOL since about forever, so a tool that cannot handle them AD 2024 isn't worth the money spend on it!!!


I agree with you @Prino. There are many limitations with Delphix tool especially for copybooks though they are valid in COBOL. We have send requests to the vendor for fixes/enhancements. We need to survive with this tool till then. BTW, I am composing my next question reg OCCUR clause restriction in Delphix tool, that will be posted shortly.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
Search our Forums:

Back to Top