View previous topic :: View next topic
|
Author |
Message |
hsk
New User
Joined: 28 Nov 2006 Posts: 69 Location: India
|
|
|
|
I have a number of files in different layouts. Some of the fields in this file are COMP-3 fields.
I want to send the data to Non-mainframe environment.
(I just copy records to excel, each column having data for a particular field).
But for the comp-3 fields, i can not just copy data. I view the file with copybook using fileaid and manually copy data for comp-3 fields.
My question is,
With file-aid i can see correct data on screen, even for COMP-3 fields,
That means that at some point File-aid must have converted "packed" data to display format according to the copybook i am using.
Can File-aid write this converted data to any file instade of displaying on screen. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Morning Sir !
You can use SORT to read the input file, convert packed data to decimals and create a output file as you desire. Then transfer this file to your other system. For converting use EditMask-Funktions in the Sort. You also can incluse ore exclude sentences for processing. You can change positions of fields to arrange them in another order in the output file. And a whole lot of things more.
Have a look in the Sort-Section of this Forum.
Or select posts with "Syncsort" here in JCL-Section. |
|
Back to top |
|
|
hsk
New User
Joined: 28 Nov 2006 Posts: 69 Location: India
|
|
|
|
@ SORT ......... i guess i would nee to specify the exact location, disposition-length etc .......
I my case it would be different for different layouts .........
My simple idea is -
Before displaying data on screen File-aid must have done all the complecated work ... i.e. Read copybook, convert some bytes to display format ... etc
My idea is, need not be correct, file-aid must be storing all this information to some place and must be accessing it before displaying record on screen.
I was just checking if i can access this converted data by any means !!!!
So if i can .... then it would work for any file ... i just have to provide the file and copybook and file-aid will convert all the fields to display !!! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what about looking at the fileaid docs ?? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Code: |
0 PARAMETERS - Specify ISPF and File-AID parameters
1 BROWSE - Display file contents
2 EDIT - Create or change file contents
3 UTILITIES - File-AID/SPF extended utilities
5 PRINT - Print file contents |
The PRINT option does what you're looking for. |
|
Back to top |
|
|
hsk
New User
Joined: 28 Nov 2006 Posts: 69 Location: India
|
|
|
|
Thanks Arun .......
I tried few things ... i think the "Reformat" option does exactly what i want !!!
I have to provide 2 layouts, one with COMP-3 definitions and other with same fields just converting COMP-3 defintions to simple numeric
e.g.
Layout-1
01 ONE.
05 FIELD-1 PIC X.
05 FIELD-2 PIC 9(05) COMP-3.
Layout-2
01 ONE.
05 FIELD-1 PIC X.
05 FIELD-2 PIC 9(05).
File-aid prepares "Reformat Definition" and does a MOVE CORR to copy records in Layout-1 to Layout-2.
"Reformat Definition" is written to member of PDS.
So as far as the layout is same, i can use the same definition again and again.
But the question is how to write this "Reformat definition" in batch ???
While reformating file-aid generates that automatically but Is there any option to generate thru batch ... ??? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
hsk,
The PRINT option automatically generates a report of your input file in displayable format just like you see it in FA browse mode. You dont need to create another layout for this. And you can execute this in batch as well. |
|
Back to top |
|
|
hsk
New User
Joined: 28 Nov 2006 Posts: 69 Location: India
|
|
|
|
Bingo ...............
I got what i was looking for !!!
Thanks arcvns |
|
Back to top |
|
|
|