Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to Copy records in annother format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to Copy records in annother format
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 08, 2008 6:55 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 08, 2008 7:27 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 08, 2008 7:53 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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 Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 0 Tue Oct 24, 2017 12:01 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 4 Mon Oct 23, 2017 8:47 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us