Page 1 of 1

SORT card to reformat header date

PostPosted: Thu Nov 20, 2008 10:02 am
by ninudvictor
Hi All,
I have a PS file of length 1066bytes.
It is having Header Record then Detail Records and then Footer.
The Header Layout is- AHDRDMD8400 YYYYMMDD
i.e. In Heade Record- Pos 1- Header REC-ID = 'A'
Pos-2 to 4 - Header ID = 'HDR'
Pos-5 to 12-Dataset ID= 'DMD8400 '
Pos-13 to 20-Date= `YYYYMMDD'
I want to reformat only the date from YYYYMMDD to DDMMYYYY in a single sort card.
All other Detail records and Footer should be unchanged.

I tried experimenting with various combinations of OVERLAY,OUTREC.
But it did not work.

Plz help me out soon as it is an urgent requirement.
Thanks in advance.

Regards
Ninu

Re: SORT CARD TO REFORMAT HEADER DATE

PostPosted: Thu Nov 20, 2008 10:13 am
by dick scherrer
Hello,

But it did not work.
No one can help with that lack of informaton. . . If something does not work, you need to post what you tried and what error or undesired output was presented. Using the "Code" tag, post your jcl, sort control info, and the printed output from the sort includeing the message id's.

Plz help me out soon as it is an urgent requirement.
If something is urgent, the best source of info is others who also work on your system and the technical support people for your system. Sometimes topic on the forums go unread for many hours. . .

Also, when posting it is always better to work in the forum rather than PM. A PM is not a good way to expedite a forum post.

Re: SORT CARD TO REFORMAT HEADER DATE

PostPosted: Thu Nov 20, 2008 10:20 am
by ninudvictor
Thanks for the reply.
But what i have tried that is something irrelevant to this problem
and it will not help.
Thats why i put the requirement elaborately.
If you think it is clear enough please provide me the solution coz some peoples are unable to answer here
i.e how to do it in one sort step.

Thanks again.
Ninu

Re: SORT card to reformat header date

PostPosted: Thu Nov 20, 2008 10:26 pm
by Frank Yaeger
Ninu,

You asked the same question on another Help Board and I answered it there as follows:

Using OVERLAY is tricky here because the 'YYYYMMDD' characters overlap the 'DDMMYYYY' characters. I'd suggest you use BUILD instead. Here are the DFSORT control statements:

  OPTION COPY                             
  INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'AHDR'),
    BUILD=(1,12,19,2,17,2,13,4,21,1046)) 


Please don't post the same question on more than one board.

Re: SORT card to reformat header date

PostPosted: Sat Nov 22, 2008 6:29 pm
by ninudvictor
Thanks a lot Frank.
Now onwards i wont post the same question on different help board.

Thanks again.
Ninu