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

Help with "Copy file in batch" option


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Wed Jul 29, 2015 3:23 am
Reply with quote

Hi All,

I am trying to copy a file, convertion all the packed decimal data to displayable data (alpha numeric).

I provided the source file, source copybook and destination file and a destination copybook. The source copybook lets say has an amount fileld with S9(4)V99 COMP-3, on the destination copybook I specified X(8), the file manager converted the data and i am able to see the actual amount in the output file.

This process of creating the output copybook is manual and i am looking forward to see if there is an option in File Manager that i could use to auto generate the output format?

Or is there anyother easy way with file manager to copy a file with the packed decimal data to another file with actual data in alphanumeric?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jul 29, 2015 11:05 pm
Reply with quote

I don't know much about FM but I would say "No" to the first question and "I don't think so" to the second.

But here is an idea:

Why don't you add a small SORT step that takes the IN copybook, removes all 'COMP-3' and 'COMP' and so on, and outputs a new (temporary) OUT copybook to be used by FM.

The amount field would show as "S9(4)V99." but you could also improve this...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 29, 2015 11:11 pm
Reply with quote

And with 66 posts here already, why did you try somewhere else first?

Same questions as there.
Back to top
View user's profile Send private message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Wed Jul 29, 2015 11:47 pm
Reply with quote

Marso, Thanks for the idea. I tried it, it works but the problem is, the people i am dealing with has limited or no knowledge on mainframe.

I wrote a REXX to do the conversion and I thought i nailed it. The REXX works like a charm. But since i am manipulationg the copybook, they are not happy with it. They are not understanding its just a type conversion to X. As long as the length matches they won't have issue with the data. I am trying to explain my best but wanted to see if the tool has an option to do it and they will be happy about it.

Ok coming to your point, if we use S9(4)V99, the display value is not straight forward. The last byte will have the sign and value which they will not be able to decode. I can write a formula in excel or something to do it but still they won't be happy about it.

I understand its a dumb question but sometimes dumb things make a huge difference.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Thu Jul 30, 2015 12:13 am
Reply with quote

If I understand it correctly,
Quote:
I am trying to copy a file, convertion all the packed decimal data to displayable data (alpha numeric)

Quote:
As long as the length matches they won't have issue with the data.

It seems like you want to change the packed data to displayable data but don't want to change the copybook length ??

Do you really think that is possible?

is this what you want ?
Back to top
View user's profile Send private message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Fri Jul 31, 2015 12:25 am
Reply with quote

Quote:
It seems like you want to change the packed data to displayable data but don't want to change the copybook length ??

Do you really think that is possible?

is this what you want ?


Well let me put it clear. File manager internally understands and displays the packed deimal data and displays it as a readable text in foreground.

All i am looking for is, Is it possible to save that displayed value into a file? I don't want to view in forground. But i need that information in a file.

To acheive that here is what i tried -
1. Copy file option under uitilities
2. Provide the input data set, copybook.
3. Choose batch
4. Provide, output dataset name, left the copybook blank
5. Submit the job

It just copied the file to a new file which perfectly makes sense.

Then I created a new copybook out of the actual copybook to be used as output copybook with all the numeric fields converted to alphanumeric keeping the field names same.

Then tried to copy again but this time i provided my new copy book as output copybook. The file copied but this time all the packed decimal data is converted to the actual value that will be displayed in the forground which is cool.

All i wanted to understand is that if the file manager has the sophistication to generate a similar copybook ( as i described above) that i could use as output copybook. Each time i manipulate the copybook, I could go wrong somewhere and it could cause truncation in the data.

If there is no such option, its fine but I don't want to spend hours on building a REXX or SORT to do the conversion without knowing that an option already exists.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Jul 31, 2015 3:16 am
Reply with quote

sijayapal wrote:
If there is no such option, its fine but I don't want to spend hours on building a REXX or SORT to do the conversion without knowing that an option already exists.

But you don't mind spending two days hoping to get an answer here?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Aug 02, 2015 6:30 pm
Reply with quote

sijayapal wrote:
I tried it, it works but the problem is, the people i am dealing with has limited or no knowledge on mainframe.


In that case, do they really care if the job has one or two steps ???

Here is another idea:
- Option 3.2 takes you to the Print Utility.
- Give the VSAM file name and the copybook,
- use Print Option 4 (Tabl),
- Copybook option 1 (Above)
- Select Batch Execution.
- Submit the job
- Check the beautiful report you've just created!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Aug 11, 2015 12:29 am
Reply with quote

sija,
any follow up on this subject ?
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top