***Convert PD into normal variable



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

***Convert PD into normal variable

Postby ansh_4702 » Thu May 28, 2009 2:44 pm

Hello,

This is the post I kept in cobol forum....jst copying here so that all can give their views.Please help.


Report this postReply with quote **Convert PD variable into normal form
by ansh_4702 on Thu May 21, 2009 5:09 pm

Hello,

I have an input file of 80 length. right now value from position 14 to 15 is in COMP-3. I want to create a o/p file which will display this comp field value in normal(ZD) form. Meaning the o/p file should indicate the value of COMP field from position 14 to 16. Can anyone help me out on how we could do this thru JCL. I am f=using following control card for this, but from this i am getting value "1 " while i want in the form "001". Please help.

SORT FIELDS=COPY
OUTREC FIELDS=(1,13,
14,3,PD,EDIT=(TTT),
17,64)ansh_4702

Posts: 11
Joined: Thu Jan 08, 2009 2:27 pm
Private message Top
--------------------------------------------------------------------------------
References:


Report this postReply with quote Re: **Convert PD variable into normal form
by dick scherrer on Fri May 22, 2009 12:26 am

Hello,

Do you want a cobol solution? Your topic is in the cobol part of the forum. . .

If you intend to use the sort product on your system, which sort product is in use?

If the packed decimal value is in positions 14-15, that would be a length of 2 bytes.
Hope this helps,
d.sch.
dick scherrer
Global moderator

Posts: 1656
Joined: Sat Jun 09, 2007 8:58 am
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by ansh_4702 on Fri May 22, 2009 2:38 pm

Hi Dick,
I want a JCL for this. Sorry i sent this at the wrong place. We cant use DFSORT here.....

"If the packed decimal value is in positions 14-15, that would be a length of 2 bytes."

Ya....it of two bytes in the i/p file but i want to display the value of this COMP-3 variable in the normal form...so that wud take 3 bytes in the o/p file.

rite now it is having value "001" in COMP-3 format ...i am trying to use the ctlcard i mentioned warlier but from that i am getting "1(space)(space)" ...but i want it to be displayed as"001". Please help.ansh_4702

Posts: 11
Joined: Thu Jan 08, 2009 2:27 pm
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by dick scherrer on Sat May 23, 2009 2:13 am

Hello,

JCL cannot do this - only some code can, whether it be the sort, cobol, easytrieve, or whatever.

We cant use DFSORT here.....
What does this mean? The control statements posted look like sort control statements

If you post the complete jcl, control statements, and the informational output from the run it may help. Also posting part of the output that shows the problem could help.
Hope this helps,
d.sch.
dick scherrer
Global moderator

Posts: 1656
Joined: Sat Jun 09, 2007 8:58 am
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by ansh_4702 on Sat May 23, 2009 1:54 pm

Hi Dick,

Actually in the existing JCL we have this step to reformat the rider field from comp to normal....there they have used FILEAID utility in the step.It was a very old job so the ctlcard in this step doesnt exist now. Thats why we want to create a ctlcard ourself to reformat the PD field using some other utility.

Here is the i/p file rec:
01981206955.....RT20071210

the bold field is position 14-15 which is having the comp-3 value that needs to be changed.(001)
now i am using following JCL for this:
//REFMT2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSOUTU DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SNAPDD1 DD SYSOUT=*
//SORTWK01 DD UNIT=SYSWK,SPACE=(TRK,(10,10),RLSE)
//SORTWK02 DD UNIT=SYSWK,SPACE=(TRK,(10,10),RLSE)
//SORTIN DD DSN=KHANDAN.SAMPLE.INPUT,DISP=SHR
//SORTOUT DD DSN=KHANDAN.SAMPLE.OUTPUT,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,
// SPACE=(CYL,(10,10),RLSE),
// DCB=(PTS.MODEL,LRECL=80,RECFM=FB)
//SYSIN DD DSN=KHANDAN.RC.CTLCARD(SORTABC),DISP=SHR
//*

Ctlcard is as follows:

SORT FIELDS=COPY
OUTREC FIELDS=(1,13,
14,3,PD,EDIT=(TTT),
17,64)

The o/p file rec is as follows:
01981206955..1 RT20071210

Thus getting "1_ _" not "001". please see if you can provide some JCL or ctlcard to do this.
Thanks !ansh_4702

Posts: 11
Joined: Thu Jan 08, 2009 2:27 pm
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by Anuj D. on Sat May 23, 2009 9:45 pm

