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
 

 

Convert PD to editted format.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Convert PD to editted format.
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

Site Director


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

PostPosted: Thu Oct 22, 2009 1:26 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Oct 22, 2009 9:02 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Oct 23, 2009 7:37 pm    Post subject: Reply to: Convert PD to editted format.
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm


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