Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

My requirement is convert PD to ZD then put in EDIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Fri Mar 19, 2010 7:00 pm    Post subject: query regarding conversion ZD to PD then put in edit picture
Reply with quote

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,12,13:13,4,ZD,BI,LENGTH=2,15:17,10,25:27,12,PD,ZD,
EDIT=(STTTTTTTTT.TTT),SIGNS=(,-),31:39,12,PD,ZD,EDIT=TTTTTT.TT,
EDIT=(STTTTTTTTT.TTT),SIGNS=(,-))
my requirement is convert PD to ZD then put in EDIT
please help regarding syntax
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 19, 2010 8:03 pm    Post subject:
Reply with quote

Hello,

Is there some reason you posted your question to a topic that has been inactive for almost 4 years. . .?

When you have a question, you should start a new topic for your question.

Also, i suspect you only want the edited output - not a ZD value and an edited value?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 19, 2010 8:06 pm    Post subject:
Reply with quote

Add on. . .

Please show some sample input data and the output you want from that sample input data. Mention the recfm and lrecl of the files.
Back to top
View user's profile Send private message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Fri Mar 19, 2010 9:04 pm    Post subject:
Reply with quote

I load thIS FILE FROM EXCEL TO MAINFRAME
AND I TAKE ONLY FOR 51 COLUMN
AS IN EXCEL ALL COLUMN IS KNOWN AS CHAR
file length is 51
BELGDCDL1 0020BANADA 000000000.00999999900.000.05
BELGDCDL1 0028BANADA 000000000.00999999900.000.05
BELGDCDL1 0193BANADA 000000000.00999999900.000.05

NOWI WANT TO UPLOAD IN BELOW FILE AND FORAMT OF THE FILE
01lang
10 Code Pic X(12).
10 No PiC S9(4) comp.
10 model Pic X(10)
10 amt pic S9(9)V9(2) usage comp-3
10 Dt-amt pIC s9(9)v9(2) USAGE COMP-3.
10 dt-pct pIC s9(1)v9(2) USAGE cOMP-3.

THROU SORT I WANT TO DO THAT
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Fri Mar 19, 2010 11:12 pm    Post subject:
Reply with quote

Quote:
my requirement is convert PD to ZD then put in EDIT


You either convert to ZD or you convert using EDIT. You don't do both.

Here's an example of the correct syntax for editing a PD field:

25:27,12,PD,EDIT=(STTTTTTTTT.TTT),SIGNS=(,-)
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Mar 20, 2010 1:58 am    Post subject: Reply to: My requirement is convert PD to ZD then put in EDI
Reply with quote

santhosh100678,

If your intention is to create the file to the layout you have shown then use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *
----+----1----+----2----+----3----+----4----+----5-     
BELGDCDL1 0020BANADA 000000000.00999999900.000.05     
BELGDCDL1 0028BANADA 000000000.00999999900.000.05     
BELGDCDL1 0193BANADA 000000000.00999999900.000.05     
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                       
  SORT FIELDS=COPY                                     
  OUTREC BUILD=(1,9,3X,                    $ CODE     
                11,4,ZD,TO=BI,LENGTH=2,       $ NO       
                15,6,4X,                   $ MODEL     
                22,12,UFF,TO=PD,LENGTH=6,     $ AMT       
                34,12,UFF,TO=PD,LENGTH=6,     $ DT-AMT   
                46,04,UFF,TO=PD,LENGTH=2)     $ DT-PCT   
//*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Sat Mar 20, 2010 2:13 am    Post subject:
Reply with quote

Quote:
My requirement is convert PD to ZD then put in EDIT


Hmmm ... the requirement as originally described seems to have nothing to do with the actual requirement.
Back to top
View user's profile Send private message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Sat Mar 20, 2010 2:34 pm    Post subject:
Reply with quote

Hi my requirement is to insert in table before inserting table i foramtt the file as per table structure
I copy this file from excel to mainframe
BELGDCDL1 0020BANADA 000000000.00999999900.000.05
BELGDCDL1 0028BANADA 000000000.00999999900.000.05
BELGDCDL1 0193BANADA 000000000.00999999900.000.05

and length is 51 file but when i copy this file and put in table
01lang
10 Code Pic X(12).
10 No PiC S9(4) comp.
10 model Pic X(10)
10 amt pic S9(9)V9(2) usage comp-3
10 Dt-amt pIC s9(9)v9(2) USAGE COMP-3.
10 dt-pct pIC s9(1)v9(2) USAGE cOMP-3.
when i use only this card

OUTREC FIELDS=(1:1,12,13:13,4,ZD,BI,LENGTH=2,15:17,10,25:27,12,PD,ZD,
EDIT=(STTTTTTTTT.TTT),SIGNS=(,-),31:39,12,PD,ZD,EDIT=TTTTTT.TT,
EDIT=(STTTTTTTTT.TTT),SIGNS=(,-))
then from this position
10amt pic S9(9)V9(2) usage comp-3
10 Dt-amt pIC s9(9)v9(2) USAGE COMP-3.
10 dt-pct pIC s9(1)v9(2) USAGE cOMP-3.

