|
View previous topic :: View next topic
|
| Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Hello, how are you?
| Code: |
//SORT0240 EXEC SORTC
//* INPUT
//SORTIN DD DSN=DM.BE.one,
// DISP=SHR
//* OUTPUT
//SORTOUT DD DSN=DM.BE.two,
// DISP=(NEW,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(1500,150),RLSE),VOL=(,,,9),
// DCB=(RECFM=VB,LRECL=974,BLKSIZE=0,DSORG=PS)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=((21,1,ZD,EQ,0,OR,21,1,ZD,EQ,2),
AND,(17,1,CH,EQ,X'09')),BUILD=(1,24,C'3',26,949))
OPTION STOPAFT=1000
|
I want to search this secuential file in order to change the pos 24.
When I try to use this code no expected change happend, but if I delete the this --->(17,1,CH,EQ,X'09') the expected changes do happen, so I think im doing something wrong with the hex search i quoted.
the secuencial file is like this
----+----1----+----2-
¦ & 1211D 0027
(the hex number is in pos 17, the empty space, if I activate the HEX mode, I can see 0)
9
The input file is a secuencial that I converted from a VSAM with REPRO.
------------------------------------------------------------------------
Really I tried to figure out the solution but I cant found it.
as always thank you. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1448 Location: Bamberg, Germany
|
|
|
|
What happens when you change (17,1,CH,EQ,X'09') to (17,1,BI,EQ,X'09')?
Also please post this:
| Quote: |
----+----1----+----2-
¦ & 1211D 0027 |
in Hex mode and use code tags for that. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
There is no need for SORT to previous conversion of VSAM to PS. SORT can work easily with VSAM input.
There might be conversion of RECFM between VB and FB, which also affected field positions. You need to verify the ACTUAL input to SORT, not the original VSAM data if you converted with REPRO. |
|
| Back to top |
|
 |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
| Joerg.Findeisen wrote: |
What happens when you change (17,1,CH,EQ,X'09') to (17,1,BI,EQ,X'09')?
Also please post this:
| Quote: |
----+----1----+----2-
¦ & 1211D 0027 |
in Hex mode and use code tags for that. |
Hello, this is not working. I have to say that the buid command I give it a parameter of 24 (BUILD=(1,24,C'3',26,949)) and it correctly change the position at pos 21, (yes, i have to put 24 to change the pos 21)
| Code: |
----+----1----+----2-
¦ & 1211D 0027 |
|
|
| Back to top |
|
 |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
| sergeyken wrote: |
There is no need for SORT to previous conversion of VSAM to PS. SORT can work easily with VSAM input.
There might be conversion of RECFM between VB and FB, which also affected field positions. You need to verify the ACTUAL input to SORT, not the original VSAM data if you converted with REPRO. |
Yes, when I see the input in the pos 17 I can finde the empty space and there is the HEX value, but when, as I said, searh in that 17 position it cant find the value searched. |
|
| Back to top |
|
 |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
| Code: |
//REPR0220 EXEC PGM=IDCAMS
//* INPUT
//DD1 DD DSN=DM.BE.MAES90.VSAM,DISP=SHR
//* OUTPUT
//DD2 DD DSN=DM.BE.one,
// DISP=(NEW,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(1500,150),RLSE),VOL=(,,,9),
// DCB=(RECFM=VB,LRECL=974,BLKSIZE=0,DSORG=PS)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(DD1) OUTFILE(DD2)
/* |
this is the repro step, the original vsam have a RECSZ(320 970) |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
1) absolutely no need for REPRO. Never do things more complicated than they are, if not strictly needed.
2) remains unclear: are the field positions counted keeping in mind the RDW from RECFM=VB, or not?
3) It would be more useful to trace the actual values of ALL involved fields, converted to printable format, rather to guess what they may, or should be equal to? |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1448 Location: Bamberg, Germany
|
|
|
|
| When processing VSAM directly, have a look at DFSORT's RECORD TYPE=V|F option. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| You need to add RDW +4 bytes to all starting positions in the INCLUDE and retry. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
| Rohit Umarjikar wrote: |
| You need to add RDW +4 bytes to all starting positions in the INCLUDE and retry. |
Instead of all these attempts to guess any of possible issues, the standard proven method should always be: tracing all involved data values during the test run |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
I am not guessing , I have tested yesterday against X’09’ if that’s what you need to know. It’s a simple INCLUDE to work as it works for any VB DS unless offsets are set wrong.
Second TS don’t need BUILD , simple OVERLAY should do. I wonder shouldn’t that be 1,25 than 1,24 to see changes at 21st position?
Please start debugging one INCLUDE condition at a time. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
| Rohit Umarjikar wrote: |
I am not guessing , I have tested yesterday against X’09’ if that’s what you need to know. It’s a simple INCLUDE to work as it works for any VB DS unless offsets are set wrong.
Second TS don’t need BUILD , simple OVERLAY should do. I wonder shouldn’t that be 1,25 than 1,24 to see changes at 21st position?
Please start debugging one INCLUDE condition at a time. |
In order to make all these decisions - everyone, in every case, must first of all to clearly trace all the data values used in his own test, before hurrying to the forum and screaming: “Help! What is wrong in my super-excellent code??!!” |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| Agree. We are all saying the same thing, let us just wait for TS to retry on what is suggested. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|