View previous topic :: View next topic
|
Author |
Message |
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Jose Villafranca
New User
Joined: 12 Nov 2008 Posts: 4 Location: Monterrey
|
|
|
|
Try ending it with POINTS
05 FILLER PIC X(1) VALUE ',' . <--- |
|
Back to top |
|
|
|