Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to change packed data in input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 169
Location: Chennai

PostPosted: Fri Sep 26, 2008 12:47 pm    Post subject: How to change packed data in input file
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
References
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 710
Location: Chennai, India

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

Karthik,

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

Senior Member


Joined: 17 Oct 2006
Posts: 710
Location: Chennai, India

PostPosted: Fri Sep 26, 2008 1:21 pm    Post subject:
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: 1
Location: pune

PostPosted: Fri Sep 26, 2008 4:51 pm    Post subject: change packed data in input file
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: 169
Location: Chennai

PostPosted: Fri Sep 26, 2008 7:05 pm    Post subject: Reply to: How to change packed data in input file
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

Active User


Joined: 18 Oct 2006
Posts: 68

PostPosted: Fri Sep 26, 2008 7:36 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1