SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

how to read blank space as a value while reading data from a fixed width file

Reply
Occasional Contributor
Posts: 10

how to read blank space as a value while reading data from a fixed width file

my infile statement:

infile A544.TO.DALCB.Z9.P1712

                  lrecl = 32760

                  missover

                  firstobs = 1

                  ;;

            attrib N_NUM_TIPO_RECORD length = $1

              format = $1.;

            attrib N_NUM_PROTOCOLLO_DOM length = $9

              format = $9.;

            attrib N_NUM_DISTRETTO_TEL length = $3

              format = $3.;

            attrib N_NUM_NUMERO_TEL length = $8

              format = $8.;

            attrib V_COD_ABI length = $5

              format = $5.;

            attrib C_FLG_TIP_ABI length = $1

              format = $1.;

            attrib V_DES_BANCA length = $30

              format = $30.;

            attrib D_DAT_RIFERIMENTO length = $6

              format = $6.;

            attrib C_FLG_STATO_DELEGA length = $1

              format = $1.;

            attrib ID_MANDATO length = $34

              format = $34.;

            attrib V_COD_RIEMPIMENTO length = $1

              format = $1.;

          

            input @ 1 N_NUM_TIPO_RECORD  $1.

                  @ 2 N_NUM_PROTOCOLLO_DOM  $9.

                  @ 11 N_NUM_DISTRETTO_TEL  $3.

                  @ 14 N_NUM_NUMERO_TEL  $8.

                  @ 22 V_COD_ABI  $5.

                  @ 27 C_FLG_TIP_ABI  $1.

                  @ 28 V_DES_BANCA  $30.

                  @ 58 D_DAT_RIFERIMENTO  $6.

                  @ 64 C_FLG_STATO_DELEGA  $1.

                  @ 65 ID_MANDATO  $34.

                  @ 99 V_COD_RIEMPIMENTO  $1.;

          

        run;

Super User
Super User
Posts: 7,039

Re: how to read blank space as a value while reading data from a fixed width file

This is a duplicate of

Please delete this one.

Ask a Question
Discussion stats
  • 1 reply
  • 226 views
  • 0 likes
  • 2 in conversation