Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
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    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

Arun Raj

Moderator


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

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
Arun Raj

Moderator


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

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: 9
Location: Gurgaon

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: 235
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

New User


Joined: 18 Oct 2006
Posts: 73

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us