View previous topic :: View next topic |
Author |
Message |
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Thu Aug 17, 2006 11:40 pm Post subject: Need a generic program that convert all COMP, COMP-3 fields |
|
|
Need a generic program that can read any file and given the copy book layout of the file , can convert all COMP, COMP-3 etc into a simple flat file with each field in normal display mode and pipe delimited.
The Program can be Cobol, SAS, REXX, File Aid or any thing else.
This is really helpful for me if this is done... thanks in advance
Note: I have also posted the same query under "Mainframe Challenges" _________________ RAJA MOHAMED |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Fri Aug 18, 2006 5:53 am Post subject: |
|
|
Quote: |
Note: I have also posted the same query under "Mainframe Challenges"
|
ha.rajamohamed,
Please follow the rules of posting in the forum. Do not post the same topic in more than 1 forum. Read the guidelines for posting in the mainframe challenges forum.
KOlusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
dz Beginner
Joined: 02 Apr 2006 Posts: 26 Topics: 0
|
Posted: Fri Aug 18, 2006 8:41 am Post subject: |
|
|
You can do that in both SYSCSORT and DFSORT. For example, I have used the following SYNCSORT statement recently to format PIC S9(09)V9(09) COMP-3 price field into ZD format, and then to get rid of the sign:
Code: | INREC FIELDS=(01:017,09, ** CUSIP - 09
10:1X,
11:053,10,PD,ZD,LENGTH=18) ** PRICE TO ZD
SORT FIELDS=(1,9,CH,A) ** BY CUSIP
SUM FIELDS=NONE ** ONLY ONE REC PER CUSIP
* FORMAT ( INTEGER . DECIMAL , NO SIGN)
OUTREC FIELDS=(01:1,09, *CUSIP - 09
10:1X,
11:11,09, *INTEGER PART OF THE PRICE
20:C'.',
21:20,09,ZD,EDIT=(TTTTTTTTT),SIGNS=(,,,), *DECIMAL PART
30:51X)
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Fri Aug 18, 2006 8:44 am Post subject: |
|
|
dz,
OP does not know the positions of the COMP/COMP-3 variables. He wants a generic program that can write out expanding the non displayable data when supplied with a file layout.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Aug 18, 2006 12:52 pm Post subject: |
|
|
Raja,
Can you post as to what have you accomplished so far on this? And we'll give you suggestions to make this better.
________
vaporizer
Last edited by coolman on Sat Feb 05, 2011 1:48 am; edited 1 time in total |
|
Back to top |
|
|
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Mon Aug 21, 2006 6:02 am Post subject: |
|
|
Coolman,
I have not much proceeded on this. Till now I have coded in COBOL using move CORR. But this is specific to a single file and layout.
I am having 50+ different files with different layouts, so i am in help of a generic program. _________________ RAJA MOHAMED |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Mon Aug 21, 2006 10:25 am Post subject: |
|
|
ha.rajamohamed,
What is the max lrecl of the files involved? If the file lrecl is less than 100 then you can use VPRINT option from File-aid which will print all the records in a displayable format. Unfortunately the output file lrecl is only limited to 132 bytes.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Thu Aug 24, 2006 4:24 am Post subject: |
|
|
Kolusu,
I am off for couple of days so unable to reply you..
The LRECL are more than 132 bytes, varies between 1000 to 5000 bytes. _________________ RAJA MOHAMED |
|
Back to top |
|
|
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Wed Aug 30, 2006 4:36 am Post subject: |
|
|
I heard there is a posibility through EasyDrive, but I have not worked on EasyDrive.
I browsed around FILEAID, I havn't got any results so far.
Is anyone come up this situations... and sloved it..
Thanks in advance. _________________ RAJA MOHAMED |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Wed Aug 30, 2006 7:17 am Post subject: |
|
|
Quote: |
I heard there is a posibility through EasyDrive, but I have not worked on EasyDrive.
|
ha.rajamohamed,
EasyDrive ? Did you mean Easytrieve? Easytrieve is capable of converting but you need to supply the output layout.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|