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

How to Copy records in annother format


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Fri Feb 08, 2008 6:41 pm
Reply with quote

I am trying to sort 1 field which is in S9(9)comp format showing 4 bytes in my PS file. i need to convert it to alphanumeric n copy those records in the end of the file.
Can i do this using syncsort.
Kindly suggest other methods as well.
Field length position is 75 and length 4.
And total file lengt is 156.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 6:55 pm
Reply with quote

Do you mean that you want to take the 4 byte field at position 75 of the record, convert this field into alphanumeric, and then append this to the end of the record rather than the end of the file ?
Back to top
View user's profile Send private message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Fri Feb 08, 2008 6:58 pm
Reply with quote

yes we can say i need to put the converted record in a new field. its not necessary i put it end of record only. But i dont have to replace it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 7:27 pm
Reply with quote

Similar topics have been discussed on the forum, so why not search through here and DFSort and get some hints and tips and give it a go.
Back to top
View user's profile Send private message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Fri Feb 08, 2008 7:29 pm
Reply with quote

i have been trying....its urgent i thought i shal also put up a new post......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 7:53 pm
Reply with quote

I am a DFSORT user .............
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Mon Feb 11, 2008 11:41 am
Reply with quote

Hi vishal.iitr2003,

Please check with the following code for your requirement.
Code:
// EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=(,CATLG),
// LRECL=166,RECFM=F,SPACE=(CYL,1)
//SYSIN DD *
 OPTION COPY
 INREC BUILD=(1,156,75,4,BI,EDIT=(SIIIIIIIII),SIGNS=(+,-))
/*
//

Thanks,
Shankar
Back to top
View user's profile Send private message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Mon Feb 11, 2008 3:59 pm
Reply with quote

Now i m able to convert the comp filed to numeric field. But the problem i am still facing is that i dont know how to place the records at some new postion.
ie. the column that i am changing is havin 75 position and after converting the data type i want to place it to 25th position so that it gets into a fields having appropriate data definition from the copybook, in the output file.
I tried to find it in previouslydiscussed forums but was unable to find any example of this type......
Kindly suggest some solution or some helpful link will also be handy.
Back to top
View user's profile Send private message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Mon Feb 11, 2008 4:00 pm
Reply with quote

the basic reason i want to do this is because i want to carryon further operations after data type conversion is done. If I let it be at that position only it will hinder the subsequent operations.
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Mon Feb 11, 2008 4:16 pm
Reply with quote

Hi vishal.iitr2003,

Please show some example records of how your input and output fields looks, so as to suggest you solutions.

The following code may be help you.
Code:
// EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=(,CATLG),
// LRECL=166,RECFM=F,SPACE=(CYL,1)
//SYSIN DD *
 OPTION COPY
 INREC BUILD=(1,24,75,4,BI,EDIT=(SIIIIIIIII),SIGNS=(+,-),25,132)
/*
//

Thanks,
Shankar
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top