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
 

 

Help with "Copy file in batch" option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Help with "Copy file in batch" option
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: 1219
Location: Israel

PostPosted: Wed Jul 29, 2015 11:05 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jul 29, 2015 11:11 pm    Post subject: Reply to: Help with "Copy file in batch" option
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    Post subject:
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: 331
Location: USA

PostPosted: Thu Jul 30, 2015 12:13 am    Post subject: Reply to: Help with "Copy file in batch" option
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    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Jul 31, 2015 3:16 am    Post subject:
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: 1219
Location: Israel

PostPosted: Sun Aug 02, 2015 6:30 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Tue Aug 11, 2015 12:29 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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