Is this JCL not functioning now? As You say:
in the existing JCL we have this step to reformat the rider field
and then this
It was a very old job so the ctlcard in this step doesnt exist now.


In another post you said,
packed decimal value is in positions 14-15
while in your SORT card you use "14,3" . If I got your question correctly, try something like:

Code: Select all
SORT FIELDS=COPY
OUTREC FIELDS=(1,13,
14,2,PD,TO=ZD,EDIT=(TTT),
17,64)
AnujAnuj D.

Posts: 26
Joined: Mon Feb 25, 2008 3:53 am
Location: Earth
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by dick scherrer on Sat May 23, 2009 9:56 pm

Hello,

What happens when you specify length 2 rather than length 3 (as mentioned earlier)?

The PD field is 2 bytes, not 3.
Hope this helps,
d.sch.
dick scherrer
Global moderator

Posts: 1656
Joined: Sat Jun 09, 2007 8:58 am
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by ansh_4702 on Mon May 25, 2009 3:41 pm

Hi Dick,

I tried by your ctlcard,but I got this :

01981206955..01.RT20071210

While I want the out put as:

01981206955..001RT20071210ansh_4702

Posts: 11
Joined: Thu Jan 08, 2009 2:27 pm
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by ansh_4702 on Wed May 27, 2009 5:25 pm

Hi Dick,
Didnt hear anything back from you ???ansh_4702

Posts: 11
Joined: Thu Jan 08, 2009 2:27 pm
Private message Top
--------------------------------------------------------------------------------
Report this postReply with quote Re: **Convert PD variable into normal form
by dick scherrer on Thu May 28, 2009 3:21 am

Hello,

I just noticed that your topic is in the cobol part of the forum

Does your system use Syncsort (earlier you mintioned that you cannot use DFSORT)?

If this was in the proper sort part of the forum, we'd have more activity.
Hope this helps,
d.sch.
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

 

Re: ***Convert PD into normal variable

Postby ansh_4702 » Thu May 28, 2009 2:46 pm

Hi Dick, Yes our system use Sync sort.
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby arcvns » Thu May 28, 2009 10:09 pm

ansh_4702,

Post the "HEX ON" form of your input record. It's not clear where your PD field starts and how much length it occupies.
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby praveen_nayak17 » Fri May 29, 2009 12:22 am

Hi..

can u try with dis

If the starting posn is 14 and its 2 bytes
sort fields=copy
outrec fields=(1,13,14,2,PD,M0,16,64)

Thanks,
praveen_nayak17
 
Posts: 8
Joined: Thu Jan 15, 2009 11:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby Alissa Margulies » Fri May 29, 2009 12:34 am

ansh_4702,

Please identify which release of SyncSort for z/OS you are currently running.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: ***Convert PD into normal variable

Postby ansh_4702 » Sat May 30, 2009 5:42 pm

Hi Arcvns,

The hex on form of the i/p rec is as follows:
01981206955.....RT20071210
FFFFFFFFFFF00010DEFFFFFFFF
01981206955000C09320071210
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby ansh_4702 » Sat May 30, 2009 5:51 pm

So here 001 is in PD and at position 14-15. I want it in normal form(meaning from 14-16, it should display "001" )
Please advise.
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby dick scherrer » Sat May 30, 2009 11:30 pm

Hello,

You need to answer the question of which release of Syncsort is used on your system.
Please identify which release of SyncSort for z/OS you are currently running.


You may not have noticed, but Alissa is a Syncsort technical representative. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: ***Convert PD into normal variable

Postby arcvns » Sun May 31, 2009 9:18 am

ansh_4702,

Apart from the SyncSort Release info., I would like you to answer these as well.

12345678901234567890123456
FFFFFFFFFFF00010DEFFFFFFFF
01981206955000C09320071210

You said the PD field is from 14-15, but you showed 3-bytes in RED, starting from the 13 position which can hold upto 5 numeric digits. From the above sample data, even if we consider it as starting from the 12th position, still it's a valid PD field of length=4 which can hold upto 7 numeric digits.

So which is the actual starting position of your PD data? Why do you want only 3 digits from it, if the starting position is 12 or 13?
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: ***Convert PD into normal variable

Postby ansh_4702 » Tue Jun 02, 2009 11:59 am

Hi,

I tried to find the version of syncsort we are currently using. I did QW SYNCSORT....I got following info:

----------- V=SYNCSORT P=SYNCSORT Z/OS UTIL R=V1R2 I=SYNCSORT D=M ------------
****************** Text Below Copyright (c) 2009, SYNCSORT *******************
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post