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

Initializing the 01 LEVEL field, filler also initialized


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

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Tue Mar 31, 2009 12:16 pm
Reply with quote

Currently our program writes the output file. The layout for the file was

Code:
01  WS-INTL-REPORT.                           
    05 IP-SEQUENCE-NUM               PIC 9(03).
    05 IP-TRANS-DT                   PIC X(09).
    05 IP-ACTION                     PIC X(04).

As we want to insert comma after every field. We cahanged the layout to

Code:
01  WS-INTL-REPORT.                           
    05 IP-SEQUENCE-NUM               PIC 9(03).
    05 FILLER                             PIC X(1) VALUE ','
    05 IP-TRANS-DT                   PIC X(09).
    05 FILLER                             PIC X(1) VALUE ','
    05 IP-ACTION                     PIC X(04). 

while initializing the 01 LEVEL field the filler also initialized with space. We cannot each field sperately sicnce we have 50 fields. Can any one help me out

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Tue Mar 31, 2009 1:44 pm
Reply with quote

Satheesh,
I am not sure ,why it is happening in this case. The fillers do retain their initial values even after being initialized.

Probably you can create a equivalent structure as that of WS-INTL-REPORT with spaces (for char) , "," for fillers and zeroes for numeric. Do not initialize it .
And move this to your initial storage( WS-INTL-REPORT)whenever required to initialize. Its just a workaround and also not an efficient way to achieve what you want.

WTF
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Mar 31, 2009 2:36 pm
Reply with quote

Satheeshkumar wrote:
while initializing the 01 LEVEL field the filler also initialized with space.
I do not agree, please show us the code...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 31, 2009 3:54 pm
Reply with quote

in what SECTION of your program is <01 WS-INTL-REPORT> defined?

are your 'VALUE' clauses receiving any kind of error/info msg in the compile listing?
Back to top
View user's profile Send private message
Jose Villafranca

New User


Joined: 12 Nov 2008
Posts: 4
Location: Monterrey

PostPosted: Thu Apr 02, 2009 2:23 am
Reply with quote

Try ending it with POINTS
05 FILLER PIC X(1) VALUE ',' . <---
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts How to load to DB2 with column level ... DB2 6
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top