this it shows invalid data in this particular field

and upto

10 Code Pic X(12).
10 No PiC S9(4) comp.
10 model Pic X(10)

this it capture right data but for reamining this

10amt pic S9(9)V9(2) usage comp-3
10 Dt-amt pIC s9(9)v9(2) USAGE COMP-3.
10 dt-pct pIC s9(1)v9(2) USAGE cOMP-3.
it shows invalid data
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Mar 20, 2010 7:16 pm    Post subject:
Reply with quote

Hello,

An edited field will not work as comp-3 data. . .

Your post shows comp-3 fields. The code creates edited output.

If all that is needed is packed-decimal (comp-3) why is there any mention of EDIT. . . icon_confused.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Mar 22, 2010 10:34 pm    Post subject:
Reply with quote

Satish,

Kolusu and I showed you valid various ways to convert or edit your data. But you come back and show invalid statements again. How do you expect us to help you if you ignore what we say?

If you can't show us exactly what your input data looks like and exactly what you want your output data to look like, we can't help you.
Back to top
View user's profile Send private message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Thu Mar 25, 2010 5:35 pm    Post subject:
Reply with quote

Input File :

DELDDCDD1 0020INDIAN 000000000.00999999900.000.05
DELDDCDD1 0028INDIAN 000000000.00999999900.000.05
DELDDCDD1 0193INDIAN 000000000.00999999900.000.05
DELDDCDD1 0197INDIAN 000000000.00999999900.000.05
DELDDCDD1 0198INDIAN 000000000.00999999900.000.05
DELDDCDD1 0220INDIAN 000000000.00999999900.000.05
DELDDCDD1 0223INDIAN 000000000.00999999900.000.05
DELDDCDD1 0292INDIAN 000000000.00999999900.000.05
DELDDCDD1 0699INDIAN 000000000.00999999900.000.05
DELDDCDD1 0714INDIAN 000000000.00999999900.000.05

Position: 1-9 DELDDCDD1
10-12 spaces
13-16 0020
17-22 INDIAN
22-26 spaces
27-38 000000000.00
39-50 999999900.00
51-54 0.05
Now I convert this file in this fomat

01lang
10 Code PIC X(12).
10 No PIC S9(4) comp.
10 Model PIC X(10)
10 AMT PIC S9(9)V9(2) usage comp-3
10 DT-amt PIC s9(9)v9(2) USAGE COMP-3.
10 DT-pct PIC s9(1)v9(2) USAGE COMP-3.

I use this sort Card :

SORT FIELDS=COPY
OUTREC BUILD=(1,12, $ CODE
13,4,ZD,BI,LENGTH=2, $ NO
15,10, $ MODEL
25,11,UFF,PD,LENGTH=6, $ AMT
36,11,UFF,PD,LENGTH=6, $ DT-AMT
47,04,UFF,PD,LENGTH=2) $ DT-PCT

My Job ran successfully and also its shows valid data in file but there is problem in DT_PCT it capture data but not exact
Correct data Could you please see my sort card and guide me any thing wrong and also I want to know when we use
UEF and what is the use of UEF
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Mar 25, 2010 9:38 pm    Post subject:
Reply with quote

santosh100678,

Your topic title is quite misleading. All you wanted to do is converted readable edited data to comp(binary) and comp-3 (packed decimal fields).

Btw it is UFF format not UEF format. you can read all about UFF/SFF formats here

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000088

use the following JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                       
----+----1----+----2----+----3----+----4----+----5----+
DELDDCDD1   0020INDIAN    000000000.00999999900.000.05
DELDDCDD1   0028INDIAN    000000000.00999999900.000.05
DELDDCDD1   0193INDIAN    000000000.00999999900.000.05
DELDDCDD1   0197INDIAN    000000000.00999999900.000.05
DELDDCDD1   0198INDIAN    000000000.00999999900.000.05
DELDDCDD1   0220INDIAN    000000000.00999999900.000.05
DELDDCDD1   0223INDIAN    000000000.00999999900.000.05
DELDDCDD1   0292INDIAN    000000000.00999999900.000.05
DELDDCDD1   0699INDIAN    000000000.00999999900.000.05
DELDDCDD1   0714INDIAN    000000000.00999999900.000.05
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                       
  SORT FIELDS=COPY                                     
  OUTREC BUILD=(1,12,                      $ CODE     
                13,4,ZD,BI,LENGTH=2,       $ NO       
                17,10,                     $ MODEL     
                27,12,UFF,PD,LENGTH=6,     $ AMT       
                39,12,UFF,PD,LENGTH=6,     $ DT-AMT   
                51,04,UFF,PD,LENGTH=2)     $ DT-PCT   
//*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us