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

Convert PD to editted format.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Wed Oct 21, 2009 6:12 pm
Reply with quote

Hi

I need to convert to PD to edited format. I have done below layout:


Code:

01  GSKN-IN.                     
        05  GSKN-KEY.                                             
               10  STATE     PIC S9(5)     COMP-3.           
               10  CATG-DESC   PIC S9(5)V99  COMP-3.
        05  GSKN-NO-OF-TIMES       OCCURS 0 TO 40 TIMES       DEPENDING ON WS-ENTRIES   
                                       INDEXED BY WS-INDX.           
             10  RTL-CODE      PIC S9(7)     COMP-3.           
             10  PERC             PIC S9(3)V99  COMP-3.           
             10  RTL-DESC      PIC X(30).                       
                 


I have already done PD to EDIT conversion using SYNCSORT but that file layout was straight forward without OCCURS clause as shown below


Code:

SORT   FIELDS=COPY                                     
OUTREC FIELDS=(01:01,48,                               
               49:49,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
               53:53,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
               57:57,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
               61:61,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
               65:65,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
               70:70,03,PD,EDIT=(SIIIIT),SIGNS=(,-),   


can anyone help me how to implement the conversion.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 22, 2009 1:26 am
Reply with quote

Hello,

There may be a way to do this with sort, but if you need this soon, i suggest writing the COBOL code as something like it probably already exists. . .

The code (given that the record layout already exists) should take only minutes. . .
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Thu Oct 22, 2009 4:09 pm
Reply with quote

so i can move like below

Code:

01  CATG-DESC   PIC S9(5)V99  COMP-3.
01  CATG-DESC-O   PIC 9(6).99.
.
.
.
.
MOVE CATG-DESC TO CATG-DESC-O


will this work or do i need to change CATG-DESC-O.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 22, 2009 9:02 pm
Reply with quote

Hello,

You can, but that won't give the result you want (if i understand). . .

I suspect you'd want pic zzzzz9.99- for the output picture.

Also, testing this would be very simple and you'd have had an answer faster than the post could have been made. . .
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Oct 23, 2009 11:26 am
Reply with quote

Yes Dick you are right. i have done thru cobol code. Thank you for your time and help.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 23, 2009 7:37 pm
Reply with quote

You're welcome.

Good to hear it is working - thanks for letting us know icon_smile.gif

d
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top