Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
manoz_k

New User

Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

Posted: Fri Mar 20, 2009 12:45 am    Post subject: Conidtion based Conversion of fields to PD format

Here is what i am doing

 Code: SORT FIELDS=COPY                                                    OUTREC IFTHEN=(WHEN=(1,5,CH,EQ,C'ABCDE',OR,1,5,CH,EQ,C'XYZKW'),             BUILD=(1,105,                                                              106,12,SFF,PD,EDIT=(STTTTTTTTT.T),LENGTH=6,                          118,12,SFF,PD,EDIT=(STTTTTTTTT.T),LENGTH=6,                          130,12,SFF,PD,EDIT=(STTTTTTTTT.T),LENGTH=6,                          142,30,                   172,5,SFF,PD,EDIT=(STTTTTTTTT.T),LENGTH=2))

What i am trying to do is Converting 12 byte values ( it is general Decimal number like +123456789.5) to 6 Byte packed Decimal if condition 1,5 character matches to certain value.

It is giving a syntax error now..saying EDIT can appear only once.

Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

Posted: Fri Mar 20, 2009 1:57 am    Post subject:

 Quote: What i am trying to do is Converting 12 byte values ( it is general Decimal number like +123456789.5) to 6 Byte packed Decimal

Since you want to convert to PD, why are you using EDIT?

 Code: ...    106,12,SFF,PD,EDIT=(STTTTTTTTT.T),LENGTH=6,     ...

You can't convert to PD and use EDIT - you get to choose one or the other.

 Code: 106,12,SFF,PD,LENGTH=6,

would convert to 6-byte PD. Remove the EDITs.
manoz_k

New User

Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

 Posted: Fri Mar 20, 2009 5:37 am    Post subject: It did worked out thanks much !!! I have another issue now, generally we have ZDF or ZDC depending on the requirement.Is there way we can mimic the same in PD format.I see ZEROS are represented as X'0C' but i want it to be X'0F'. what i need to do for this
CICS Guy

Senior Member

Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

 Posted: Fri Mar 20, 2009 5:56 am    Post subject: Have you looked at PDF and PDC?
manoz_k

New User

Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

Posted: Fri Mar 20, 2009 6:09 am    Post subject:

 CICS Guy wrote: Have you looked at PDF and PDC?

That's so simple...i didn't expect that.Thanks much !!!
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am Unloading DB2 table in CSV format alo... grvtomar COBOL Programming 7 Sun Jan 28, 2018 2:05 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us