Page 1 of 1
Inserting the string in an empty PS file by usiing Sortcard
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Feb 16, 2011 10:26 am
by kabirex
Hi,
Could pls anyone let me know how to insert a string in empty PS file by using Sortcard? In JCL, the SORTIN should be dummy and SORTOUT should be that empty Ps file in which the string to be inserted.
It would be great if the sample sortcard and jcl is given. Thanks!
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Feb 16, 2011 10:35 am
by steve-myers
What you are saying is you want to write a fixed record to a new dataset. I have to think there are simpler solutions than using a sort product! IEBDG anyone?
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Feb 16, 2011 1:02 pm
by kabirex
Yes, I wanna write fixed record in a new dataset. Please let me know if there are any solution otherthan sort process. Thanks!
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Feb 16, 2011 7:49 pm
by steve-myers
Look at the manual this link points to. You will find at least two programs that will do the task you want. We
will not, indeed, we cannot, do your work for you.
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Feb 17, 2011 12:25 am
by Frank Yaeger
kabirex,
You can do this with DFSORT. But you need to give more information. What is the RECFM and LRECL of the output file? What do you want the output record to look like exactly?
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Feb 17, 2011 2:25 pm
by kabirex
Empty PS file's RECFM is FB and lrecl is 80. I wanna insert the string 'SUCCESS' into empty PS file.
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Feb 17, 2011 7:12 pm
by steve-myers
kabirex wrote:Empty PS file's RECFM is FB and lrecl is 80. I wanna insert the string 'SUCCESS' into empty PS file.
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Feb 17, 2011 10:33 pm
by skolusu
kabirex wrote:Empty PS file's RECFM is FB and lrecl is 80. I wanna insert the string 'SUCCESS' into empty PS file.
Use the following DFSORT JCL
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=Your output file,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,HEADER1=('SUCCESS')
/*
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Feb 17, 2011 11:51 pm
by Frank Yaeger
the SORTIN should be dummy
If you want the SORTIN to be DUMMY instead of DD *, you can use:
//SORTIN DD DUMMY,RECFM=FB,LRECL=80
Re: Inserting the string in an empty PS file by usiing Sortc
![Post Post](https://www.ibmmainframeforum.com/styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Feb 22, 2011 5:01 pm
by kabirex
Thank you, Kolusu and Frank.