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

How to change packed data in input file


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

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Sep 26, 2008 12:47 pm
Reply with quote

Hi,

Kindly suggest me how to change packed data in input file.

02 DB-DT-MTH-END PIC 9(5) COMP-3.


DB DT
MTH END
P 3
24-----
*******
-------
X'210F+
200
1F8


When i try to display that variable thru COBOL program it shows as DB-DT-MTH-END: 08213.
Now i want to test the same program for the value 08295. How to change the input file for
obtaining that new value.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Sep 26, 2008 1:17 pm
Reply with quote

Karthik,

How many records you want to update?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Sep 26, 2008 1:21 pm
Reply with quote

Karthik,

If its is only for one or two, you can put a HEX ON and directly edit the file.
For e.g,
Code:
08213
will get displayed as
Code:
023
81F

'F' in the last byte represents a positive sign and you can update the rest.
Back to top
View user's profile Send private message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Fri Sep 26, 2008 4:51 pm
Reply with quote

Hi,

By doing Hex on is a good idea. Also you can create a copybook for that field.

01 group variable.
02 filler pic x(the length before that field).
02 DB-DT-MTH-END PIC 9(5) COMP-3.
02 filler pic x(the length after the field).

Then Using FILE-AID utility in mainframe the records can be edited.

Thanks,
Lokesh
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Sep 26, 2008 7:05 pm
Reply with quote

Hi,

Sorry for late reply, stuck up with other work.

Quote:

For e.g,
Code:
 
08213

will get displayed as
Code:
 
023
81F



But when i opened in File Master it displayed as 210F08 and not 08213F for the value 08213.

Code:
 
P 3
24-----
X'210F+
200
1F8


Quote:

Also you can create a copybook for that field


I am using layout for viewing files.

Please clarify,
R KARTHIK
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 26, 2008 7:36 pm
Reply with quote

Can you post your data in ISPF browse mode or view mode with HEX on.

If it is a VSAM, File-aid Browse mode(in CHAR) would do.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top